Class ParticipantRecordTransactionResponse
-
- All Implemented Interfaces:
public final class ParticipantRecordTransactionResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceParticipantRecordTransactionResponse.VisitorAn interface that defines how to map each variant of ParticipantRecordTransactionResponse to a value of type T.
public final classParticipantRecordTransactionResponse.UnionMember0public final classParticipantRecordTransactionResponse.UnionMember1
-
Method Summary
-
-
Method Detail
-
unionMember0
final Optional<ParticipantRecordTransactionResponse.UnionMember0> unionMember0()
-
unionMember1
final Optional<ParticipantRecordTransactionResponse.UnionMember1> unionMember1()
-
isUnionMember0
final Boolean isUnionMember0()
-
isUnionMember1
final Boolean isUnionMember1()
-
asUnionMember0
final ParticipantRecordTransactionResponse.UnionMember0 asUnionMember0()
-
asUnionMember1
final ParticipantRecordTransactionResponse.UnionMember1 asUnionMember1()
-
accept
final <T extends Any> T accept(ParticipantRecordTransactionResponse.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.growsurf.api.core.JsonValue; import java.util.Optional; Optional<String> result = participantRecordTransactionResponse.accept(new ParticipantRecordTransactionResponse.Visitor<Optional<String>>() { @Override public Optional<String> visitUnionMember0(UnionMember0 unionMember0) { return Optional.of(unionMember0.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final ParticipantRecordTransactionResponse validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofUnionMember0
final static ParticipantRecordTransactionResponse ofUnionMember0(ParticipantRecordTransactionResponse.UnionMember0 unionMember0)
-
ofUnionMember1
final static ParticipantRecordTransactionResponse ofUnionMember1(ParticipantRecordTransactionResponse.UnionMember1 unionMember1)
-
-
-
-