Package com.google.api
Class Documentation
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.api.Documentation
- All Implemented Interfaces:
DocumentationOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class`Documentation` provides the information for describing a service.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Documentationstatic final com.google.protobuf.Descriptors.DescriptorThe URL to the root of documentation.com.google.protobuf.ByteStringThe URL to the root of documentation.Declares a single overview page.com.google.protobuf.ByteStringDeclares a single overview page.getPages(int index) The top level pages for the documentation set.intThe top level pages for the documentation set.The top level pages for the documentation set.getPagesOrBuilder(int index) The top level pages for the documentation set.List<? extends PageOrBuilder>The top level pages for the documentation set.com.google.protobuf.Parser<Documentation>getRules(int index) A list of documentation rules that apply to individual API elements.intA list of documentation rules that apply to individual API elements.A list of documentation rules that apply to individual API elements.getRulesOrBuilder(int index) A list of documentation rules that apply to individual API elements.List<? extends DocumentationRuleOrBuilder>A list of documentation rules that apply to individual API elements.intSpecifies the service root url if the default one (the service name from the yaml file) is not suitable.com.google.protobuf.ByteStringSpecifies the service root url if the default one (the service name from the yaml file) is not suitable.A short description of what the service does.com.google.protobuf.ByteStringA short description of what the service does.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic Documentation.Builderstatic Documentation.BuildernewBuilder(Documentation prototype) protected Documentation.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static DocumentationparseDelimitedFrom(InputStream input) static DocumentationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DocumentationparseFrom(byte[] data) static DocumentationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DocumentationparseFrom(com.google.protobuf.ByteString data) static DocumentationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DocumentationparseFrom(com.google.protobuf.CodedInputStream input) static DocumentationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DocumentationparseFrom(InputStream input) static DocumentationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DocumentationparseFrom(ByteBuffer data) static DocumentationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Documentation>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
SUMMARY_FIELD_NUMBER
public static final int SUMMARY_FIELD_NUMBER- See Also:
-
PAGES_FIELD_NUMBER
public static final int PAGES_FIELD_NUMBER- See Also:
-
RULES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER- See Also:
-
DOCUMENTATION_ROOT_URL_FIELD_NUMBER
public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER- See Also:
-
SERVICE_ROOT_URL_FIELD_NUMBER
public static final int SERVICE_ROOT_URL_FIELD_NUMBER- See Also:
-
OVERVIEW_FIELD_NUMBER
public static final int OVERVIEW_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
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;- Specified by:
getSummaryin interfaceDocumentationOrBuilder- Returns:
- The summary.
-
getSummaryBytes
public com.google.protobuf.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;- Specified by:
getSummaryBytesin interfaceDocumentationOrBuilder- Returns:
- The bytes for summary.
-
getPagesList
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;- Specified by:
getPagesListin interfaceDocumentationOrBuilder
-
getPagesOrBuilderList
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;- Specified by:
getPagesOrBuilderListin interfaceDocumentationOrBuilder
-
getPagesCount
public int getPagesCount()The top level pages for the documentation set.
repeated .google.api.Page pages = 5;- Specified by:
getPagesCountin interfaceDocumentationOrBuilder
-
getPages
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;- Specified by:
getPagesin interfaceDocumentationOrBuilder
-
getPagesOrBuilder
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;- Specified by:
getPagesOrBuilderin interfaceDocumentationOrBuilder
-
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;- Specified by:
getRulesListin interfaceDocumentationOrBuilder
-
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;- Specified by:
getRulesOrBuilderListin interfaceDocumentationOrBuilder
-
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;- Specified by:
getRulesCountin interfaceDocumentationOrBuilder
-
getRules
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;- Specified by:
getRulesin interfaceDocumentationOrBuilder
-
getRulesOrBuilder
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;- Specified by:
getRulesOrBuilderin interfaceDocumentationOrBuilder
-
getDocumentationRootUrl
The URL to the root of documentation.
string documentation_root_url = 4;- Specified by:
getDocumentationRootUrlin interfaceDocumentationOrBuilder- Returns:
- The documentationRootUrl.
-
getDocumentationRootUrlBytes
public com.google.protobuf.ByteString getDocumentationRootUrlBytes()The URL to the root of documentation.
string documentation_root_url = 4;- Specified by:
getDocumentationRootUrlBytesin interfaceDocumentationOrBuilder- Returns:
- The bytes for documentationRootUrl.
-
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;- Specified by:
getServiceRootUrlin interfaceDocumentationOrBuilder- Returns:
- The serviceRootUrl.
-
getServiceRootUrlBytes
public com.google.protobuf.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;- Specified by:
getServiceRootUrlBytesin interfaceDocumentationOrBuilder- Returns:
- The bytes for serviceRootUrl.
-
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;- Specified by:
getOverviewin interfaceDocumentationOrBuilder- Returns:
- The overview.
-
getOverviewBytes
public 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;- Specified by:
getOverviewBytesin interfaceDocumentationOrBuilder- Returns:
- The bytes for overview.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Documentation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Documentation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Documentation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Documentation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-