content: /*
   * Adyen Checkout API
   *
   * The version of the OpenAPI document: 71
   *
   *
   * 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.checkout;
  
  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.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;
  import jakarta.ws.rs.core.GenericType;
  import java.io.IOException;
  import java.util.*;
  import java.util.Arrays;
  import java.util.Collections;
  import java.util.HashSet;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  @JsonDeserialize(using = CheckoutPaymentMethod.CheckoutPaymentMethodDeserializer.class)
  @JsonSerialize(using = CheckoutPaymentMethod.CheckoutPaymentMethodSerializer.class)
  public class CheckoutPaymentMethod extends AbstractOpenApiSchema {
    private static final Logger log = Logger.getLogger(CheckoutPaymentMethod.class.getName());
  
    public static class CheckoutPaymentMethodSerializer extends StdSerializer<CheckoutPaymentMethod> {
      public CheckoutPaymentMethodSerializer(Class<CheckoutPaymentMethod> t) {
        super(t);
      }
  
      public CheckoutPaymentMethodSerializer() {
        this(null);
      }
  
      @Override
      public void serialize(
          CheckoutPaymentMethod value, JsonGenerator jgen, SerializerProvider provider)
          throws IOException, JsonProcessingException {
        jgen.writeObject(value.getActualInstance());
      }
    }
  
    public static class CheckoutPaymentMethodDeserializer
        extends StdDeserializer<CheckoutPaymentMethod> {
      public CheckoutPaymentMethodDeserializer() {
        this(CheckoutPaymentMethod.class);
      }
  
      public CheckoutPaymentMethodDeserializer(Class<?> vc) {
        super(vc);
      }
  
      @Override
      public CheckoutPaymentMethod 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 AchDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AchDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AchDetails.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 'AchDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AchDetails'", e);
        }
  
        // deserialize AffirmDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AffirmDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AffirmDetails.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 'AffirmDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AffirmDetails'", e);
        }
  
        // deserialize AfterpayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AfterpayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AfterpayDetails.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 'AfterpayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AfterpayDetails'", e);
        }
  
        // deserialize AmazonPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AmazonPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AmazonPayDetails.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 'AmazonPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AmazonPayDetails'", e);
        }
  
        // deserialize AncvDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AncvDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AncvDetails.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 'AncvDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AncvDetails'", e);
        }
  
        // deserialize AndroidPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(AndroidPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(AndroidPayDetails.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 'AndroidPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'AndroidPayDetails'", e);
        }
  
        // deserialize ApplePayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(ApplePayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(ApplePayDetails.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 'ApplePayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'ApplePayDetails'", e);
        }
  
        // deserialize BacsDirectDebitDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(BacsDirectDebitDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(BacsDirectDebitDetails.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 'BacsDirectDebitDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'BacsDirectDebitDetails'", e);
        }
  
        // deserialize BillDeskDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(BillDeskDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(BillDeskDetails.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 'BillDeskDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'BillDeskDetails'", e);
        }
  
        // deserialize BlikDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(BlikDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(BlikDetails.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 'BlikDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'BlikDetails'", e);
        }
  
        // deserialize CardDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(CardDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(CardDetails.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 'CardDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'CardDetails'", e);
        }
  
        // deserialize CashAppDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(CashAppDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(CashAppDetails.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 'CashAppDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'CashAppDetails'", e);
        }
  
        // deserialize CellulantDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(CellulantDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(CellulantDetails.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 'CellulantDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'CellulantDetails'", e);
        }
  
        // deserialize DokuDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(DokuDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(DokuDetails.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 'DokuDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'DokuDetails'", e);
        }
  
        // deserialize DragonpayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(DragonpayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(DragonpayDetails.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 'DragonpayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'DragonpayDetails'", e);
        }
  
        // deserialize EBankingFinlandDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(EBankingFinlandDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(EBankingFinlandDetails.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 'EBankingFinlandDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'EBankingFinlandDetails'", e);
        }
  
        // deserialize EcontextVoucherDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(EcontextVoucherDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(EcontextVoucherDetails.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 'EcontextVoucherDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'EcontextVoucherDetails'", e);
        }
  
        // deserialize EftDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(EftDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(EftDetails.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 'EftDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'EftDetails'", e);
        }
  
        // deserialize FastlaneDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(FastlaneDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(FastlaneDetails.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 'FastlaneDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'FastlaneDetails'", e);
        }
  
        // deserialize GenericIssuerPaymentMethodDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(GenericIssuerPaymentMethodDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized =
                  tree.traverse(jp.getCodec()).readValueAs(GenericIssuerPaymentMethodDetails.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 'GenericIssuerPaymentMethodDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(
              Level.FINER, "Input data does not match schema 'GenericIssuerPaymentMethodDetails'", e);
        }
  
        // deserialize GooglePayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(GooglePayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(GooglePayDetails.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 'GooglePayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'GooglePayDetails'", e);
        }
  
        // deserialize IdealDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(IdealDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(IdealDetails.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 'IdealDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'IdealDetails'", e);
        }
  
        // deserialize KlarnaDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(KlarnaDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(KlarnaDetails.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 'KlarnaDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'KlarnaDetails'", e);
        }
  
        // deserialize MasterpassDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(MasterpassDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(MasterpassDetails.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 'MasterpassDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'MasterpassDetails'", e);
        }
  
        // deserialize MbwayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(MbwayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(MbwayDetails.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 'MbwayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'MbwayDetails'", e);
        }
  
        // deserialize MobilePayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(MobilePayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(MobilePayDetails.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 'MobilePayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'MobilePayDetails'", e);
        }
  
        // deserialize MolPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(MolPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(MolPayDetails.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 'MolPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'MolPayDetails'", e);
        }
  
        // deserialize OpenInvoiceDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(OpenInvoiceDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(OpenInvoiceDetails.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 'OpenInvoiceDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'OpenInvoiceDetails'", e);
        }
  
        // deserialize PayByBankAISDirectDebitDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayByBankAISDirectDebitDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized =
                  tree.traverse(jp.getCodec()).readValueAs(PayByBankAISDirectDebitDetails.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 'PayByBankAISDirectDebitDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(
              Level.FINER, "Input data does not match schema 'PayByBankAISDirectDebitDetails'", e);
        }
  
        // deserialize PayByBankDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayByBankDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayByBankDetails.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 'PayByBankDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayByBankDetails'", e);
        }
  
        // deserialize PayPalDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayPalDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayPalDetails.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 'PayPalDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayPalDetails'", e);
        }
  
        // deserialize PayPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayPayDetails.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 'PayPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayPayDetails'", e);
        }
  
        // deserialize PayToDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayToDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayToDetails.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 'PayToDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayToDetails'", e);
        }
  
        // deserialize PayUUpiDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayUUpiDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayUUpiDetails.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 'PayUUpiDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayUUpiDetails'", e);
        }
  
        // deserialize PayWithGoogleDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PayWithGoogleDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PayWithGoogleDetails.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 'PayWithGoogleDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PayWithGoogleDetails'", e);
        }
  
        // deserialize PaymentDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PaymentDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PaymentDetails.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 'PaymentDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PaymentDetails'", e);
        }
  
        // deserialize PixDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PixDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PixDetails.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 'PixDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PixDetails'", e);
        }
  
        // deserialize PseDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(PseDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(PseDetails.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 'PseDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'PseDetails'", e);
        }
  
        // deserialize RakutenPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(RakutenPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(RakutenPayDetails.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 'RakutenPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'RakutenPayDetails'", e);
        }
  
        // deserialize RatepayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(RatepayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(RatepayDetails.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 'RatepayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'RatepayDetails'", e);
        }
  
        // deserialize RivertyDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(RivertyDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(RivertyDetails.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 'RivertyDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'RivertyDetails'", e);
        }
  
        // deserialize SamsungPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(SamsungPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(SamsungPayDetails.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 'SamsungPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'SamsungPayDetails'", e);
        }
  
        // deserialize SepaDirectDebitDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(SepaDirectDebitDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(SepaDirectDebitDetails.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 'SepaDirectDebitDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'SepaDirectDebitDetails'", e);
        }
  
        // deserialize StoredPaymentMethodDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(StoredPaymentMethodDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized =
                  tree.traverse(jp.getCodec()).readValueAs(StoredPaymentMethodDetails.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 'StoredPaymentMethodDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'StoredPaymentMethodDetails'", e);
        }
  
        // deserialize TwintDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(TwintDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(TwintDetails.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 'TwintDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'TwintDetails'", e);
        }
  
        // deserialize UpiCollectDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(UpiCollectDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(UpiCollectDetails.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 'UpiCollectDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'UpiCollectDetails'", e);
        }
  
        // deserialize UpiIntentDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(UpiIntentDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(UpiIntentDetails.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 'UpiIntentDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'UpiIntentDetails'", e);
        }
  
        // deserialize UpiQrDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(UpiQrDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(UpiQrDetails.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 'UpiQrDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'UpiQrDetails'", e);
        }
  
        // deserialize VippsDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(VippsDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(VippsDetails.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 'VippsDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'VippsDetails'", e);
        }
  
        // deserialize VisaCheckoutDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(VisaCheckoutDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(VisaCheckoutDetails.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 'VisaCheckoutDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'VisaCheckoutDetails'", e);
        }
  
        // deserialize WeChatPayDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(WeChatPayDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(WeChatPayDetails.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 'WeChatPayDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'WeChatPayDetails'", e);
        }
  
        // deserialize WeChatPayMiniProgramDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(WeChatPayMiniProgramDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized =
                  tree.traverse(jp.getCodec()).readValueAs(WeChatPayMiniProgramDetails.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 'WeChatPayMiniProgramDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'WeChatPayMiniProgramDetails'", e);
        }
  
        // deserialize ZipDetails
        try {
          boolean attemptParsing = true;
          if (attemptParsing) {
            // Checks if the unique type of the oneOf json matches any of the object TypeEnum values
            boolean typeMatch = false;
            if (tree.findValue("type") != null) {
              typeMatch =
                  Arrays.stream(ZipDetails.TypeEnum.values())
                      .anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
            }
  
            if (typeMatch) {
              deserialized = tree.traverse(jp.getCodec()).readValueAs(ZipDetails.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 'ZipDetails'");
            }
          }
        } catch (Exception e) {
          // deserialization failed, continue
          log.log(Level.FINER, "Input data does not match schema 'ZipDetails'", e);
        }
  
        if (match == 1) {
          CheckoutPaymentMethod ret = new CheckoutPaymentMethod();
          ret.setActualInstance(deserialized);
          return ret;
        }
        throw new IOException(
            String.format(
                "Failed deserialization for CheckoutPaymentMethod: %d classes match result, expected 1",
                match));
      }
  
      /** Handle deserialization of the 'null' value. */
      @Override
      public CheckoutPaymentMethod getNullValue(DeserializationContext ctxt)
          throws JsonMappingException {
        throw new JsonMappingException(ctxt.getParser(), "CheckoutPaymentMethod cannot be null");
      }
    }
  
    // store a list of schema names defined in oneOf
    public static final Map<String, GenericType<?>> schemas = new HashMap<>();
  
    public CheckoutPaymentMethod() {
      super("oneOf", Boolean.FALSE);
    }
  
    public CheckoutPaymentMethod(AchDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(AffirmDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(AfterpayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(AmazonPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(AncvDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(AndroidPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(ApplePayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(BacsDirectDebitDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(BillDeskDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(BlikDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(CardDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(CashAppDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(CellulantDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(DokuDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(DragonpayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(EBankingFinlandDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(EcontextVoucherDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(EftDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(FastlaneDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(GenericIssuerPaymentMethodDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(GooglePayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(IdealDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(KlarnaDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(MasterpassDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(MbwayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(MobilePayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(MolPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(OpenInvoiceDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayByBankAISDirectDebitDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayByBankDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayPalDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayToDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayUUpiDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PayWithGoogleDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PaymentDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PixDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(PseDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(RakutenPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(RatepayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(RivertyDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(SamsungPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(SepaDirectDebitDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(StoredPaymentMethodDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(TwintDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(UpiCollectDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(UpiIntentDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(UpiQrDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(VippsDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(VisaCheckoutDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(WeChatPayDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(WeChatPayMiniProgramDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    public CheckoutPaymentMethod(ZipDetails o) {
      super("oneOf", Boolean.FALSE);
      setActualInstance(o);
    }
  
    static {
      schemas.put("AchDetails", new GenericType<AchDetails>() {});
      schemas.put("AffirmDetails", new GenericType<AffirmDetails>() {});
      schemas.put("AfterpayDetails", new GenericType<AfterpayDetails>() {});
      schemas.put("AmazonPayDetails", new GenericType<AmazonPayDetails>() {});
      schemas.put("AncvDetails", new GenericType<AncvDetails>() {});
      schemas.put("AndroidPayDetails", new GenericType<AndroidPayDetails>() {});
      schemas.put("ApplePayDetails", new GenericType<ApplePayDetails>() {});
      schemas.put("BacsDirectDebitDetails", new GenericType<BacsDirectDebitDetails>() {});
      schemas.put("BillDeskDetails", new GenericType<BillDeskDetails>() {});
      schemas.put("BlikDetails", new GenericType<BlikDetails>() {});
      schemas.put("CardDetails", new GenericType<CardDetails>() {});
      schemas.put("CashAppDetails", new GenericType<CashAppDetails>() {});
      schemas.put("CellulantDetails", new GenericType<CellulantDetails>() {});
      schemas.put("DokuDetails", new GenericType<DokuDetails>() {});
      schemas.put("DragonpayDetails", new GenericType<DragonpayDetails>() {});
      schemas.put("EBankingFinlandDetails", new GenericType<EBankingFinlandDetails>() {});
      schemas.put("EcontextVoucherDetails", new GenericType<EcontextVoucherDetails>() {});
      schemas.put("EftDetails", new GenericType<EftDetails>() {});
      schemas.put("FastlaneDetails", new GenericType<FastlaneDetails>() {});
      schemas.put(
          "GenericIssuerPaymentMethodDetails",
          new GenericType<GenericIssuerPaymentMethodDetails>() {});
      schemas.put("GooglePayDetails", new GenericType<GooglePayDetails>() {});
      schemas.put("IdealDetails", new GenericType<IdealDetails>() {});
      schemas.put("KlarnaDetails", new GenericType<KlarnaDetails>() {});
      schemas.put("MasterpassDetails", new GenericType<MasterpassDetails>() {});
      schemas.put("MbwayDetails", new GenericType<MbwayDetails>() {});
      schemas.put("MobilePayDetails", new GenericType<MobilePayDetails>() {});
      schemas.put("MolPayDetails", new GenericType<MolPayDetails>() {});
      schemas.put("OpenInvoiceDetails", new GenericType<OpenInvoiceDetails>() {});
      schemas.put(
          "PayByBankAISDirectDebitDetails", new GenericType<PayByBankAISDirectDebitDetails>() {});
      schemas.put("PayByBankDetails", new GenericType<PayByBankDetails>() {});
      schemas.put("PayPalDetails", new GenericType<PayPalDetails>() {});
      schemas.put("PayPayDetails", new GenericType<PayPayDetails>() {});
      schemas.put("PayToDetails", new GenericType<PayToDetails>() {});
      schemas.put("PayUUpiDetails", new GenericType<PayUUpiDetails>() {});
      schemas.put("PayWithGoogleDetails", new GenericType<PayWithGoogleDetails>() {});
      schemas.put("PaymentDetails", new GenericType<PaymentDetails>() {});
      schemas.put("PixDetails", new GenericType<PixDetails>() {});
      schemas.put("PseDetails", new GenericType<PseDetails>() {});
      schemas.put("RakutenPayDetails", new GenericType<RakutenPayDetails>() {});
      schemas.put("RatepayDetails", new GenericType<RatepayDetails>() {});
      schemas.put("RivertyDetails", new GenericType<RivertyDetails>() {});
      schemas.put("SamsungPayDetails", new GenericType<SamsungPayDetails>() {});
      schemas.put("SepaDirectDebitDetails", new GenericType<SepaDirectDebitDetails>() {});
      schemas.put("StoredPaymentMethodDetails", new GenericType<StoredPaymentMethodDetails>() {});
      schemas.put("TwintDetails", new GenericType<TwintDetails>() {});
      schemas.put("UpiCollectDetails", new GenericType<UpiCollectDetails>() {});
      schemas.put("UpiIntentDetails", new GenericType<UpiIntentDetails>() {});
      schemas.put("UpiQrDetails", new GenericType<UpiQrDetails>() {});
      schemas.put("VippsDetails", new GenericType<VippsDetails>() {});
      schemas.put("VisaCheckoutDetails", new GenericType<VisaCheckoutDetails>() {});
      schemas.put("WeChatPayDetails", new GenericType<WeChatPayDetails>() {});
      schemas.put("WeChatPayMiniProgramDetails", new GenericType<WeChatPayMiniProgramDetails>() {});
      schemas.put("ZipDetails", new GenericType<ZipDetails>() {});
      JSON.registerDescendants(CheckoutPaymentMethod.class, Collections.unmodifiableMap(schemas));
    }
  
    @Override
    public Map<String, GenericType<?>> getSchemas() {
      return CheckoutPaymentMethod.schemas;
    }
  
    /**
     * Set the instance that matches the oneOf child schema, check the instance parameter is valid
     * against the oneOf child schemas: AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails,
     * AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails,
     * BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DragonpayDetails,
     * EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails,
     * GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails,
     * MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails,
     * PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails,
     * PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PseDetails,
     * RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails,
     * StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails,
     * VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
     *
     * <p>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(AchDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(AffirmDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(AfterpayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(AmazonPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(AncvDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(AndroidPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(ApplePayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(BacsDirectDebitDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(BillDeskDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(BlikDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(CardDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(CashAppDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(CellulantDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(DokuDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(DragonpayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(EBankingFinlandDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(EcontextVoucherDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(EftDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(FastlaneDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(GenericIssuerPaymentMethodDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(GooglePayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(IdealDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(KlarnaDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(MasterpassDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(MbwayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(MobilePayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(MolPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(OpenInvoiceDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayByBankAISDirectDebitDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayByBankDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayPalDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayToDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayUUpiDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PayWithGoogleDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PaymentDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PixDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(PseDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(RakutenPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(RatepayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(RivertyDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(SamsungPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(SepaDirectDebitDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(StoredPaymentMethodDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(TwintDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(UpiCollectDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(UpiIntentDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(UpiQrDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(VippsDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(VisaCheckoutDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(WeChatPayDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(WeChatPayMiniProgramDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      if (JSON.isInstanceOf(ZipDetails.class, instance, new HashSet<>())) {
        super.setActualInstance(instance);
        return;
      }
  
      throw new RuntimeException(
          "Invalid instance type. Must be AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PseDetails, RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
    }
  
    /**
     * Get the actual instance, which can be the following: AchDetails, AffirmDetails,
     * AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails,
     * BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails,
     * CellulantDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails,
     * EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails,
     * GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails,
     * MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails,
     * PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails,
     * PayWithGoogleDetails, PaymentDetails, PixDetails, PseDetails, RakutenPayDetails,
     * RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails,
     * StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails,
     * VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails
     *
     * @return The actual instance (AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails,
     *     AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails,
     *     BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DragonpayDetails,
     *     EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails,
     *     GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails,
     *     MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails,
     *     PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails,
     *     PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PseDetails,
     *     RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails,
     *     SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails,
     *     UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails,
     *     WeChatPayMiniProgramDetails, ZipDetails)
     */
    @Override
    public Object getActualInstance() {
      return super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AchDetails`. If the actual instance is not `AchDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `AchDetails`
     * @throws ClassCastException if the instance is not `AchDetails`
     */
    public AchDetails getAchDetails() throws ClassCastException {
      return (AchDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AffirmDetails`. If the actual instance is not `AffirmDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `AffirmDetails`
     * @throws ClassCastException if the instance is not `AffirmDetails`
     */
    public AffirmDetails getAffirmDetails() throws ClassCastException {
      return (AffirmDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AfterpayDetails`. If the actual instance is not `AfterpayDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `AfterpayDetails`
     * @throws ClassCastException if the instance is not `AfterpayDetails`
     */
    public AfterpayDetails getAfterpayDetails() throws ClassCastException {
      return (AfterpayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AmazonPayDetails`. If the actual instance is not
     * `AmazonPayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `AmazonPayDetails`
     * @throws ClassCastException if the instance is not `AmazonPayDetails`
     */
    public AmazonPayDetails getAmazonPayDetails() throws ClassCastException {
      return (AmazonPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AncvDetails`. If the actual instance is not `AncvDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `AncvDetails`
     * @throws ClassCastException if the instance is not `AncvDetails`
     */
    public AncvDetails getAncvDetails() throws ClassCastException {
      return (AncvDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `AndroidPayDetails`. If the actual instance is not
     * `AndroidPayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `AndroidPayDetails`
     * @throws ClassCastException if the instance is not `AndroidPayDetails`
     */
    public AndroidPayDetails getAndroidPayDetails() throws ClassCastException {
      return (AndroidPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `ApplePayDetails`
     * @throws ClassCastException if the instance is not `ApplePayDetails`
     */
    public ApplePayDetails getApplePayDetails() throws ClassCastException {
      return (ApplePayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `BacsDirectDebitDetails`. If the actual instance is not
     * `BacsDirectDebitDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `BacsDirectDebitDetails`
     * @throws ClassCastException if the instance is not `BacsDirectDebitDetails`
     */
    public BacsDirectDebitDetails getBacsDirectDebitDetails() throws ClassCastException {
      return (BacsDirectDebitDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `BillDeskDetails`. If the actual instance is not `BillDeskDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `BillDeskDetails`
     * @throws ClassCastException if the instance is not `BillDeskDetails`
     */
    public BillDeskDetails getBillDeskDetails() throws ClassCastException {
      return (BillDeskDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `BlikDetails`. If the actual instance is not `BlikDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `BlikDetails`
     * @throws ClassCastException if the instance is not `BlikDetails`
     */
    public BlikDetails getBlikDetails() throws ClassCastException {
      return (BlikDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `CardDetails`
     * @throws ClassCastException if the instance is not `CardDetails`
     */
    public CardDetails getCardDetails() throws ClassCastException {
      return (CardDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `CashAppDetails`. If the actual instance is not `CashAppDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `CashAppDetails`
     * @throws ClassCastException if the instance is not `CashAppDetails`
     */
    public CashAppDetails getCashAppDetails() throws ClassCastException {
      return (CashAppDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `CellulantDetails`. If the actual instance is not
     * `CellulantDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `CellulantDetails`
     * @throws ClassCastException if the instance is not `CellulantDetails`
     */
    public CellulantDetails getCellulantDetails() throws ClassCastException {
      return (CellulantDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `DokuDetails`. If the actual instance is not `DokuDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `DokuDetails`
     * @throws ClassCastException if the instance is not `DokuDetails`
     */
    public DokuDetails getDokuDetails() throws ClassCastException {
      return (DokuDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `DragonpayDetails`. If the actual instance is not
     * `DragonpayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `DragonpayDetails`
     * @throws ClassCastException if the instance is not `DragonpayDetails`
     */
    public DragonpayDetails getDragonpayDetails() throws ClassCastException {
      return (DragonpayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `EBankingFinlandDetails`. If the actual instance is not
     * `EBankingFinlandDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `EBankingFinlandDetails`
     * @throws ClassCastException if the instance is not `EBankingFinlandDetails`
     */
    public EBankingFinlandDetails getEBankingFinlandDetails() throws ClassCastException {
      return (EBankingFinlandDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `EcontextVoucherDetails`. If the actual instance is not
     * `EcontextVoucherDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `EcontextVoucherDetails`
     * @throws ClassCastException if the instance is not `EcontextVoucherDetails`
     */
    public EcontextVoucherDetails getEcontextVoucherDetails() throws ClassCastException {
      return (EcontextVoucherDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `EftDetails`. If the actual instance is not `EftDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `EftDetails`
     * @throws ClassCastException if the instance is not `EftDetails`
     */
    public EftDetails getEftDetails() throws ClassCastException {
      return (EftDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `FastlaneDetails`. If the actual instance is not `FastlaneDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `FastlaneDetails`
     * @throws ClassCastException if the instance is not `FastlaneDetails`
     */
    public FastlaneDetails getFastlaneDetails() throws ClassCastException {
      return (FastlaneDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `GenericIssuerPaymentMethodDetails`. If the actual instance is not
     * `GenericIssuerPaymentMethodDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `GenericIssuerPaymentMethodDetails`
     * @throws ClassCastException if the instance is not `GenericIssuerPaymentMethodDetails`
     */
    public GenericIssuerPaymentMethodDetails getGenericIssuerPaymentMethodDetails()
        throws ClassCastException {
      return (GenericIssuerPaymentMethodDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `GooglePayDetails`. If the actual instance is not
     * `GooglePayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `GooglePayDetails`
     * @throws ClassCastException if the instance is not `GooglePayDetails`
     */
    public GooglePayDetails getGooglePayDetails() throws ClassCastException {
      return (GooglePayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `IdealDetails`
     * @throws ClassCastException if the instance is not `IdealDetails`
     */
    public IdealDetails getIdealDetails() throws ClassCastException {
      return (IdealDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `KlarnaDetails`. If the actual instance is not `KlarnaDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `KlarnaDetails`
     * @throws ClassCastException if the instance is not `KlarnaDetails`
     */
    public KlarnaDetails getKlarnaDetails() throws ClassCastException {
      return (KlarnaDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `MasterpassDetails`. If the actual instance is not
     * `MasterpassDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `MasterpassDetails`
     * @throws ClassCastException if the instance is not `MasterpassDetails`
     */
    public MasterpassDetails getMasterpassDetails() throws ClassCastException {
      return (MasterpassDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `MbwayDetails`. If the actual instance is not `MbwayDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `MbwayDetails`
     * @throws ClassCastException if the instance is not `MbwayDetails`
     */
    public MbwayDetails getMbwayDetails() throws ClassCastException {
      return (MbwayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `MobilePayDetails`. If the actual instance is not
     * `MobilePayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `MobilePayDetails`
     * @throws ClassCastException if the instance is not `MobilePayDetails`
     */
    public MobilePayDetails getMobilePayDetails() throws ClassCastException {
      return (MobilePayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `MolPayDetails`. If the actual instance is not `MolPayDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `MolPayDetails`
     * @throws ClassCastException if the instance is not `MolPayDetails`
     */
    public MolPayDetails getMolPayDetails() throws ClassCastException {
      return (MolPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `OpenInvoiceDetails`. If the actual instance is not
     * `OpenInvoiceDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `OpenInvoiceDetails`
     * @throws ClassCastException if the instance is not `OpenInvoiceDetails`
     */
    public OpenInvoiceDetails getOpenInvoiceDetails() throws ClassCastException {
      return (OpenInvoiceDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayByBankAISDirectDebitDetails`. If the actual instance is not
     * `PayByBankAISDirectDebitDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `PayByBankAISDirectDebitDetails`
     * @throws ClassCastException if the instance is not `PayByBankAISDirectDebitDetails`
     */
    public PayByBankAISDirectDebitDetails getPayByBankAISDirectDebitDetails()
        throws ClassCastException {
      return (PayByBankAISDirectDebitDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayByBankDetails`. If the actual instance is not
     * `PayByBankDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `PayByBankDetails`
     * @throws ClassCastException if the instance is not `PayByBankDetails`
     */
    public PayByBankDetails getPayByBankDetails() throws ClassCastException {
      return (PayByBankDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayPalDetails`. If the actual instance is not `PayPalDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `PayPalDetails`
     * @throws ClassCastException if the instance is not `PayPalDetails`
     */
    public PayPalDetails getPayPalDetails() throws ClassCastException {
      return (PayPalDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayPayDetails`. If the actual instance is not `PayPayDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `PayPayDetails`
     * @throws ClassCastException if the instance is not `PayPayDetails`
     */
    public PayPayDetails getPayPayDetails() throws ClassCastException {
      return (PayPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayToDetails`. If the actual instance is not `PayToDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `PayToDetails`
     * @throws ClassCastException if the instance is not `PayToDetails`
     */
    public PayToDetails getPayToDetails() throws ClassCastException {
      return (PayToDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayUUpiDetails`. If the actual instance is not `PayUUpiDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `PayUUpiDetails`
     * @throws ClassCastException if the instance is not `PayUUpiDetails`
     */
    public PayUUpiDetails getPayUUpiDetails() throws ClassCastException {
      return (PayUUpiDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not
     * `PayWithGoogleDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `PayWithGoogleDetails`
     * @throws ClassCastException if the instance is not `PayWithGoogleDetails`
     */
    public PayWithGoogleDetails getPayWithGoogleDetails() throws ClassCastException {
      return (PayWithGoogleDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PaymentDetails`. If the actual instance is not `PaymentDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `PaymentDetails`
     * @throws ClassCastException if the instance is not `PaymentDetails`
     */
    public PaymentDetails getPaymentDetails() throws ClassCastException {
      return (PaymentDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PixDetails`. If the actual instance is not `PixDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `PixDetails`
     * @throws ClassCastException if the instance is not `PixDetails`
     */
    public PixDetails getPixDetails() throws ClassCastException {
      return (PixDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `PseDetails`. If the actual instance is not `PseDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `PseDetails`
     * @throws ClassCastException if the instance is not `PseDetails`
     */
    public PseDetails getPseDetails() throws ClassCastException {
      return (PseDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `RakutenPayDetails`. If the actual instance is not
     * `RakutenPayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `RakutenPayDetails`
     * @throws ClassCastException if the instance is not `RakutenPayDetails`
     */
    public RakutenPayDetails getRakutenPayDetails() throws ClassCastException {
      return (RakutenPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `RatepayDetails`
     * @throws ClassCastException if the instance is not `RatepayDetails`
     */
    public RatepayDetails getRatepayDetails() throws ClassCastException {
      return (RatepayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `RivertyDetails`. If the actual instance is not `RivertyDetails`,
     * the ClassCastException will be thrown.
     *
     * @return The actual instance of `RivertyDetails`
     * @throws ClassCastException if the instance is not `RivertyDetails`
     */
    public RivertyDetails getRivertyDetails() throws ClassCastException {
      return (RivertyDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `SamsungPayDetails`. If the actual instance is not
     * `SamsungPayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `SamsungPayDetails`
     * @throws ClassCastException if the instance is not `SamsungPayDetails`
     */
    public SamsungPayDetails getSamsungPayDetails() throws ClassCastException {
      return (SamsungPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `SepaDirectDebitDetails`. If the actual instance is not
     * `SepaDirectDebitDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `SepaDirectDebitDetails`
     * @throws ClassCastException if the instance is not `SepaDirectDebitDetails`
     */
    public SepaDirectDebitDetails getSepaDirectDebitDetails() throws ClassCastException {
      return (SepaDirectDebitDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `StoredPaymentMethodDetails`. If the actual instance is not
     * `StoredPaymentMethodDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `StoredPaymentMethodDetails`
     * @throws ClassCastException if the instance is not `StoredPaymentMethodDetails`
     */
    public StoredPaymentMethodDetails getStoredPaymentMethodDetails() throws ClassCastException {
      return (StoredPaymentMethodDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `TwintDetails`. If the actual instance is not `TwintDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `TwintDetails`
     * @throws ClassCastException if the instance is not `TwintDetails`
     */
    public TwintDetails getTwintDetails() throws ClassCastException {
      return (TwintDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `UpiCollectDetails`. If the actual instance is not
     * `UpiCollectDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `UpiCollectDetails`
     * @throws ClassCastException if the instance is not `UpiCollectDetails`
     */
    public UpiCollectDetails getUpiCollectDetails() throws ClassCastException {
      return (UpiCollectDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `UpiIntentDetails`. If the actual instance is not
     * `UpiIntentDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `UpiIntentDetails`
     * @throws ClassCastException if the instance is not `UpiIntentDetails`
     */
    public UpiIntentDetails getUpiIntentDetails() throws ClassCastException {
      return (UpiIntentDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `UpiQrDetails`. If the actual instance is not `UpiQrDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `UpiQrDetails`
     * @throws ClassCastException if the instance is not `UpiQrDetails`
     */
    public UpiQrDetails getUpiQrDetails() throws ClassCastException {
      return (UpiQrDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `VippsDetails`. If the actual instance is not `VippsDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `VippsDetails`
     * @throws ClassCastException if the instance is not `VippsDetails`
     */
    public VippsDetails getVippsDetails() throws ClassCastException {
      return (VippsDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `VisaCheckoutDetails`. If the actual instance is not
     * `VisaCheckoutDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `VisaCheckoutDetails`
     * @throws ClassCastException if the instance is not `VisaCheckoutDetails`
     */
    public VisaCheckoutDetails getVisaCheckoutDetails() throws ClassCastException {
      return (VisaCheckoutDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `WeChatPayDetails`. If the actual instance is not
     * `WeChatPayDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `WeChatPayDetails`
     * @throws ClassCastException if the instance is not `WeChatPayDetails`
     */
    public WeChatPayDetails getWeChatPayDetails() throws ClassCastException {
      return (WeChatPayDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `WeChatPayMiniProgramDetails`. If the actual instance is not
     * `WeChatPayMiniProgramDetails`, the ClassCastException will be thrown.
     *
     * @return The actual instance of `WeChatPayMiniProgramDetails`
     * @throws ClassCastException if the instance is not `WeChatPayMiniProgramDetails`
     */
    public WeChatPayMiniProgramDetails getWeChatPayMiniProgramDetails() throws ClassCastException {
      return (WeChatPayMiniProgramDetails) super.getActualInstance();
    }
  
    /**
     * Get the actual instance of `ZipDetails`. If the actual instance is not `ZipDetails`, the
     * ClassCastException will be thrown.
     *
     * @return The actual instance of `ZipDetails`
     * @throws ClassCastException if the instance is not `ZipDetails`
     */
    public ZipDetails getZipDetails() throws ClassCastException {
      return (ZipDetails) super.getActualInstance();
    }
  
    /**
     * Create an instance of CheckoutPaymentMethod given an JSON string
     *
     * @param jsonString JSON string
     * @return An instance of CheckoutPaymentMethod
     * @throws IOException if the JSON string is invalid with respect to CheckoutPaymentMethod
     */
    public static CheckoutPaymentMethod fromJson(String jsonString) throws IOException {
      return JSON.getMapper().readValue(jsonString, CheckoutPaymentMethod.class);
    }
  
    /**
     * Convert an instance of CheckoutPaymentMethod to an JSON string
     *
     * @return JSON string
     */
    public String toJson() throws JsonProcessingException {
      return JSON.getMapper().writeValueAsString(this);
    }
  }
  