Class Document.Builder (0.1.0)

public static final class Document.Builder extends GeneratedMessage.Builder<Document.Builder> implements DocumentOrBuilder

A Document represents a piece of content from the Developer Knowledge corpus.

Protobuf type google.developers.knowledge.v1.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Document build()
Returns
Type Description
Document

buildPartial()

public Document buildPartial()
Returns
Type Description
Document

clear()

public Document.Builder clear()
Returns
Type Description
Document.Builder
Overrides

clearContent()

public Document.Builder clearContent()

Output only. Contains the full content of the document in Markdown format.

string content = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

clearDataSource()

public Document.Builder clearDataSource()

Output only. Specifies the data source of the document. Example data source: firebase.google.com

string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

clearDescription()

public Document.Builder clearDescription()

Output only. Provides a description of the document.

string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

clearName()

public Document.Builder clearName()

Identifier. Contains the resource name of the document. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Document.Builder

This builder for chaining.

clearTitle()

public Document.Builder clearTitle()

Output only. Provides the title of the document.

string title = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

clearUpdateTime()

public Document.Builder clearUpdateTime()

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

clearUri()

public Document.Builder clearUri()

Output only. Provides the URI of the content, such as docs.cloud.google.com/storage/docs/creating-buckets.

string uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

clearView()

public Document.Builder clearView()

Output only. Specifies the DocumentView of the document.

.google.developers.knowledge.v1.DocumentView view = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Document.Builder

This builder for chaining.

getContent()

public String getContent()

Output only. Contains the full content of the document in Markdown format.

string content = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

Output only. Contains the full content of the document in Markdown format.

string content = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for content.

getDataSource()

public String getDataSource()

Output only. Specifies the data source of the document. Example data source: firebase.google.com

string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The dataSource.

getDataSourceBytes()

public ByteString getDataSourceBytes()

Output only. Specifies the data source of the document. Example data source: firebase.google.com

string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for dataSource.

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
Type Description
Document

getDescription()

public String getDescription()

Output only. Provides a description of the document.

string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Output only. Provides a description of the document.

string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Identifier. Contains the resource name of the document. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Contains the resource name of the document. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getTitle()

public String getTitle()

Output only. Provides the title of the document.

string title = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Output only. Provides the title of the document.

string title = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for title.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getUri()

public String getUri()

Output only. Provides the URI of the content, such as docs.cloud.google.com/storage/docs/creating-buckets.

string uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Output only. Provides the URI of the content, such as docs.cloud.google.com/storage/docs/creating-buckets.

string uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uri.

getView()

public DocumentView getView()

Output only. Specifies the DocumentView of the document.

.google.developers.knowledge.v1.DocumentView view = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DocumentView

The view.

getViewValue()

public int getViewValue()

Output only. Specifies the DocumentView of the document.

.google.developers.knowledge.v1.DocumentView view = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for view.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Document other)

public Document.Builder mergeFrom(Document other)
Parameter
Name Description
other Document
Returns
Type Description
Document.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Document.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Document.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Document.Builder mergeUpdateTime(Timestamp value)

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Document.Builder

setContent(String value)

public Document.Builder setContent(String value)

Output only. Contains the full content of the document in Markdown format.

string content = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The content to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setContentBytes(ByteString value)

public Document.Builder setContentBytes(ByteString value)

Output only. Contains the full content of the document in Markdown format.

string content = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setDataSource(String value)

public Document.Builder setDataSource(String value)

Output only. Specifies the data source of the document. Example data source: firebase.google.com

string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The dataSource to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setDataSourceBytes(ByteString value)

public Document.Builder setDataSourceBytes(ByteString value)

Output only. Specifies the data source of the document. Example data source: firebase.google.com

string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for dataSource to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setDescription(String value)

public Document.Builder setDescription(String value)

Output only. Provides a description of the document.

string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Document.Builder setDescriptionBytes(ByteString value)

Output only. Provides a description of the document.

string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setName(String value)

public Document.Builder setName(String value)

Identifier. Contains the resource name of the document. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Document.Builder setNameBytes(ByteString value)

Identifier. Contains the resource name of the document. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setTitle(String value)

public Document.Builder setTitle(String value)

Output only. Provides the title of the document.

string title = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The title to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Document.Builder setTitleBytes(ByteString value)

Output only. Provides the title of the document.

string title = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public Document.Builder setUpdateTime(Timestamp value)

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Document.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Document.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Represents the timestamp when the content or metadata of the document was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Document.Builder

setUri(String value)

public Document.Builder setUri(String value)

Output only. Provides the URI of the content, such as docs.cloud.google.com/storage/docs/creating-buckets.

string uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setUriBytes(ByteString value)

public Document.Builder setUriBytes(ByteString value)

Output only. Provides the URI of the content, such as docs.cloud.google.com/storage/docs/creating-buckets.

string uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setView(DocumentView value)

public Document.Builder setView(DocumentView value)

Output only. Specifies the DocumentView of the document.

.google.developers.knowledge.v1.DocumentView view = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value DocumentView

The view to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setViewValue(int value)

public Document.Builder setViewValue(int value)

Output only. Specifies the DocumentView of the document.

.google.developers.knowledge.v1.DocumentView view = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for view to set.

Returns
Type Description
Document.Builder

This builder for chaining.