Package com.tryfinch.api.models
Class RequestForwardingForwardResponse.Request.Data
-
- All Implemented Interfaces:
public final class RequestForwardingForwardResponse.Request.DataThe body that was specified for the forwarded request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRequestForwardingForwardResponse.Request.Data.VisitorAn interface that defines how to map each variant of Data to a value of type T.
public final classRequestForwardingForwardResponse.Request.Data.UnionMember1
-
Method Summary
-
-
Method Detail
-
unionMember1
final Optional<RequestForwardingForwardResponse.Request.Data.UnionMember1> unionMember1()
-
isUnionMember1
final Boolean isUnionMember1()
-
asUnionMember1
final RequestForwardingForwardResponse.Request.Data.UnionMember1 asUnionMember1()
-
accept
final <T extends Any> T accept(RequestForwardingForwardResponse.Request.Data.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.tryfinch.api.core.JsonValue; import java.util.Optional; Optional<String> result = data.accept(new Data.Visitor<Optional<String>>() { @Override public Optional<String> visitString(String string) { return Optional.of(string.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final RequestForwardingForwardResponse.Request.Data 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.
-
ofString
final static RequestForwardingForwardResponse.Request.Data ofString(String string)
-
ofUnionMember1
final static RequestForwardingForwardResponse.Request.Data ofUnionMember1(RequestForwardingForwardResponse.Request.Data.UnionMember1 unionMember1)
-
-
-
-