Class DocumentLink.Builder (0.38.0)

public static final class DocumentLink.Builder extends GeneratedMessageV3.Builder<DocumentLink.Builder> implements DocumentLinkOrBuilder

A document-link between source and target document.

Protobuf type google.cloud.contentwarehouse.v1.DocumentLink

Static Methods

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

Methods

public DocumentLink.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink build()
Returns
Type Description
DocumentLink
public DocumentLink buildPartial()
Returns
Type Description
DocumentLink
public DocumentLink.Builder clear()
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder clearCreateTime()

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder clearDescription()

Description of this document-link.

string description = 4;

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder clearName()

Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.

string name = 1;

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder clearSourceDocumentReference()

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder clearState()

The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.

.google.cloud.contentwarehouse.v1.DocumentLink.State state = 7;

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder clearTargetDocumentReference()

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder clearUpdateTime()

Output only. The time when the documentLink is last updated.

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

Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder clone()
Returns
Type Description
DocumentLink.Builder
Overrides
public Timestamp getCreateTime()

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder
public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder
public DocumentLink getDefaultInstanceForType()
Returns
Type Description
DocumentLink
public String getDescription()

Description of this document-link.

string description = 4;

Returns
Type Description
String

The description.

public ByteString getDescriptionBytes()

Description of this document-link.

string description = 4;

Returns
Type Description
ByteString

The bytes for description.

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

Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.

string name = 1;

Returns
Type Description
String

The name.

public ByteString getNameBytes()

Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

public DocumentReference getSourceDocumentReference()

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Returns
Type Description
DocumentReference

The sourceDocumentReference.

public DocumentReference.Builder getSourceDocumentReferenceBuilder()

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Returns
Type Description
DocumentReference.Builder
public DocumentReferenceOrBuilder getSourceDocumentReferenceOrBuilder()

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Returns
Type Description
DocumentReferenceOrBuilder
public DocumentLink.State getState()

The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.

.google.cloud.contentwarehouse.v1.DocumentLink.State state = 7;

Returns
Type Description
DocumentLink.State

The state.

public int getStateValue()

The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.

.google.cloud.contentwarehouse.v1.DocumentLink.State state = 7;

Returns
Type Description
int

The enum numeric value on the wire for state.

public DocumentReference getTargetDocumentReference()

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Returns
Type Description
DocumentReference

The targetDocumentReference.

public DocumentReference.Builder getTargetDocumentReferenceBuilder()

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Returns
Type Description
DocumentReference.Builder
public DocumentReferenceOrBuilder getTargetDocumentReferenceOrBuilder()

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Returns
Type Description
DocumentReferenceOrBuilder
public Timestamp getUpdateTime()

Output only. The time when the documentLink is last updated.

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

Returns
Type Description
Timestamp

The updateTime.

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the documentLink is last updated.

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

Returns
Type Description
Builder
public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the documentLink is last updated.

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

Returns
Type Description
TimestampOrBuilder
public boolean hasCreateTime()

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

public boolean hasSourceDocumentReference()

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Returns
Type Description
boolean

Whether the sourceDocumentReference field is set.

public boolean hasTargetDocumentReference()

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Returns
Type Description
boolean

Whether the targetDocumentReference field is set.

public boolean hasUpdateTime()

Output only. The time when the documentLink is last updated.

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

Returns
Type Description
boolean

Whether the updateTime field is set.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public DocumentLink.Builder mergeCreateTime(Timestamp value)

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder mergeFrom(DocumentLink other)
Parameter
Name Description
other DocumentLink
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DocumentLink.Builder
Overrides
Exceptions
Type Description
IOException
public DocumentLink.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder mergeSourceDocumentReference(DocumentReference value)

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Parameter
Name Description
value DocumentReference
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder mergeTargetDocumentReference(DocumentReference value)

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Parameter
Name Description
value DocumentReference
Returns
Type Description
DocumentLink.Builder
public final DocumentLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the documentLink is last updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setCreateTime(Timestamp value)

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the documentLink is created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setDescription(String value)

Description of this document-link.

string description = 4;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setDescriptionBytes(ByteString value)

Description of this document-link.

string description = 4;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder setName(String value)

Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setNameBytes(ByteString value)

Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder setSourceDocumentReference(DocumentReference value)

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Parameter
Name Description
value DocumentReference
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setSourceDocumentReference(DocumentReference.Builder builderForValue)

Document references of the source document.

.google.cloud.contentwarehouse.v1.DocumentReference source_document_reference = 2;

Parameter
Name Description
builderForValue DocumentReference.Builder
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setState(DocumentLink.State value)

The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.

.google.cloud.contentwarehouse.v1.DocumentLink.State state = 7;

Parameter
Name Description
value DocumentLink.State

The state to set.

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setStateValue(int value)

The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.

.google.cloud.contentwarehouse.v1.DocumentLink.State state = 7;

Parameter
Name Description
value int

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

Returns
Type Description
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setTargetDocumentReference(DocumentReference value)

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Parameter
Name Description
value DocumentReference
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setTargetDocumentReference(DocumentReference.Builder builderForValue)

Document references of the target document.

.google.cloud.contentwarehouse.v1.DocumentReference target_document_reference = 3;

Parameter
Name Description
builderForValue DocumentReference.Builder
Returns
Type Description
DocumentLink.Builder
public final DocumentLink.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DocumentLink.Builder
Overrides
public DocumentLink.Builder setUpdateTime(Timestamp value)

Output only. The time when the documentLink is last updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentLink.Builder
public DocumentLink.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the documentLink is last updated.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DocumentLink.Builder