public final class Documentation extends com.google.protobuf.GeneratedMessageV3 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>
The `resource_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 directive `suppress_warning` does not directly affect documentation
and is documented together with service config validation.
Protobuf type google.api.Documentation| Modifier and Type | Class and Description |
|---|---|
static class |
Documentation.Builder
`Documentation` provides the information for describing a service.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
DOCUMENTATION_ROOT_URL_FIELD_NUMBER |
static int |
OVERVIEW_FIELD_NUMBER |
static int |
PAGES_FIELD_NUMBER |
static int |
RULES_FIELD_NUMBER |
static int |
SUMMARY_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static Documentation |
getDefaultInstance() |
Documentation |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getDocumentationRootUrl()
The URL to the root of documentation.
|
com.google.protobuf.ByteString |
getDocumentationRootUrlBytes()
The URL to the root of documentation.
|
java.lang.String |
getOverview()
Declares a single overview page.
|
com.google.protobuf.ByteString |
getOverviewBytes()
Declares a single overview page.
|
Page |
getPages(int index)
The top level pages for the documentation set.
|
int |
getPagesCount()
The top level pages for the documentation set.
|
java.util.List<Page> |
getPagesList()
The top level pages for the documentation set.
|
PageOrBuilder |
getPagesOrBuilder(int index)
The top level pages for the documentation set.
|
java.util.List<? extends PageOrBuilder> |
getPagesOrBuilderList()
The top level pages for the documentation set.
|
com.google.protobuf.Parser<Documentation> |
getParserForType() |
DocumentationRule |
getRules(int index)
A list of documentation rules that apply to individual API elements.
|
int |
getRulesCount()
A list of documentation rules that apply to individual API elements.
|
java.util.List<DocumentationRule> |
getRulesList()
A list of documentation rules that apply to individual API elements.
|
DocumentationRuleOrBuilder |
getRulesOrBuilder(int index)
A list of documentation rules that apply to individual API elements.
|
java.util.List<? extends DocumentationRuleOrBuilder> |
getRulesOrBuilderList()
A list of documentation rules that apply to individual API elements.
|
int |
getSerializedSize() |
java.lang.String |
getSummary()
A short summary of what the service does.
|
com.google.protobuf.ByteString |
getSummaryBytes()
A short summary of what the service does.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Documentation.Builder |
newBuilder() |
static Documentation.Builder |
newBuilder(Documentation prototype) |
Documentation.Builder |
newBuilderForType() |
protected Documentation.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Documentation |
parseDelimitedFrom(java.io.InputStream input) |
static Documentation |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(byte[] data) |
static Documentation |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(java.nio.ByteBuffer data) |
static Documentation |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(com.google.protobuf.ByteString data) |
static Documentation |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Documentation |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(java.io.InputStream input) |
static Documentation |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Documentation> |
parser() |
Documentation.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int SUMMARY_FIELD_NUMBER
public static final int PAGES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER
public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER
public static final int OVERVIEW_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public java.lang.String getSummary()
A short summary of what the service does. Can only be provided by plain text.
string summary = 1;getSummary in interface DocumentationOrBuilderpublic com.google.protobuf.ByteString getSummaryBytes()
A short summary of what the service does. Can only be provided by plain text.
string summary = 1;getSummaryBytes in interface DocumentationOrBuilderpublic java.util.List<Page> getPagesList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;getPagesList in interface DocumentationOrBuilderpublic java.util.List<? extends PageOrBuilder> getPagesOrBuilderList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;getPagesOrBuilderList in interface DocumentationOrBuilderpublic int getPagesCount()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;getPagesCount in interface DocumentationOrBuilderpublic Page getPages(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;getPages in interface DocumentationOrBuilderpublic PageOrBuilder getPagesOrBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;getPagesOrBuilder in interface DocumentationOrBuilderpublic java.util.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;getRulesList in interface DocumentationOrBuilderpublic java.util.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;getRulesOrBuilderList in interface DocumentationOrBuilderpublic 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;getRulesCount in interface DocumentationOrBuilderpublic 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;getRules in interface DocumentationOrBuilderpublic 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;getRulesOrBuilder in interface DocumentationOrBuilderpublic java.lang.String getDocumentationRootUrl()
The URL to the root of documentation.
string documentation_root_url = 4;getDocumentationRootUrl in interface DocumentationOrBuilderpublic com.google.protobuf.ByteString getDocumentationRootUrlBytes()
The URL to the root of documentation.
string documentation_root_url = 4;getDocumentationRootUrlBytes in interface DocumentationOrBuilderpublic java.lang.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 and `pages` field.
string overview = 2;getOverview in interface DocumentationOrBuilderpublic com.google.protobuf.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 and `pages` field.
string overview = 2;getOverviewBytes in interface DocumentationOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Documentation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Documentation parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Documentation parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Documentation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Documentation parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Documentation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Documentation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Documentation.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Documentation.Builder newBuilder()
public static Documentation.Builder newBuilder(Documentation prototype)
public Documentation.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Documentation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Documentation getDefaultInstance()
public static com.google.protobuf.Parser<Documentation> parser()
public com.google.protobuf.Parser<Documentation> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Documentation getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder