public sealed class DocumentationRule : IMessage<DocumentationRule>, IEquatable<DocumentationRule>, IDeepCloneable<DocumentationRule>, IBufferMessage, IMessage
A documentation rule provides information about individual API elements.
Description of the selected proto element (e.g. a message, a method, a
'service' definition, or a field). Defaults to leading & trailing comments
taken from the proto source definition of the proto element.
The selector is a comma-separated list of patterns for any element such as
a method, a field, an enum value. Each pattern is a qualified name of the
element which may end in "", indicating a wildcard. Wildcards are only
allowed at the end and for a whole component of the qualified name,
i.e. "foo." is ok, but not "foo.b" or "foo..bar". A wildcard will match
one or more components. To specify a default for all applicable elements,
the whole pattern "*" is used.
[[["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-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDocumentationRule\u003c/code\u003e class provides information about individual API elements, offering details like descriptions and deprecation notices.\u003c/p\u003e\n"],["\u003cp\u003eIt implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, enabling functionalities like deep cloning and protocol buffer message handling.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains fields such as \u003ccode\u003eDeprecationDescriptionFieldNumber\u003c/code\u003e, \u003ccode\u003eDescriptionFieldNumber\u003c/code\u003e, and \u003ccode\u003eSelectorFieldNumber\u003c/code\u003e, which are used for internal message processing and identify the field numbers for properties.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eDocumentationRule\u003c/code\u003e include \u003ccode\u003eDeprecationDescription\u003c/code\u003e, \u003ccode\u003eDescription\u003c/code\u003e, and \u003ccode\u003eSelector\u003c/code\u003e, which allow for setting the deprecation status, the description of the selected element, and the element selector pattern respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDocumentationRule\u003c/code\u003e offers methods like \u003ccode\u003eCalculateSize\u003c/code\u003e, \u003ccode\u003eClone\u003c/code\u003e, \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eMergeFrom\u003c/code\u003e, \u003ccode\u003eToString\u003c/code\u003e, and \u003ccode\u003eWriteTo\u003c/code\u003e for managing the object, its properties and handling operations like deep cloning, comparison, and data stream processing.\u003c/p\u003e\n"]]],[],null,["# Class DocumentationRule (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.DocumentationRule)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Api.DocumentationRule)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Api.DocumentationRule)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Api.DocumentationRule) \n\n public sealed class DocumentationRule : IMessage\u003cDocumentationRule\u003e, IEquatable\u003cDocumentationRule\u003e, IDeepCloneable\u003cDocumentationRule\u003e, IBufferMessage, IMessage\n\nA documentation rule provides information about individual API elements. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DocumentationRule \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DocumentationRule](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.DocumentationRule), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DocumentationRule](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.DocumentationRule), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DocumentationRule](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.DocumentationRule), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Api](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### DocumentationRule()\n\n public DocumentationRule()\n\n### DocumentationRule(DocumentationRule)\n\n public DocumentationRule(DocumentationRule other)\n\nFields\n------\n\n### DeprecationDescriptionFieldNumber\n\n public const int DeprecationDescriptionFieldNumber = 3\n\nField number for the \"deprecation_description\" field.\n\n### DescriptionFieldNumber\n\n public const int DescriptionFieldNumber = 2\n\nField number for the \"description\" field.\n\n### SelectorFieldNumber\n\n public const int SelectorFieldNumber = 1\n\nField number for the \"selector\" field.\n\nProperties\n----------\n\n### DeprecationDescription\n\n public string DeprecationDescription { get; set; }\n\nDeprecation description of the selected element(s). It can be provided if\nan element is marked as `deprecated`.\n\n### Description\n\n public string Description { get; set; }\n\nDescription of the selected proto element (e.g. a message, a method, a\n'service' definition, or a field). Defaults to leading \\& trailing comments\ntaken from the proto source definition of the proto element.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Parser\n\n public static MessageParser\u003cDocumentationRule\u003e Parser { get; }\n\n### Selector\n\n public string Selector { get; set; }\n\nThe selector is a comma-separated list of patterns for any element such as\na method, a field, an enum value. Each pattern is a qualified name of the\nelement which may end in \"*\", indicating a wildcard. Wildcards are only\nallowed at the end and for a whole component of the qualified name,\ni.e. \"foo.* \" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match\none or more components. To specify a default for all applicable elements,\nthe whole pattern \"\\*\" is used.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public DocumentationRule Clone()\n\n### Equals(DocumentationRule)\n\n public bool Equals(DocumentationRule other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(DocumentationRule)\n\n public void MergeFrom(DocumentationRule other)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]