Package com.google.api
Class Documentation
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.api.Documentation
-
- All Implemented Interfaces:
DocumentationOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.io.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 typegoogle.api.Documentation
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Documentation.Builder
`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.GeneratedMessage.ExtendableMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
-
-
Field Summary
Fields Modifier and Type Field 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
SERVICE_ROOT_URL_FIELD_NUMBER
static int
SUMMARY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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
getServiceRootUrl()
Specifies the service root url if the default one (the service name from the yaml file) is not suitable.com.google.protobuf.ByteString
getServiceRootUrlBytes()
Specifies the service root url if the default one (the service name from the yaml file) is not suitable.java.lang.String
getSummary()
A short description of what the service does.com.google.protobuf.ByteString
getSummaryBytes()
A short description of what the service does.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)
protected java.lang.Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
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(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 Documentation
parseFrom(java.nio.ByteBuffer data)
static Documentation
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Documentation>
parser()
Documentation.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, newExtensionSerializer, newExtensionWriter, newMessageSetExtensionSerializer, newMessageSetExtensionWriter
-
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, getUnknownFields, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SUMMARY_FIELD_NUMBER
public static final int SUMMARY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PAGES_FIELD_NUMBER
public static final int PAGES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RULES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOCUMENTATION_ROOT_URL_FIELD_NUMBER
public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SERVICE_ROOT_URL_FIELD_NUMBER
public static final int SERVICE_ROOT_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
OVERVIEW_FIELD_NUMBER
public static final int OVERVIEW_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getSummary
public java.lang.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;
- Specified by:
getSummary
in 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:
getSummaryBytes
in interfaceDocumentationOrBuilder
- Returns:
- The bytes for summary.
-
getPagesList
public java.util.List<Page> getPagesList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
- Specified by:
getPagesList
in interfaceDocumentationOrBuilder
-
getPagesOrBuilderList
public java.util.List<? extends PageOrBuilder> getPagesOrBuilderList()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
- Specified by:
getPagesOrBuilderList
in interfaceDocumentationOrBuilder
-
getPagesCount
public int getPagesCount()
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
- Specified by:
getPagesCount
in interfaceDocumentationOrBuilder
-
getPages
public Page getPages(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
- Specified by:
getPages
in interfaceDocumentationOrBuilder
-
getPagesOrBuilder
public PageOrBuilder getPagesOrBuilder(int index)
The top level pages for the documentation set.
repeated .google.api.Page pages = 5;
- Specified by:
getPagesOrBuilder
in interfaceDocumentationOrBuilder
-
getRulesList
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;
- Specified by:
getRulesList
in interfaceDocumentationOrBuilder
-
getRulesOrBuilderList
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;
- Specified by:
getRulesOrBuilderList
in 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:
getRulesCount
in interfaceDocumentationOrBuilder
-
getRules
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;
- Specified by:
getRules
in interfaceDocumentationOrBuilder
-
getRulesOrBuilder
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;
- Specified by:
getRulesOrBuilder
in interfaceDocumentationOrBuilder
-
getDocumentationRootUrl
public java.lang.String getDocumentationRootUrl()
The URL to the root of documentation.
string documentation_root_url = 4;
- Specified by:
getDocumentationRootUrl
in 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:
getDocumentationRootUrlBytes
in interfaceDocumentationOrBuilder
- Returns:
- The bytes for documentationRootUrl.
-
getServiceRootUrl
public java.lang.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;
- Specified by:
getServiceRootUrl
in 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:
getServiceRootUrlBytes
in interfaceDocumentationOrBuilder
- Returns:
- The bytes for serviceRootUrl.
-
getOverview
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;
- Specified by:
getOverview
in 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:
getOverviewBytes
in interfaceDocumentationOrBuilder
- Returns:
- The bytes for overview.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Documentation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Documentation parseFrom(java.nio.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
public static Documentation parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Documentation parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Documentation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Documentation parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Documentation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Documentation.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Documentation.Builder newBuilder()
-
newBuilder
public static Documentation.Builder newBuilder(Documentation prototype)
-
toBuilder
public Documentation.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Documentation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Documentation getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Documentation> parser()
-
getParserForType
public com.google.protobuf.Parser<Documentation> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public Documentation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-