Class Relation.Builder (0.3.0)

public static final class Relation.Builder extends GeneratedMessage.Builder<Relation.Builder> implements RelationOrBuilder

Defines the relationship between the entity (a) and another entity (b).

Protobuf type google.backstory.Relation

Implements

RelationOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Relation build()
Returns
Type Description
Relation

buildPartial()

public Relation buildPartial()
Returns
Type Description
Relation

clear()

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

clearDirection()

public Relation.Builder clearDirection()

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Returns
Type Description
Relation.Builder

This builder for chaining.

clearEntity()

public Relation.Builder clearEntity()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
Relation.Builder

clearEntityLabel()

public Relation.Builder clearEntityLabel()

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Returns
Type Description
Relation.Builder

This builder for chaining.

clearEntityType()

public Relation.Builder clearEntityType()

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Returns
Type Description
Relation.Builder

This builder for chaining.

clearRelationship()

public Relation.Builder clearRelationship()

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Returns
Type Description
Relation.Builder

This builder for chaining.

clearUid()

public Relation.Builder clearUid()

UID of the relationship.

bytes uid = 5;

Returns
Type Description
Relation.Builder

This builder for chaining.

getDefaultInstanceForType()

public Relation getDefaultInstanceForType()
Returns
Type Description
Relation

getDescriptorForType()

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

getDirection()

public Relation.Directionality getDirection()

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Returns
Type Description
Relation.Directionality

The direction.

getDirectionValue()

public int getDirectionValue()

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Returns
Type Description
int

The enum numeric value on the wire for direction.

getEntity()

public Noun getEntity()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
Noun

The entity.

getEntityBuilder()

public Noun.Builder getEntityBuilder()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
Noun.Builder

getEntityLabel()

public Relation.EntityLabel getEntityLabel()

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Returns
Type Description
Relation.EntityLabel

The entityLabel.

getEntityLabelValue()

public int getEntityLabelValue()

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Returns
Type Description
int

The enum numeric value on the wire for entityLabel.

getEntityOrBuilder()

public NounOrBuilder getEntityOrBuilder()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
NounOrBuilder

getEntityType()

public EntityMetadata.EntityType getEntityType()

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Returns
Type Description
EntityMetadata.EntityType

The entityType.

getEntityTypeValue()

public int getEntityTypeValue()

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for entityType.

getRelationship()

public Relation.Relationship getRelationship()

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Returns
Type Description
Relation.Relationship

The relationship.

getRelationshipValue()

public int getRelationshipValue()

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Returns
Type Description
int

The enum numeric value on the wire for relationship.

getUid()

public ByteString getUid()

UID of the relationship.

bytes uid = 5;

Returns
Type Description
ByteString

The uid.

hasEntity()

public boolean hasEntity()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
boolean

Whether the entity field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEntity(Noun value)

public Relation.Builder mergeEntity(Noun value)

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Parameter
Name Description
value Noun
Returns
Type Description
Relation.Builder

mergeFrom(Relation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDirection(Relation.Directionality value)

public Relation.Builder setDirection(Relation.Directionality value)

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Parameter
Name Description
value Relation.Directionality

The direction to set.

Returns
Type Description
Relation.Builder

This builder for chaining.

setDirectionValue(int value)

public Relation.Builder setDirectionValue(int value)

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Parameter
Name Description
value int

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

Returns
Type Description
Relation.Builder

This builder for chaining.

setEntity(Noun value)

public Relation.Builder setEntity(Noun value)

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Parameter
Name Description
value Noun
Returns
Type Description
Relation.Builder

setEntity(Noun.Builder builderForValue)

public Relation.Builder setEntity(Noun.Builder builderForValue)

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Parameter
Name Description
builderForValue Noun.Builder
Returns
Type Description
Relation.Builder

setEntityLabel(Relation.EntityLabel value)

public Relation.Builder setEntityLabel(Relation.EntityLabel value)

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Parameter
Name Description
value Relation.EntityLabel

The entityLabel to set.

Returns
Type Description
Relation.Builder

This builder for chaining.

setEntityLabelValue(int value)

public Relation.Builder setEntityLabelValue(int value)

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Parameter
Name Description
value int

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

Returns
Type Description
Relation.Builder

This builder for chaining.

setEntityType(EntityMetadata.EntityType value)

public Relation.Builder setEntityType(EntityMetadata.EntityType value)

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Parameter
Name Description
value EntityMetadata.EntityType

The entityType to set.

Returns
Type Description
Relation.Builder

This builder for chaining.

setEntityTypeValue(int value)

public Relation.Builder setEntityTypeValue(int value)

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Parameter
Name Description
value int

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

Returns
Type Description
Relation.Builder

This builder for chaining.

setRelationship(Relation.Relationship value)

public Relation.Builder setRelationship(Relation.Relationship value)

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Parameter
Name Description
value Relation.Relationship

The relationship to set.

Returns
Type Description
Relation.Builder

This builder for chaining.

setRelationshipValue(int value)

public Relation.Builder setRelationshipValue(int value)

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Parameter
Name Description
value int

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

Returns
Type Description
Relation.Builder

This builder for chaining.

setUid(ByteString value)

public Relation.Builder setUid(ByteString value)

UID of the relationship.

bytes uid = 5;

Parameter
Name Description
value ByteString

The uid to set.

Returns
Type Description
Relation.Builder

This builder for chaining.