public static final class Context.Builder extends GeneratedMessageV3.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.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to whitelist 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
Modifier and Type | Method and Description |
---|---|
Context.Builder |
addAllRules(java.lang.Iterable<? extends ContextRule> values)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Context.Builder |
addRules(ContextRule.Builder builderForValue)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
addRules(ContextRule value)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
addRules(int index,
ContextRule.Builder builderForValue)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
addRules(int index,
ContextRule value)
A list of RPC context rules that apply to individual API methods.
|
ContextRule.Builder |
addRulesBuilder()
A list of RPC context rules that apply to individual API methods.
|
ContextRule.Builder |
addRulesBuilder(int index)
A list of RPC context rules that apply to individual API methods.
|
Context |
build() |
Context |
buildPartial() |
Context.Builder |
clear() |
Context.Builder |
clearField(Descriptors.FieldDescriptor field) |
Context.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Context.Builder |
clearRules()
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
clone() |
Context |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
ContextRule |
getRules(int index)
A list of RPC context rules that apply to individual API methods.
|
ContextRule.Builder |
getRulesBuilder(int index)
A list of RPC context rules that apply to individual API methods.
|
java.util.List<ContextRule.Builder> |
getRulesBuilderList()
A list of RPC context rules that apply to individual API methods.
|
int |
getRulesCount()
A list of RPC context rules that apply to individual API methods.
|
java.util.List<ContextRule> |
getRulesList()
A list of RPC context rules that apply to individual API methods.
|
ContextRuleOrBuilder |
getRulesOrBuilder(int index)
A list of RPC context rules that apply to individual API methods.
|
java.util.List<? extends ContextRuleOrBuilder> |
getRulesOrBuilderList()
A list of RPC context rules that apply to individual API methods.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Context.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Context.Builder |
mergeFrom(Context other) |
Context.Builder |
mergeFrom(Message other) |
Context.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Context.Builder |
removeRules(int index)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Context.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Context.Builder |
setRules(int index,
ContextRule.Builder builderForValue)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
setRules(int index,
ContextRule value)
A list of RPC context rules that apply to individual API methods.
|
Context.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Context.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Context.Builder>
public Context getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Context build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Context buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Context.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Context.Builder>
public Context.Builder mergeFrom(Context other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Context.Builder>
public Context.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Context.Builder>
java.io.IOException
public java.util.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;
getRulesList
in interface ContextOrBuilder
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;
getRulesCount
in interface ContextOrBuilder
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;
getRules
in interface ContextOrBuilder
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;
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;
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;
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;
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;
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;
public Context.Builder addAllRules(java.lang.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;
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;
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;
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;
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;
getRulesOrBuilder
in interface ContextOrBuilder
public java.util.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;
getRulesOrBuilderList
in interface ContextOrBuilder
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;
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;
public java.util.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;
public final Context.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Context.Builder>
public final Context.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Context.Builder>