Class DocumentRetreiveResponse
-
- All Implemented Interfaces:
public final class DocumentRetreiveResponseA 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDocumentRetreiveResponse.VisitorAn interface that defines how to map each variant of DocumentRetreiveResponse to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<W42020>w42020()A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. final Optional<W42005>w42005()A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. final BooleanisW42020()final BooleanisW42005()final W42020asW42020()A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. final W42005asW42005()A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. final Optional<JsonValue>_json()final <T extends Any> Taccept(DocumentRetreiveResponse.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final DocumentRetreiveResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static DocumentRetreiveResponseofW42020(W42020 w42020)A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. final static DocumentRetreiveResponseofW42005(W42005 w42005)A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details. -
-
Method Detail
-
w42020
final Optional<W42020> w42020()
A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
w42005
final Optional<W42005> w42005()
A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
asW42020
final W42020 asW42020()
A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
asW42005
final W42005 asW42005()
A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
accept
final <T extends Any> T accept(DocumentRetreiveResponse.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 = documentRetreiveResponse.accept(new DocumentRetreiveResponse.Visitor<Optional<String>>() { @Override public Optional<String> visitW42020(W42020 w42020) { return Optional.of(w42020.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final DocumentRetreiveResponse 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.
-
ofW42020
final static DocumentRetreiveResponse ofW42020(W42020 w42020)
A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
ofW42005
final static DocumentRetreiveResponse ofW42005(W42005 w42005)
A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.
-
-
-
-