public sealed class FieldPolicy : IMessage<FieldPolicy>, IEquatable<FieldPolicy>, IDeepCloneable<FieldPolicy>, IBufferMessage, IMessage
Google API Policy Annotation
This message defines a simple API policy annotation that can be used to
annotate API request and response message fields with applicable policies.
One field may have multiple applicable policies that must all be satisfied
before a request can be processed. This policy annotation is used to
generate the overall policy that will be used for automatic runtime
policy enforcement and documentation generation.
Specifies the required permission(s) for the resource referred to by the
field. It requires the field contains a valid resource reference, and
the request must pass the permission checks to proceed. For example,
"resourcemanager.projects.get".
Selects one or more request or response message fields to apply this
FieldPolicy.
When a FieldPolicy is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as "foo.bar" or "foo.bar,foo.baz".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eFieldPolicy\u003c/code\u003e is a class used to annotate API request and response message fields with applicable policies within the Google API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFieldPolicy\u003c/code\u003e class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, enabling features like deep cloning and message equality checks.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFieldPolicy\u003c/code\u003e includes properties like \u003ccode\u003eResourcePermission\u003c/code\u003e, \u003ccode\u003eResourceType\u003c/code\u003e, and \u003ccode\u003eSelector\u003c/code\u003e to specify resource requirements and identify which fields are subject to the policy.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFieldPolicy\u003c/code\u003e class provides methods for operations like calculating message size (\u003ccode\u003eCalculateSize\u003c/code\u003e), creating clones (\u003ccode\u003eClone\u003c/code\u003e), and merging messages (\u003ccode\u003eMergeFrom\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eFieldPolicy\u003c/code\u003e is available under the \u003ccode\u003e2.15.0\u003c/code\u003e version.\u003c/p\u003e\n"]]],[],null,[]]