Class Documentation (2.23.1)

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: &#40;== include google/foo/overview.md ==&#41;
  • name: Tutorial content: &#40;== include google/foo/tutorial.md ==&#41; subpages;
    • name: Java content: &#40;== include google/foo/tutorial_java.md ==&#41; 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>&#91;fully.qualified.proto.name]&#91;]</code></pre> To override the display text used for the link, this can be used: <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre> Text can be excluded from doc using the following notation: <pre><code>&#40;-- internal comment --&#41;</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>&#40;== include path/to/file ==&#41;</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>&#40;== resource_for v1.shelves.books ==&#41;</code></pre> The directive suppress_warning does not directly affect documentation and is documented together with service config validation.

Protobuf type google.api.Documentation

Static Fields

DOCUMENTATION_ROOT_URL_FIELD_NUMBER

public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER
Field Value
TypeDescription
int

OVERVIEW_FIELD_NUMBER

public static final int OVERVIEW_FIELD_NUMBER
Field Value
TypeDescription
int

PAGES_FIELD_NUMBER

public static final int PAGES_FIELD_NUMBER
Field Value
TypeDescription
int

RULES_FIELD_NUMBER

public static final int RULES_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_ROOT_URL_FIELD_NUMBER

public static final int SERVICE_ROOT_URL_FIELD_NUMBER
Field Value
TypeDescription
int

SUMMARY_FIELD_NUMBER

public static final int SUMMARY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Documentation getDefaultInstance()
Returns
TypeDescription
Documentation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Documentation.Builder newBuilder()
Returns
TypeDescription
Documentation.Builder

newBuilder(Documentation prototype)

public static Documentation.Builder newBuilder(Documentation prototype)
Parameter
NameDescription
prototypeDocumentation
Returns
TypeDescription
Documentation.Builder

parseDelimitedFrom(InputStream input)

public static Documentation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Documentation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Documentation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Documentation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Documentation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Documentation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Documentation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Documentation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Documentation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Documentation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Documentation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Documentation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Documentation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Documentation> parser()
Returns
TypeDescription
Parser<Documentation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Documentation getDefaultInstanceForType()
Returns
TypeDescription
Documentation

getDocumentationRootUrl()

public String getDocumentationRootUrl()

The URL to the root of documentation.

string documentation_root_url = 4;

Returns
TypeDescription
String

The documentationRootUrl.

getDocumentationRootUrlBytes()

public ByteString getDocumentationRootUrlBytes()

The URL to the root of documentation.

string documentation_root_url = 4;

Returns
TypeDescription
ByteString

The bytes for documentationRootUrl.

getOverview()

public String getOverview()

Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: &#40;== include overview.md ==&#41; </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:

  • name: Overview content: &#40;== include overview.md ==&#41; </code></pre> Note: you cannot specify both overview field and pages field.

string overview = 2;

Returns
TypeDescription
String

The overview.

getOverviewBytes()

public ByteString getOverviewBytes()

Declares a single overview page. For example: <pre><code>documentation: summary: ... overview: &#40;== include overview.md ==&#41; </code></pre> This is a shortcut for the following declaration (using pages style): <pre><code>documentation: summary: ... pages:

  • name: Overview content: &#40;== include overview.md ==&#41; </code></pre> Note: you cannot specify both overview field and pages field.

string overview = 2;

Returns
TypeDescription
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;

Parameter
NameDescription
indexint
Returns
TypeDescription
Page

getPagesCount()

public int getPagesCount()

The top level pages for the documentation set.

repeated .google.api.Page pages = 5;

Returns
TypeDescription
int

getPagesList()

public List<Page> getPagesList()

The top level pages for the documentation set.

repeated .google.api.Page pages = 5;

Returns
TypeDescription
List<Page>

getPagesOrBuilder(int index)

public PageOrBuilder getPagesOrBuilder(int index)

The top level pages for the documentation set.

repeated .google.api.Page pages = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
PageOrBuilder

getPagesOrBuilderList()

public List<? extends PageOrBuilder> getPagesOrBuilderList()

The top level pages for the documentation set.

repeated .google.api.Page pages = 5;

Returns
TypeDescription
List<? extends com.google.api.PageOrBuilder>

getParserForType()

public Parser<Documentation> getParserForType()
Returns
TypeDescription
Parser<Documentation>
Overrides

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
DocumentationRule

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;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Parameter
NameDescription
indexint
Returns
TypeDescription
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;

Returns
TypeDescription
List<? extends com.google.api.DocumentationRuleOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
ByteString

The bytes for summary.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Documentation.Builder newBuilderForType()
Returns
TypeDescription
Documentation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Documentation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Documentation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Documentation.Builder toBuilder()
Returns
TypeDescription
Documentation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException