Class DocumentLink.Builder (0.37.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
TypeDescription
Descriptor

Methods

public DocumentLink.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DocumentLink.Builder
Overrides
public DocumentLink build()
Returns
TypeDescription
DocumentLink
public DocumentLink buildPartial()
Returns
TypeDescription
DocumentLink
public DocumentLink.Builder clear()
Returns
TypeDescription
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
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder clearDescription()

Description of this document-link.

string description = 4;

Returns
TypeDescription
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DocumentLink.Builder
Overrides
public DocumentLink.Builder clearSourceDocumentReference()

Document references of the source document.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder
public DocumentLink getDefaultInstanceForType()
Returns
TypeDescription
DocumentLink
public String getDescription()

Description of this document-link.

string description = 4;

Returns
TypeDescription
String

The description.

public ByteString getDescriptionBytes()

Description of this document-link.

string description = 4;

Returns
TypeDescription
ByteString

The bytes for description.

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

public DocumentReference getSourceDocumentReference()

Document references of the source document.

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

Returns
TypeDescription
DocumentReference

The sourceDocumentReference.

public DocumentReference.Builder getSourceDocumentReferenceBuilder()

Document references of the source document.

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

Returns
TypeDescription
DocumentReference.Builder
public DocumentReferenceOrBuilder getSourceDocumentReferenceOrBuilder()

Document references of the source document.

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

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

The targetDocumentReference.

public DocumentReference.Builder getTargetDocumentReferenceBuilder()

Document references of the target document.

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

Returns
TypeDescription
DocumentReference.Builder
public DocumentReferenceOrBuilder getTargetDocumentReferenceOrBuilder()

Document references of the target document.

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

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

Whether the updateTime field is set.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder mergeFrom(DocumentLink other)
Parameter
NameDescription
otherDocumentLink
Returns
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentLink.Builder
Overrides
Exceptions
TypeDescription
IOException
public DocumentLink.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueDocumentReference
Returns
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder mergeTargetDocumentReference(DocumentReference value)

Document references of the target document.

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

Parameter
NameDescription
valueDocumentReference
Returns
TypeDescription
DocumentLink.Builder
public final DocumentLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
DocumentLink.Builder
public DocumentLink.Builder setDescription(String value)

Description of this document-link.

string description = 4;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setDescriptionBytes(ByteString value)

Description of this document-link.

string description = 4;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
DocumentLink.Builder

This builder for chaining.

public DocumentLink.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueDocumentReference
Returns
TypeDescription
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
NameDescription
builderForValueDocumentReference.Builder
Returns
TypeDescription
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
NameDescription
valueDocumentLink.State

The state to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueDocumentReference
Returns
TypeDescription
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
NameDescription
builderForValueDocumentReference.Builder
Returns
TypeDescription
DocumentLink.Builder
public final DocumentLink.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
DocumentLink.Builder