public final class Context extends GeneratedMessageV3 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 | Class and Description |
---|---|
static class |
Context.Builder
`Context` defines which contexts an API requests.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
RULES_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static Context |
getDefaultInstance() |
Context |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Parser<Context> |
getParserForType() |
ContextRule |
getRules(int index)
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.
|
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Context.Builder |
newBuilder() |
static Context.Builder |
newBuilder(Context prototype) |
Context.Builder |
newBuilderForType() |
protected Context.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Context |
parseDelimitedFrom(java.io.InputStream input) |
static Context |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Context |
parseFrom(byte[] data) |
static Context |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Context |
parseFrom(java.nio.ByteBuffer data) |
static Context |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Context |
parseFrom(ByteString data) |
static Context |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Context |
parseFrom(CodedInputStream input) |
static Context |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Context |
parseFrom(java.io.InputStream input) |
static Context |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Context> |
parser() |
Context.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int RULES_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
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 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 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 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 final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Context parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Context parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Context parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Context parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Context parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Context parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Context parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Context.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Context.Builder newBuilder()
public static Context.Builder newBuilder(Context prototype)
public Context.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Context.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Context getDefaultInstance()
public Parser<Context> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Context getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder