Reference documentation and code samples for the Google API Common Protos Client class DocumentationRule.
A documentation rule provides information about individual API elements.
Generated from protobuf messagegoogle.api.DocumentationRule
Namespace
Google \ Api
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ selector
string
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.
↳ description
string
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.
↳ deprecation_description
string
Deprecation description of the selected element(s). It can be provided if an element is marked asdeprecated.
getSelector
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.
Returns
Type
Description
string
setSelector
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
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.
Returns
Type
Description
string
setDescription
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDeprecationDescription
Deprecation description of the selected element(s). It can be provided if
an element is marked asdeprecated.
Returns
Type
Description
string
setDeprecationDescription
Deprecation description of the selected element(s). It can be provided if
an element is marked asdeprecated.
[[["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-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class DocumentationRule (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.DocumentationRule)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.DocumentationRule)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.DocumentationRule)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.DocumentationRule)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.DocumentationRule)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.DocumentationRule) \nReference documentation and code samples for the Google API Common Protos Client class DocumentationRule.\n\nA documentation rule provides information about individual API elements.\n\nGenerated from protobuf message `google.api.DocumentationRule`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSelector\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\n### setSelector\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\n### getDescription\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### setDescription\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### getDeprecationDescription\n\nDeprecation description of the selected element(s). It can be provided if\nan element is marked as `deprecated`.\n\n### setDeprecationDescription\n\nDeprecation description of the selected element(s). It can be provided if\nan element is marked as `deprecated`."]]