public final class Documentation extends 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.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, 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 |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static Documentation |
getDefaultInstance() |
Documentation |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getDocumentationRootUrl()
The URL to the root of documentation.
|
ByteString |
getDocumentationRootUrlBytes()
The URL to the root of documentation.
|
java.lang.String |
getOverview()
Declares a single overview page.
|
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.
|
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.
|
ByteString |
getSummaryBytes()
A short summary of what the service does.
|
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Documentation.Builder |
newBuilder() |
static Documentation.Builder |
newBuilder(Documentation prototype) |
Documentation.Builder |
newBuilderForType() |
protected Documentation.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Documentation |
parseDelimitedFrom(java.io.InputStream input) |
static Documentation |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(byte[] data) |
static Documentation |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(java.nio.ByteBuffer data) |
static Documentation |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(ByteString data) |
static Documentation |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(CodedInputStream input) |
static Documentation |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Documentation |
parseFrom(java.io.InputStream input) |
static Documentation |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Documentation> |
parser() |
Documentation.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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 UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public 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 DocumentationOrBuilder
public ByteString getSummaryBytes()
A short summary of what the service does. Can only be provided by plain text.
string summary = 1;
getSummaryBytes
in interface DocumentationOrBuilder
public java.util.List<Page> getPagesList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
getPagesList
in interface DocumentationOrBuilder
public java.util.List<? extends PageOrBuilder> getPagesOrBuilderList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
getPagesOrBuilderList
in interface DocumentationOrBuilder
public int getPagesCount()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
getPagesCount
in interface DocumentationOrBuilder
public Page getPages(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
getPages
in interface DocumentationOrBuilder
public PageOrBuilder getPagesOrBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
getPagesOrBuilder
in interface DocumentationOrBuilder
public 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 DocumentationOrBuilder
public 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 DocumentationOrBuilder
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;
getRulesCount
in interface DocumentationOrBuilder
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;
getRules
in interface DocumentationOrBuilder
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;
getRulesOrBuilder
in interface DocumentationOrBuilder
public java.lang.String getDocumentationRootUrl()
The URL to the root of documentation.
string documentation_root_url = 4;
getDocumentationRootUrl
in interface DocumentationOrBuilder
public ByteString getDocumentationRootUrlBytes()
The URL to the root of documentation.
string documentation_root_url = 4;
getDocumentationRootUrlBytes
in interface DocumentationOrBuilder
public 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 DocumentationOrBuilder
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 and `pages` field.
string overview = 2;
getOverviewBytes
in interface DocumentationOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Documentation parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Documentation parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Documentation parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Documentation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Documentation parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Documentation parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Documentation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Documentation.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Documentation.Builder newBuilder()
public static Documentation.Builder newBuilder(Documentation prototype)
public Documentation.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Documentation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Documentation getDefaultInstance()
public static Parser<Documentation> parser()
public Parser<Documentation> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Documentation getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder