public static final class Documentation.Builder extends GeneratedMessageV3.Builder<Documentation.Builder> implements DocumentationOrBuilder
Documentation
provides the information for describing a service.
Example:
<pre><code>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: >
...
</code></pre>
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:
<pre><code>[fully.qualified.proto.name][]</code></pre>
To override the display text used for the link, this can be used:
<pre><code>[display text][fully.qualified.proto.name]</code></pre>
Text can be excluded from doc using the following notation:
<pre><code>(-- internal comment --)</code></pre>
A few directives are available in documentation. Note that
directives must appear on a single line to be properly
identified. The
include
directive includes a markdown file from an external source: <pre><code>(== include path/to/file ==)</code></pre> Theresource_for
directive 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: <pre><code>(== resource_for v1.shelves.books ==)</code></pre> The directivesuppress_warning
does not directly affect documentation and is documented together with service config validation.
Protobuf type google.api.Documentation
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Documentation.BuilderImplements
DocumentationOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllPages(Iterable<? extends Page> values)
public Documentation.Builder addAllPages(Iterable<? extends Page> values)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
values | Iterable<? extends com.google.api.Page> |
Type | Description |
Documentation.Builder |
addAllRules(Iterable<? extends DocumentationRule> values)
public Documentation.Builder addAllRules(Iterable<? extends DocumentationRule> values)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
values | Iterable<? extends com.google.api.DocumentationRule> |
Type | Description |
Documentation.Builder |
addPages(Page value)
public Documentation.Builder addPages(Page value)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
value | Page |
Type | Description |
Documentation.Builder |
addPages(Page.Builder builderForValue)
public Documentation.Builder addPages(Page.Builder builderForValue)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
builderForValue | Page.Builder |
Type | Description |
Documentation.Builder |
addPages(int index, Page value)
public Documentation.Builder addPages(int index, Page value)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
value | Page |
Type | Description |
Documentation.Builder |
addPages(int index, Page.Builder builderForValue)
public Documentation.Builder addPages(int index, Page.Builder builderForValue)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
builderForValue | Page.Builder |
Type | Description |
Documentation.Builder |
addPagesBuilder()
public Page.Builder addPagesBuilder()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
Page.Builder |
addPagesBuilder(int index)
public Page.Builder addPagesBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
Type | Description |
Page.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Documentation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Documentation.Builder |
addRules(DocumentationRule value)
public Documentation.Builder addRules(DocumentationRule value)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
value | DocumentationRule |
Type | Description |
Documentation.Builder |
addRules(DocumentationRule.Builder builderForValue)
public Documentation.Builder addRules(DocumentationRule.Builder builderForValue)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
builderForValue | DocumentationRule.Builder |
Type | Description |
Documentation.Builder |
addRules(int index, DocumentationRule value)
public Documentation.Builder addRules(int index, DocumentationRule value)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
value | DocumentationRule |
Type | Description |
Documentation.Builder |
addRules(int index, DocumentationRule.Builder builderForValue)
public Documentation.Builder addRules(int index, DocumentationRule.Builder builderForValue)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
builderForValue | DocumentationRule.Builder |
Type | Description |
Documentation.Builder |
addRulesBuilder()
public DocumentationRule.Builder addRulesBuilder()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
DocumentationRule.Builder |
addRulesBuilder(int index)
public DocumentationRule.Builder addRulesBuilder(int index)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
Type | Description |
DocumentationRule.Builder |
build()
public Documentation build()
Type | Description |
Documentation |
buildPartial()
public Documentation buildPartial()
Type | Description |
Documentation |
clear()
public Documentation.Builder clear()
Type | Description |
Documentation.Builder |
clearDocumentationRootUrl()
public Documentation.Builder clearDocumentationRootUrl()
The URL to the root of documentation.
string documentation_root_url = 4;
Type | Description |
Documentation.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Documentation.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Documentation.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Documentation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Documentation.Builder |
clearOverview()
public Documentation.Builder clearOverview()
Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: (== include overview.md ==) </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:
- name: Overview
content: (== include overview.md ==)
</code></pre>
Note: you cannot specify both
overview
field andpages
field.
string overview = 2;
Type | Description |
Documentation.Builder | This builder for chaining. |
clearPages()
public Documentation.Builder clearPages()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
Documentation.Builder |
clearRules()
public Documentation.Builder clearRules()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
Documentation.Builder |
clearServiceRootUrl()
public Documentation.Builder clearServiceRootUrl()
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.
string service_root_url = 6;
Type | Description |
Documentation.Builder | This builder for chaining. |
clearSummary()
public Documentation.Builder clearSummary()
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 field description
.
string summary = 1;
Type | Description |
Documentation.Builder | This builder for chaining. |
clone()
public Documentation.Builder clone()
Type | Description |
Documentation.Builder |
getDefaultInstanceForType()
public Documentation getDefaultInstanceForType()
Type | Description |
Documentation |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getDocumentationRootUrl()
public String getDocumentationRootUrl()
The URL to the root of documentation.
string documentation_root_url = 4;
Type | Description |
String | The documentationRootUrl. |
getDocumentationRootUrlBytes()
public ByteString getDocumentationRootUrlBytes()
The URL to the root of documentation.
string documentation_root_url = 4;
Type | Description |
ByteString | The bytes for documentationRootUrl. |
getOverview()
public String getOverview()
Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: (== include overview.md ==) </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:
- name: Overview
content: (== include overview.md ==)
</code></pre>
Note: you cannot specify both
overview
field andpages
field.
string overview = 2;
Type | Description |
String | The overview. |
getOverviewBytes()
public ByteString getOverviewBytes()
Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: (== include overview.md ==) </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:
- name: Overview
content: (== include overview.md ==)
</code></pre>
Note: you cannot specify both
overview
field andpages
field.
string overview = 2;
Type | Description |
ByteString | The bytes for overview. |
getPages(int index)
public Page getPages(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
Type | Description |
Page |
getPagesBuilder(int index)
public Page.Builder getPagesBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
Type | Description |
Page.Builder |
getPagesBuilderList()
public List<Page.Builder> getPagesBuilderList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
List<Builder> |
getPagesCount()
public int getPagesCount()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
int |
getPagesList()
public List<Page> getPagesList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
List<Page> |
getPagesOrBuilder(int index)
public PageOrBuilder getPagesOrBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
Type | Description |
PageOrBuilder |
getPagesOrBuilderList()
public List<? extends PageOrBuilder> getPagesOrBuilderList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Type | Description |
List<? extends com.google.api.PageOrBuilder> |
getRules(int index)
public DocumentationRule getRules(int index)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
Type | Description |
DocumentationRule |
getRulesBuilder(int index)
public DocumentationRule.Builder getRulesBuilder(int index)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
Type | Description |
DocumentationRule.Builder |
getRulesBuilderList()
public List<DocumentationRule.Builder> getRulesBuilderList()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
List<Builder> |
getRulesCount()
public int getRulesCount()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
int |
getRulesList()
public List<DocumentationRule> getRulesList()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
List<DocumentationRule> |
getRulesOrBuilder(int index)
public DocumentationRuleOrBuilder getRulesOrBuilder(int index)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
Type | Description |
DocumentationRuleOrBuilder |
getRulesOrBuilderList()
public List<? extends DocumentationRuleOrBuilder> getRulesOrBuilderList()
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Type | Description |
List<? extends com.google.api.DocumentationRuleOrBuilder> |
getServiceRootUrl()
public String getServiceRootUrl()
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.
string service_root_url = 6;
Type | Description |
String | The serviceRootUrl. |
getServiceRootUrlBytes()
public ByteString getServiceRootUrlBytes()
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.
string service_root_url = 6;
Type | Description |
ByteString | The bytes for serviceRootUrl. |
getSummary()
public String 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 field description
.
string summary = 1;
Type | Description |
String | The summary. |
getSummaryBytes()
public ByteString getSummaryBytes()
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 field description
.
string summary = 1;
Type | Description |
ByteString | The bytes for summary. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(Documentation other)
public Documentation.Builder mergeFrom(Documentation other)
Name | Description |
other | Documentation |
Type | Description |
Documentation.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Documentation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Documentation.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Documentation.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Documentation.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Documentation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Documentation.Builder |
removePages(int index)
public Documentation.Builder removePages(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
Type | Description |
Documentation.Builder |
removeRules(int index)
public Documentation.Builder removeRules(int index)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
Type | Description |
Documentation.Builder |
setDocumentationRootUrl(String value)
public Documentation.Builder setDocumentationRootUrl(String value)
The URL to the root of documentation.
string documentation_root_url = 4;
Name | Description |
value | String The documentationRootUrl to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setDocumentationRootUrlBytes(ByteString value)
public Documentation.Builder setDocumentationRootUrlBytes(ByteString value)
The URL to the root of documentation.
string documentation_root_url = 4;
Name | Description |
value | ByteString The bytes for documentationRootUrl to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Documentation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Documentation.Builder |
setOverview(String value)
public Documentation.Builder setOverview(String value)
Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: (== include overview.md ==) </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:
- name: Overview
content: (== include overview.md ==)
</code></pre>
Note: you cannot specify both
overview
field andpages
field.
string overview = 2;
Name | Description |
value | String The overview to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setOverviewBytes(ByteString value)
public Documentation.Builder setOverviewBytes(ByteString value)
Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: (== include overview.md ==) </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:
- name: Overview
content: (== include overview.md ==)
</code></pre>
Note: you cannot specify both
overview
field andpages
field.
string overview = 2;
Name | Description |
value | ByteString The bytes for overview to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setPages(int index, Page value)
public Documentation.Builder setPages(int index, Page value)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
value | Page |
Type | Description |
Documentation.Builder |
setPages(int index, Page.Builder builderForValue)
public Documentation.Builder setPages(int index, Page.Builder builderForValue)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
Name | Description |
index | int |
builderForValue | Page.Builder |
Type | Description |
Documentation.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Documentation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Documentation.Builder |
setRules(int index, DocumentationRule value)
public Documentation.Builder setRules(int index, DocumentationRule value)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
value | DocumentationRule |
Type | Description |
Documentation.Builder |
setRules(int index, DocumentationRule.Builder builderForValue)
public Documentation.Builder setRules(int index, DocumentationRule.Builder builderForValue)
A list of documentation rules that apply to individual API elements. NOTE: All service configuration rules follow "last one wins" order.
repeated .google.api.DocumentationRule rules = 3;
Name | Description |
index | int |
builderForValue | DocumentationRule.Builder |
Type | Description |
Documentation.Builder |
setServiceRootUrl(String value)
public Documentation.Builder setServiceRootUrl(String value)
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.
string service_root_url = 6;
Name | Description |
value | String The serviceRootUrl to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setServiceRootUrlBytes(ByteString value)
public Documentation.Builder setServiceRootUrlBytes(ByteString value)
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.
string service_root_url = 6;
Name | Description |
value | ByteString The bytes for serviceRootUrl to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setSummary(String value)
public Documentation.Builder setSummary(String value)
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 field description
.
string summary = 1;
Name | Description |
value | String The summary to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setSummaryBytes(ByteString value)
public Documentation.Builder setSummaryBytes(ByteString value)
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 field description
.
string summary = 1;
Name | Description |
value | ByteString The bytes for summary to set. |
Type | Description |
Documentation.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Documentation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Documentation.Builder |