public sealed class Context : Protobuf.IMessage<Context>, Protobuf.IBufferMessage
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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The `Context` class defines the contexts that an API requests, using rules to specify requested context types for methods."],["It supports whitelisting protobuf message extensions that can be sent in gRPC metadata using specific formats."],["The `Context` class contains a `Rules` property, which is a list of context rules applicable to API methods, following a \"last one wins\" precedence order."],["This class provides methods for manipulation of its objects such as `Clone`, `Equals`, `MergeFrom`, `CalculateSize`, `GetHashCode`, `ToString` and `WriteTo`."]]],[]]