@Generated(value="software.amazon.awssdk:codegen") public final class Relationship extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Relationship.Builder,Relationship>
Information about how blocks are related to each other. A Block
object contains 0 or more
Relation
objects in a list, Relationships
. For more information, see Block.
The Type
element provides the type of the relationship for all blocks in the IDs
array.
Modifier and Type | Class and Description |
---|---|
static interface |
Relationship.Builder |
Modifier and Type | Method and Description |
---|---|
static Relationship.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasIds()
Returns true if the Ids property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
List<String> |
ids()
An array of IDs for related blocks.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Relationship.Builder> |
serializableBuilderClass() |
Relationship.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
RelationshipType |
type()
The type of relationship that the blocks in the IDs array have with the current block.
|
String |
typeAsString()
The type of relationship that the blocks in the IDs array have with the current block.
|
copy
public final RelationshipType type()
The type of relationship that the blocks in the IDs array have with the current block. The relationship can be
VALUE
or CHILD
. A relationship of type VALUE is a list that contains the ID of the
VALUE block that's associated with the KEY of a key-value pair. A relationship of type CHILD is a list of IDs
that identify WORD blocks in the case of lines Cell blocks in the case of Tables, and WORD blocks in the case of
Selection Elements.
If the service returns an enum value that is not available in the current SDK version, type
will return
RelationshipType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
VALUE
or CHILD
. A relationship of type VALUE is a list that contains the
ID of the VALUE block that's associated with the KEY of a key-value pair. A relationship of type CHILD is
a list of IDs that identify WORD blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.RelationshipType
public final String typeAsString()
The type of relationship that the blocks in the IDs array have with the current block. The relationship can be
VALUE
or CHILD
. A relationship of type VALUE is a list that contains the ID of the
VALUE block that's associated with the KEY of a key-value pair. A relationship of type CHILD is a list of IDs
that identify WORD blocks in the case of lines Cell blocks in the case of Tables, and WORD blocks in the case of
Selection Elements.
If the service returns an enum value that is not available in the current SDK version, type
will return
RelationshipType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
VALUE
or CHILD
. A relationship of type VALUE is a list that contains the
ID of the VALUE block that's associated with the KEY of a key-value pair. A relationship of type CHILD is
a list of IDs that identify WORD blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.RelationshipType
public final boolean hasIds()
public final List<String> ids()
An array of IDs for related blocks. You can get the type of the relationship from the Type
element.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasIds()
to see if a value was sent in this field.
Type
element.public Relationship.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Relationship.Builder,Relationship>
public static Relationship.Builder builder()
public static Class<? extends Relationship.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.