Reference documentation and code samples for the Google API Common Protos Client class Documentation.
Documentationprovides the information for describing a service.
Example:
documentation:
summary: >
The Google Calendar API gives access
to most calendar features.
pages:
- name: Overview
content: (== include google/foo/overview.md ==)
- name: Tutorial
content: (== include google/foo/tutorial.md ==)
subpages:
- name: Java
content: (== include google/foo/tutorial_java.md ==)
rules:
- selector: google.calendar.Calendar.Get
description: >
...
- selector: google.calendar.Calendar.Put
description: >
...
Documentation is provided in markdown syntax. In addition to
standard markdown features, definition lists, tables and fenced
code blocks are supported. Section headers can be provided and are
interpreted relative to the section nesting of the context where
a documentation fragment is embedded.
Documentation from the IDL is merged with documentation defined
via the config at normalization time, where documentation provided
by config rules overrides IDL provided.
A number of constructs specific to the API platform are supported
in documentation text.
In order to reference a proto element, the following
notation can be used:
fully.qualified.proto.name
To override the display text used for the link, this can be used:
display text
Text can be excluded from doc using the following notation:
(-- internal comment --)
A few directives are available in documentation. Note that
directives must appear on a single line to be properly
identified. Theincludedirective includes a markdown file from
an external source:
(== include path/to/file ==)
Theresource_fordirective marks a message to be the resource of
a collection in REST view. If it is not specified, tools attempt
to infer the resource from the operations in a collection:
(== resource_for v1.shelves.books ==)
The directivesuppress_warningdoes not directly affect documentation
and is documented together with service config validation.
Generated from protobuf messagegoogle.api.Documentation
Namespace
Google \ Api
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ summary
string
A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard fielddescription.
A list of documentation rules that apply to individual API elements.NOTE:All service configuration rules follow "last one wins" order.
↳ documentation_root_url
string
The URL to the root of documentation.
↳ service_root_url
string
Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.
↳ overview
string
Declares a single overview page. For example:
documentation: summary: ... overview: (== include overview.md ==)
This is a shortcut for the following declaration (using pages style):
Note: you cannot specify bothoverviewfield andpagesfield.
getSummary
A short description of what the service does. The summary must be plain
text. It becomes the overview of the service displayed in Google Cloud
Console.
NOTE: This field is equivalent to the standard fielddescription.
Returns
Type
Description
string
setSummary
A short description of what the service does. The summary must be plain
text. It becomes the overview of the service displayed in Google Cloud
Console.
NOTE: This field is equivalent to the standard fielddescription.
Specifies the service root url if the default one (the service name
from the yaml file) is not suitable. This can be seen in any fully
specified service urls as well as sections that show a base that other
urls are relative to.
Returns
Type
Description
string
setServiceRootUrl
Specifies the service root url if the default one (the service name
from the yaml file) is not suitable. This can be seen in any fully
specified service urls as well as sections that show a base that other
urls are relative to.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOverview
Declares a single overview page. For example:
documentation:
summary: ...
overview: (== include overview.md ==)
This is a shortcut for the following declaration (using pages style):
[[["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 Documentation (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.Documentation)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.Documentation)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.Documentation)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.Documentation)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.Documentation)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.Documentation) \nReference documentation and code samples for the Google API Common Protos Client class Documentation.\n\n`Documentation` provides the information for describing a service.\n\nExample: \n\n documentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages:\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\nA number of constructs specific to the API platform are supported\nin documentation text.\nIn order to reference a proto element, the following\nnotation can be used: \n\n fully.qualified.proto.name\n\nTo override the display text used for the link, this can be used: \n\n display text\n\nText can be excluded from doc using the following notation: \n\n (-- internal comment --)\n\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source: \n\n (== include path/to/file ==)\n\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection: \n\n (== resource_for v1.shelves.books ==)\n\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.\n\nGenerated from protobuf message `google.api.Documentation`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSummary\n\nA short description of what the service does. The summary must be plain\ntext. It becomes the overview of the service displayed in Google Cloud\nConsole.\n\nNOTE: This field is equivalent to the standard field `description`.\n\n### setSummary\n\nA short description of what the service does. The summary must be plain\ntext. It becomes the overview of the service displayed in Google Cloud\nConsole.\n\nNOTE: This field is equivalent to the standard field `description`.\n\n### getPages\n\nThe top level pages for the documentation set.\n\n### setPages\n\nThe top level pages for the documentation set.\n\n### getRules\n\nA list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.\n\n### setRules\n\nA list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.\n\n### getDocumentationRootUrl\n\nThe URL to the root of documentation.\n\n### setDocumentationRootUrl\n\nThe URL to the root of documentation.\n\n### getServiceRootUrl\n\nSpecifies the service root url if the default one (the service name\nfrom the yaml file) is not suitable. This can be seen in any fully\nspecified service urls as well as sections that show a base that other\nurls are relative to.\n\n### setServiceRootUrl\n\nSpecifies the service root url if the default one (the service name\nfrom the yaml file) is not suitable. This can be seen in any fully\nspecified service urls as well as sections that show a base that other\nurls are relative to.\n\n### getOverview\n\nDeclares a single overview page. For example: \n\n documentation:\n summary: ...\n overview: (== include overview.md ==)\n\nThis is a shortcut for the following declaration (using pages style): \n\n documentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\nNote: you cannot specify both `overview` field and `pages` field.\n\n### setOverview\n\nDeclares a single overview page. For example: \n\n documentation:\n summary: ...\n overview: (== include overview.md ==)\n\nThis is a shortcut for the following declaration (using pages style): \n\n documentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\nNote: you cannot specify both `overview` field and `pages` field."]]