
com.adyen.model.transferwebhooks.BankAccountV3AccountIdentification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Transfer webhooks
*
* The version of the OpenAPI document: 4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.transferwebhooks;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.transferwebhooks.AULocalAccountIdentification;
import com.adyen.model.transferwebhooks.AdditionalBankIdentification;
import com.adyen.model.transferwebhooks.BRLocalAccountIdentification;
import com.adyen.model.transferwebhooks.CALocalAccountIdentification;
import com.adyen.model.transferwebhooks.CZLocalAccountIdentification;
import com.adyen.model.transferwebhooks.DKLocalAccountIdentification;
import com.adyen.model.transferwebhooks.HKLocalAccountIdentification;
import com.adyen.model.transferwebhooks.HULocalAccountIdentification;
import com.adyen.model.transferwebhooks.IbanAccountIdentification;
import com.adyen.model.transferwebhooks.NOLocalAccountIdentification;
import com.adyen.model.transferwebhooks.NZLocalAccountIdentification;
import com.adyen.model.transferwebhooks.NumberAndBicAccountIdentification;
import com.adyen.model.transferwebhooks.PLLocalAccountIdentification;
import com.adyen.model.transferwebhooks.SELocalAccountIdentification;
import com.adyen.model.transferwebhooks.SGLocalAccountIdentification;
import com.adyen.model.transferwebhooks.UKLocalAccountIdentification;
import com.adyen.model.transferwebhooks.USLocalAccountIdentification;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
@JsonDeserialize(using = BankAccountV3AccountIdentification.BankAccountV3AccountIdentificationDeserializer.class)
@JsonSerialize(using = BankAccountV3AccountIdentification.BankAccountV3AccountIdentificationSerializer.class)
public class BankAccountV3AccountIdentification extends AbstractOpenApiSchema {
private static final Logger log = Logger.getLogger(BankAccountV3AccountIdentification.class.getName());
public static class BankAccountV3AccountIdentificationSerializer extends StdSerializer {
public BankAccountV3AccountIdentificationSerializer(Class t) {
super(t);
}
public BankAccountV3AccountIdentificationSerializer() {
this(null);
}
@Override
public void serialize(BankAccountV3AccountIdentification value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
jgen.writeObject(value.getActualInstance());
}
}
public static class BankAccountV3AccountIdentificationDeserializer extends StdDeserializer {
public BankAccountV3AccountIdentificationDeserializer() {
this(BankAccountV3AccountIdentification.class);
}
public BankAccountV3AccountIdentificationDeserializer(Class> vc) {
super(vc);
}
@Override
public BankAccountV3AccountIdentification deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
JsonNode tree = jp.readValueAsTree();
Object deserialized = null;
boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
int match = 0;
JsonToken token = tree.traverse(jp.getCodec()).nextToken();
// deserialize AULocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(AULocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(AULocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'AULocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'AULocalAccountIdentification'", e);
}
// deserialize BRLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(BRLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'BRLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'BRLocalAccountIdentification'", e);
}
// deserialize CALocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(CALocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(CALocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'CALocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'CALocalAccountIdentification'", e);
}
// deserialize CZLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(CZLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'CZLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'CZLocalAccountIdentification'", e);
}
// deserialize DKLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(DKLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'DKLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'DKLocalAccountIdentification'", e);
}
// deserialize HKLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(HKLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'HKLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'HKLocalAccountIdentification'", e);
}
// deserialize HULocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(HULocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(HULocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'HULocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'HULocalAccountIdentification'", e);
}
// deserialize IbanAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(IbanAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(IbanAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'IbanAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'IbanAccountIdentification'", e);
}
// deserialize NOLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(NOLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'NOLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'NOLocalAccountIdentification'", e);
}
// deserialize NZLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(NZLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'NZLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'NZLocalAccountIdentification'", e);
}
// deserialize NumberAndBicAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(NumberAndBicAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'NumberAndBicAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'NumberAndBicAccountIdentification'", e);
}
// deserialize PLLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(PLLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'PLLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'PLLocalAccountIdentification'", e);
}
// deserialize SELocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(SELocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(SELocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'SELocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'SELocalAccountIdentification'", e);
}
// deserialize SGLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(SGLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'SGLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'SGLocalAccountIdentification'", e);
}
// deserialize UKLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(UKLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'UKLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'UKLocalAccountIdentification'", e);
}
// deserialize USLocalAccountIdentification
try {
boolean attemptParsing = true;
if (attemptParsing) {
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
boolean typeMatch = Arrays.stream(USLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
if(typeMatch) {
deserialized = tree.traverse(jp.getCodec()).readValueAs(USLocalAccountIdentification.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
match++;
log.log(Level.FINER, "Input data matches schema 'USLocalAccountIdentification'");
}
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'USLocalAccountIdentification'", e);
}
if (match == 1) {
BankAccountV3AccountIdentification ret = new BankAccountV3AccountIdentification();
ret.setActualInstance(deserialized);
return ret;
}
throw new IOException(String.format("Failed deserialization for BankAccountV3AccountIdentification: %d classes match result, expected 1", match));
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public BankAccountV3AccountIdentification getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "BankAccountV3AccountIdentification cannot be null");
}
}
// store a list of schema names defined in oneOf
public static final Map> schemas = new HashMap<>();
public BankAccountV3AccountIdentification() {
super("oneOf", Boolean.FALSE);
}
public BankAccountV3AccountIdentification(AULocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(BRLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(CALocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(CZLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(DKLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(HKLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(HULocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(IbanAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(NOLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(NZLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(NumberAndBicAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(PLLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(SELocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(SGLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(UKLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public BankAccountV3AccountIdentification(USLocalAccountIdentification o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
static {
schemas.put("AULocalAccountIdentification", new GenericType() {
});
schemas.put("BRLocalAccountIdentification", new GenericType() {
});
schemas.put("CALocalAccountIdentification", new GenericType() {
});
schemas.put("CZLocalAccountIdentification", new GenericType() {
});
schemas.put("DKLocalAccountIdentification", new GenericType() {
});
schemas.put("HKLocalAccountIdentification", new GenericType() {
});
schemas.put("HULocalAccountIdentification", new GenericType() {
});
schemas.put("IbanAccountIdentification", new GenericType() {
});
schemas.put("NOLocalAccountIdentification", new GenericType() {
});
schemas.put("NZLocalAccountIdentification", new GenericType() {
});
schemas.put("NumberAndBicAccountIdentification", new GenericType() {
});
schemas.put("PLLocalAccountIdentification", new GenericType() {
});
schemas.put("SELocalAccountIdentification", new GenericType() {
});
schemas.put("SGLocalAccountIdentification", new GenericType() {
});
schemas.put("UKLocalAccountIdentification", new GenericType() {
});
schemas.put("USLocalAccountIdentification", new GenericType() {
});
JSON.registerDescendants(BankAccountV3AccountIdentification.class, Collections.unmodifiableMap(schemas));
}
@Override
public Map> getSchemas() {
return BankAccountV3AccountIdentification.schemas;
}
/**
* Set the instance that matches the oneOf child schema, check
* the instance parameter is valid against the oneOf child schemas:
* AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification
*
* It could be an instance of the 'oneOf' schemas.
* The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf).
*/
@Override
public void setActualInstance(Object instance) {
if (JSON.isInstanceOf(AULocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(BRLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(CALocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(CZLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(DKLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(HKLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(HULocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(IbanAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(NOLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(NZLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(NumberAndBicAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(PLLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(SELocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(SGLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(UKLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(USLocalAccountIdentification.class, instance, new HashSet<>())) {
super.setActualInstance(instance);
return;
}
throw new RuntimeException("Invalid instance type. Must be AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification");
}
/**
* Get the actual instance, which can be the following:
* AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification
*
* @return The actual instance (AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification)
*/
@Override
public Object getActualInstance() {
return super.getActualInstance();
}
/**
* Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `AULocalAccountIdentification`
* @throws ClassCastException if the instance is not `AULocalAccountIdentification`
*/
public AULocalAccountIdentification getAULocalAccountIdentification() throws ClassCastException {
return (AULocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `BRLocalAccountIdentification`. If the actual instance is not `BRLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `BRLocalAccountIdentification`
* @throws ClassCastException if the instance is not `BRLocalAccountIdentification`
*/
public BRLocalAccountIdentification getBRLocalAccountIdentification() throws ClassCastException {
return (BRLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CALocalAccountIdentification`
* @throws ClassCastException if the instance is not `CALocalAccountIdentification`
*/
public CALocalAccountIdentification getCALocalAccountIdentification() throws ClassCastException {
return (CALocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CZLocalAccountIdentification`
* @throws ClassCastException if the instance is not `CZLocalAccountIdentification`
*/
public CZLocalAccountIdentification getCZLocalAccountIdentification() throws ClassCastException {
return (CZLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `DKLocalAccountIdentification`
* @throws ClassCastException if the instance is not `DKLocalAccountIdentification`
*/
public DKLocalAccountIdentification getDKLocalAccountIdentification() throws ClassCastException {
return (DKLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `HKLocalAccountIdentification`
* @throws ClassCastException if the instance is not `HKLocalAccountIdentification`
*/
public HKLocalAccountIdentification getHKLocalAccountIdentification() throws ClassCastException {
return (HKLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `HULocalAccountIdentification`
* @throws ClassCastException if the instance is not `HULocalAccountIdentification`
*/
public HULocalAccountIdentification getHULocalAccountIdentification() throws ClassCastException {
return (HULocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `IbanAccountIdentification`
* @throws ClassCastException if the instance is not `IbanAccountIdentification`
*/
public IbanAccountIdentification getIbanAccountIdentification() throws ClassCastException {
return (IbanAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `NOLocalAccountIdentification`
* @throws ClassCastException if the instance is not `NOLocalAccountIdentification`
*/
public NOLocalAccountIdentification getNOLocalAccountIdentification() throws ClassCastException {
return (NOLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `NZLocalAccountIdentification`
* @throws ClassCastException if the instance is not `NZLocalAccountIdentification`
*/
public NZLocalAccountIdentification getNZLocalAccountIdentification() throws ClassCastException {
return (NZLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `NumberAndBicAccountIdentification`
* @throws ClassCastException if the instance is not `NumberAndBicAccountIdentification`
*/
public NumberAndBicAccountIdentification getNumberAndBicAccountIdentification() throws ClassCastException {
return (NumberAndBicAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `PLLocalAccountIdentification`
* @throws ClassCastException if the instance is not `PLLocalAccountIdentification`
*/
public PLLocalAccountIdentification getPLLocalAccountIdentification() throws ClassCastException {
return (PLLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `SELocalAccountIdentification`
* @throws ClassCastException if the instance is not `SELocalAccountIdentification`
*/
public SELocalAccountIdentification getSELocalAccountIdentification() throws ClassCastException {
return (SELocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `SGLocalAccountIdentification`
* @throws ClassCastException if the instance is not `SGLocalAccountIdentification`
*/
public SGLocalAccountIdentification getSGLocalAccountIdentification() throws ClassCastException {
return (SGLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `UKLocalAccountIdentification`
* @throws ClassCastException if the instance is not `UKLocalAccountIdentification`
*/
public UKLocalAccountIdentification getUKLocalAccountIdentification() throws ClassCastException {
return (UKLocalAccountIdentification)super.getActualInstance();
}
/**
* Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `USLocalAccountIdentification`
* @throws ClassCastException if the instance is not `USLocalAccountIdentification`
*/
public USLocalAccountIdentification getUSLocalAccountIdentification() throws ClassCastException {
return (USLocalAccountIdentification)super.getActualInstance();
}
/**
* Create an instance of BankAccountV3AccountIdentification given an JSON string
*
* @param jsonString JSON string
* @return An instance of BankAccountV3AccountIdentification
* @throws IOException if the JSON string is invalid with respect to BankAccountV3AccountIdentification
*/
public static BankAccountV3AccountIdentification fromJson(String jsonString) throws IOException {
return JSON.getMapper().readValue(jsonString, BankAccountV3AccountIdentification.class);
}
/**
* Convert an instance of BankAccountV3AccountIdentification to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy