com.clover.sdk.v3.pay.PaymentRequestCardDetails.java Source code

Java tutorial

Introduction

Here is the source code for com.clover.sdk.v3.pay.PaymentRequestCardDetails.java

Source

/**
 * Copyright (C) 2015 Clover Network, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */

/*
 * Copyright (C) 2013 Clover Network, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.clover.sdk.v3.pay;

import com.clover.sdk.GenericClient;

@SuppressWarnings("all")
public final class PaymentRequestCardDetails
        implements android.os.Parcelable, com.clover.sdk.v3.Validator, com.clover.sdk.JSONifiable {

    public String getTrack1() {
        return genClient.cacheGet(CacheKey.track1);
    }

    public String getTrack2() {
        return genClient.cacheGet(CacheKey.track2);
    }

    public String getTrack3() {
        return genClient.cacheGet(CacheKey.track3);
    }

    public Boolean getEncrypted() {
        return genClient.cacheGet(CacheKey.encrypted);
    }

    public String getMaskedTrack1() {
        return genClient.cacheGet(CacheKey.maskedTrack1);
    }

    public String getMaskedTrack2() {
        return genClient.cacheGet(CacheKey.maskedTrack2);
    }

    public String getMaskedTrack3() {
        return genClient.cacheGet(CacheKey.maskedTrack3);
    }

    public String getUniqueToken() {
        return genClient.cacheGet(CacheKey.uniqueToken);
    }

    public String getPan() {
        return genClient.cacheGet(CacheKey.pan);
    }

    public String getFirstName() {
        return genClient.cacheGet(CacheKey.firstName);
    }

    public String getLastName() {
        return genClient.cacheGet(CacheKey.lastName);
    }

    public String getCountryCode() {
        return genClient.cacheGet(CacheKey.countryCode);
    }

    public String getExp() {
        return genClient.cacheGet(CacheKey.exp);
    }

    public String getStreetAddress() {
        return genClient.cacheGet(CacheKey.streetAddress);
    }

    public String getZip() {
        return genClient.cacheGet(CacheKey.zip);
    }

    public String getCvv() {
        return genClient.cacheGet(CacheKey.cvv);
    }

    public String getLast4() {
        return genClient.cacheGet(CacheKey.last4);
    }

    public String getFirst4() {
        return genClient.cacheGet(CacheKey.first4);
    }

    public String getDukptSerial() {
        return genClient.cacheGet(CacheKey.dukptSerial);
    }

    public String getSwipeStatus() {
        return genClient.cacheGet(CacheKey.swipeStatus);
    }

    public String getFingerprint() {
        return genClient.cacheGet(CacheKey.fingerprint);
    }

    public String getDeviceSerial() {
        return genClient.cacheGet(CacheKey.deviceSerial);
    }

    public Boolean getManualEntered() {
        return genClient.cacheGet(CacheKey.manualEntered);
    }

    public Boolean getAsync() {
        return genClient.cacheGet(CacheKey.async);
    }

    public Boolean getIsFallback() {
        return genClient.cacheGet(CacheKey.isFallback);
    }

    public Boolean getIsAuth() {
        return genClient.cacheGet(CacheKey.isAuth);
    }

    public Boolean getIsPrepaid() {
        return genClient.cacheGet(CacheKey.isPrepaid);
    }

    public CardFunction getCardFunction() {
        return genClient.cacheGet(CacheKey.cardFunction);
    }

    public Boolean getQrCode() {
        return genClient.cacheGet(CacheKey.qrCode);
    }

    public com.clover.sdk.v3.payments.CardType getCardType() {
        return genClient.cacheGet(CacheKey.cardType);
    }

    public com.clover.sdk.v3.payments.CardEntryType getEntryType() {
        return genClient.cacheGet(CacheKey.entryType);
    }

    public String getTransactionNo() {
        return genClient.cacheGet(CacheKey.transactionNo);
    }

    public String getCardholderName() {
        return genClient.cacheGet(CacheKey.cardholderName);
    }

    public TransactionData getTransactionData() {
        return genClient.cacheGet(CacheKey.transactionData);
    }

    private enum CacheKey implements com.clover.sdk.ValueExtractorEnum<PaymentRequestCardDetails> {
        track1 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("track1", String.class);
            }
        },
        track2 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("track2", String.class);
            }
        },
        track3 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("track3", String.class);
            }
        },
        encrypted {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("encrypted", Boolean.class);
            }
        },
        maskedTrack1 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("maskedTrack1", String.class);
            }
        },
        maskedTrack2 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("maskedTrack2", String.class);
            }
        },
        maskedTrack3 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("maskedTrack3", String.class);
            }
        },
        uniqueToken {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("uniqueToken", String.class);
            }
        },
        pan {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("pan", String.class);
            }
        },
        firstName {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("firstName", String.class);
            }
        },
        lastName {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("lastName", String.class);
            }
        },
        countryCode {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("countryCode", String.class);
            }
        },
        exp {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("exp", String.class);
            }
        },
        streetAddress {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("streetAddress", String.class);
            }
        },
        zip {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("zip", String.class);
            }
        },
        cvv {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("cvv", String.class);
            }
        },
        last4 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("last4", String.class);
            }
        },
        first4 {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("first4", String.class);
            }
        },
        dukptSerial {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("dukptSerial", String.class);
            }
        },
        swipeStatus {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("swipeStatus", String.class);
            }
        },
        fingerprint {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("fingerprint", String.class);
            }
        },
        deviceSerial {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("deviceSerial", String.class);
            }
        },
        manualEntered {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("manualEntered", Boolean.class);
            }
        },
        async {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("async", Boolean.class);
            }
        },
        isFallback {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("isFallback", Boolean.class);
            }
        },
        isAuth {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("isAuth", Boolean.class);
            }
        },
        isPrepaid {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("isPrepaid", Boolean.class);
            }
        },
        cardFunction {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractEnum("cardFunction", CardFunction.class);
            }
        },
        qrCode {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("qrCode", Boolean.class);
            }
        },
        cardType {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractEnum("cardType", com.clover.sdk.v3.payments.CardType.class);
            }
        },
        entryType {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractEnum("entryType", com.clover.sdk.v3.payments.CardEntryType.class);
            }
        },
        transactionNo {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("transactionNo", String.class);
            }
        },
        cardholderName {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractOther("cardholderName", String.class);
            }
        },
        transactionData {
            @Override
            public Object extractValue(PaymentRequestCardDetails instance) {
                return instance.genClient.extractRecord("transactionData", TransactionData.JSON_CREATOR);
            }
        },;
    }

    private GenericClient<PaymentRequestCardDetails> genClient = new GenericClient<PaymentRequestCardDetails>(this);

    /**
     * Constructs a new empty instance.
     */
    public PaymentRequestCardDetails() {
    }

    /**
     * Constructs a new instance from the given JSON String.
     */
    public PaymentRequestCardDetails(String json) throws IllegalArgumentException {
        try {
            genClient.setJsonObject(new org.json.JSONObject(json));
        } catch (org.json.JSONException e) {
            throw new IllegalArgumentException("invalid json", e);
        }
    }

    /**
     * Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
     * reflected in this instance and vice-versa.
     */
    public PaymentRequestCardDetails(org.json.JSONObject jsonObject) {
        genClient.setJsonObject(jsonObject);
    }

    /**
     * Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
     */
    public PaymentRequestCardDetails(PaymentRequestCardDetails src) {
        if (src.genClient.getJsonObject() != null) {
            genClient.setJsonObject(com.clover.sdk.v3.JsonHelper.deepCopy(src.genClient.getJSONObject()));
        }
    }

    /**
     * Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
     * reflected in this instance and vice-versa.
     */
    public org.json.JSONObject getJSONObject() {
        return genClient.getJSONObject();
    }

    @Override
    public void validate() {
    }

    /** Checks whether the 'track1' field is set and is not null */
    public boolean isNotNullTrack1() {
        return genClient.cacheValueIsNotNull(CacheKey.track1);
    }

    /** Checks whether the 'track2' field is set and is not null */
    public boolean isNotNullTrack2() {
        return genClient.cacheValueIsNotNull(CacheKey.track2);
    }

    /** Checks whether the 'track3' field is set and is not null */
    public boolean isNotNullTrack3() {
        return genClient.cacheValueIsNotNull(CacheKey.track3);
    }

    /** Checks whether the 'encrypted' field is set and is not null */
    public boolean isNotNullEncrypted() {
        return genClient.cacheValueIsNotNull(CacheKey.encrypted);
    }

    /** Checks whether the 'maskedTrack1' field is set and is not null */
    public boolean isNotNullMaskedTrack1() {
        return genClient.cacheValueIsNotNull(CacheKey.maskedTrack1);
    }

    /** Checks whether the 'maskedTrack2' field is set and is not null */
    public boolean isNotNullMaskedTrack2() {
        return genClient.cacheValueIsNotNull(CacheKey.maskedTrack2);
    }

    /** Checks whether the 'maskedTrack3' field is set and is not null */
    public boolean isNotNullMaskedTrack3() {
        return genClient.cacheValueIsNotNull(CacheKey.maskedTrack3);
    }

    /** Checks whether the 'uniqueToken' field is set and is not null */
    public boolean isNotNullUniqueToken() {
        return genClient.cacheValueIsNotNull(CacheKey.uniqueToken);
    }

    /** Checks whether the 'pan' field is set and is not null */
    public boolean isNotNullPan() {
        return genClient.cacheValueIsNotNull(CacheKey.pan);
    }

    /** Checks whether the 'firstName' field is set and is not null */
    public boolean isNotNullFirstName() {
        return genClient.cacheValueIsNotNull(CacheKey.firstName);
    }

    /** Checks whether the 'lastName' field is set and is not null */
    public boolean isNotNullLastName() {
        return genClient.cacheValueIsNotNull(CacheKey.lastName);
    }

    /** Checks whether the 'countryCode' field is set and is not null */
    public boolean isNotNullCountryCode() {
        return genClient.cacheValueIsNotNull(CacheKey.countryCode);
    }

    /** Checks whether the 'exp' field is set and is not null */
    public boolean isNotNullExp() {
        return genClient.cacheValueIsNotNull(CacheKey.exp);
    }

    /** Checks whether the 'streetAddress' field is set and is not null */
    public boolean isNotNullStreetAddress() {
        return genClient.cacheValueIsNotNull(CacheKey.streetAddress);
    }

    /** Checks whether the 'zip' field is set and is not null */
    public boolean isNotNullZip() {
        return genClient.cacheValueIsNotNull(CacheKey.zip);
    }

    /** Checks whether the 'cvv' field is set and is not null */
    public boolean isNotNullCvv() {
        return genClient.cacheValueIsNotNull(CacheKey.cvv);
    }

    /** Checks whether the 'last4' field is set and is not null */
    public boolean isNotNullLast4() {
        return genClient.cacheValueIsNotNull(CacheKey.last4);
    }

    /** Checks whether the 'first4' field is set and is not null */
    public boolean isNotNullFirst4() {
        return genClient.cacheValueIsNotNull(CacheKey.first4);
    }

    /** Checks whether the 'dukptSerial' field is set and is not null */
    public boolean isNotNullDukptSerial() {
        return genClient.cacheValueIsNotNull(CacheKey.dukptSerial);
    }

    /** Checks whether the 'swipeStatus' field is set and is not null */
    public boolean isNotNullSwipeStatus() {
        return genClient.cacheValueIsNotNull(CacheKey.swipeStatus);
    }

    /** Checks whether the 'fingerprint' field is set and is not null */
    public boolean isNotNullFingerprint() {
        return genClient.cacheValueIsNotNull(CacheKey.fingerprint);
    }

    /** Checks whether the 'deviceSerial' field is set and is not null */
    public boolean isNotNullDeviceSerial() {
        return genClient.cacheValueIsNotNull(CacheKey.deviceSerial);
    }

    /** Checks whether the 'manualEntered' field is set and is not null */
    public boolean isNotNullManualEntered() {
        return genClient.cacheValueIsNotNull(CacheKey.manualEntered);
    }

    /** Checks whether the 'async' field is set and is not null */
    public boolean isNotNullAsync() {
        return genClient.cacheValueIsNotNull(CacheKey.async);
    }

    /** Checks whether the 'isFallback' field is set and is not null */
    public boolean isNotNullIsFallback() {
        return genClient.cacheValueIsNotNull(CacheKey.isFallback);
    }

    /** Checks whether the 'isAuth' field is set and is not null */
    public boolean isNotNullIsAuth() {
        return genClient.cacheValueIsNotNull(CacheKey.isAuth);
    }

    /** Checks whether the 'isPrepaid' field is set and is not null */
    public boolean isNotNullIsPrepaid() {
        return genClient.cacheValueIsNotNull(CacheKey.isPrepaid);
    }

    /** Checks whether the 'cardFunction' field is set and is not null */
    public boolean isNotNullCardFunction() {
        return genClient.cacheValueIsNotNull(CacheKey.cardFunction);
    }

    /** Checks whether the 'qrCode' field is set and is not null */
    public boolean isNotNullQrCode() {
        return genClient.cacheValueIsNotNull(CacheKey.qrCode);
    }

    /** Checks whether the 'cardType' field is set and is not null */
    public boolean isNotNullCardType() {
        return genClient.cacheValueIsNotNull(CacheKey.cardType);
    }

    /** Checks whether the 'entryType' field is set and is not null */
    public boolean isNotNullEntryType() {
        return genClient.cacheValueIsNotNull(CacheKey.entryType);
    }

    /** Checks whether the 'transactionNo' field is set and is not null */
    public boolean isNotNullTransactionNo() {
        return genClient.cacheValueIsNotNull(CacheKey.transactionNo);
    }

    /** Checks whether the 'cardholderName' field is set and is not null */
    public boolean isNotNullCardholderName() {
        return genClient.cacheValueIsNotNull(CacheKey.cardholderName);
    }

    /** Checks whether the 'transactionData' field is set and is not null */
    public boolean isNotNullTransactionData() {
        return genClient.cacheValueIsNotNull(CacheKey.transactionData);
    }

    /** Checks whether the 'track1' field has been set, however the value could be null */
    public boolean hasTrack1() {
        return genClient.cacheHasKey(CacheKey.track1);
    }

    /** Checks whether the 'track2' field has been set, however the value could be null */
    public boolean hasTrack2() {
        return genClient.cacheHasKey(CacheKey.track2);
    }

    /** Checks whether the 'track3' field has been set, however the value could be null */
    public boolean hasTrack3() {
        return genClient.cacheHasKey(CacheKey.track3);
    }

    /** Checks whether the 'encrypted' field has been set, however the value could be null */
    public boolean hasEncrypted() {
        return genClient.cacheHasKey(CacheKey.encrypted);
    }

    /** Checks whether the 'maskedTrack1' field has been set, however the value could be null */
    public boolean hasMaskedTrack1() {
        return genClient.cacheHasKey(CacheKey.maskedTrack1);
    }

    /** Checks whether the 'maskedTrack2' field has been set, however the value could be null */
    public boolean hasMaskedTrack2() {
        return genClient.cacheHasKey(CacheKey.maskedTrack2);
    }

    /** Checks whether the 'maskedTrack3' field has been set, however the value could be null */
    public boolean hasMaskedTrack3() {
        return genClient.cacheHasKey(CacheKey.maskedTrack3);
    }

    /** Checks whether the 'uniqueToken' field has been set, however the value could be null */
    public boolean hasUniqueToken() {
        return genClient.cacheHasKey(CacheKey.uniqueToken);
    }

    /** Checks whether the 'pan' field has been set, however the value could be null */
    public boolean hasPan() {
        return genClient.cacheHasKey(CacheKey.pan);
    }

    /** Checks whether the 'firstName' field has been set, however the value could be null */
    public boolean hasFirstName() {
        return genClient.cacheHasKey(CacheKey.firstName);
    }

    /** Checks whether the 'lastName' field has been set, however the value could be null */
    public boolean hasLastName() {
        return genClient.cacheHasKey(CacheKey.lastName);
    }

    /** Checks whether the 'countryCode' field has been set, however the value could be null */
    public boolean hasCountryCode() {
        return genClient.cacheHasKey(CacheKey.countryCode);
    }

    /** Checks whether the 'exp' field has been set, however the value could be null */
    public boolean hasExp() {
        return genClient.cacheHasKey(CacheKey.exp);
    }

    /** Checks whether the 'streetAddress' field has been set, however the value could be null */
    public boolean hasStreetAddress() {
        return genClient.cacheHasKey(CacheKey.streetAddress);
    }

    /** Checks whether the 'zip' field has been set, however the value could be null */
    public boolean hasZip() {
        return genClient.cacheHasKey(CacheKey.zip);
    }

    /** Checks whether the 'cvv' field has been set, however the value could be null */
    public boolean hasCvv() {
        return genClient.cacheHasKey(CacheKey.cvv);
    }

    /** Checks whether the 'last4' field has been set, however the value could be null */
    public boolean hasLast4() {
        return genClient.cacheHasKey(CacheKey.last4);
    }

    /** Checks whether the 'first4' field has been set, however the value could be null */
    public boolean hasFirst4() {
        return genClient.cacheHasKey(CacheKey.first4);
    }

    /** Checks whether the 'dukptSerial' field has been set, however the value could be null */
    public boolean hasDukptSerial() {
        return genClient.cacheHasKey(CacheKey.dukptSerial);
    }

    /** Checks whether the 'swipeStatus' field has been set, however the value could be null */
    public boolean hasSwipeStatus() {
        return genClient.cacheHasKey(CacheKey.swipeStatus);
    }

    /** Checks whether the 'fingerprint' field has been set, however the value could be null */
    public boolean hasFingerprint() {
        return genClient.cacheHasKey(CacheKey.fingerprint);
    }

    /** Checks whether the 'deviceSerial' field has been set, however the value could be null */
    public boolean hasDeviceSerial() {
        return genClient.cacheHasKey(CacheKey.deviceSerial);
    }

    /** Checks whether the 'manualEntered' field has been set, however the value could be null */
    public boolean hasManualEntered() {
        return genClient.cacheHasKey(CacheKey.manualEntered);
    }

    /** Checks whether the 'async' field has been set, however the value could be null */
    public boolean hasAsync() {
        return genClient.cacheHasKey(CacheKey.async);
    }

    /** Checks whether the 'isFallback' field has been set, however the value could be null */
    public boolean hasIsFallback() {
        return genClient.cacheHasKey(CacheKey.isFallback);
    }

    /** Checks whether the 'isAuth' field has been set, however the value could be null */
    public boolean hasIsAuth() {
        return genClient.cacheHasKey(CacheKey.isAuth);
    }

    /** Checks whether the 'isPrepaid' field has been set, however the value could be null */
    public boolean hasIsPrepaid() {
        return genClient.cacheHasKey(CacheKey.isPrepaid);
    }

    /** Checks whether the 'cardFunction' field has been set, however the value could be null */
    public boolean hasCardFunction() {
        return genClient.cacheHasKey(CacheKey.cardFunction);
    }

    /** Checks whether the 'qrCode' field has been set, however the value could be null */
    public boolean hasQrCode() {
        return genClient.cacheHasKey(CacheKey.qrCode);
    }

    /** Checks whether the 'cardType' field has been set, however the value could be null */
    public boolean hasCardType() {
        return genClient.cacheHasKey(CacheKey.cardType);
    }

    /** Checks whether the 'entryType' field has been set, however the value could be null */
    public boolean hasEntryType() {
        return genClient.cacheHasKey(CacheKey.entryType);
    }

    /** Checks whether the 'transactionNo' field has been set, however the value could be null */
    public boolean hasTransactionNo() {
        return genClient.cacheHasKey(CacheKey.transactionNo);
    }

    /** Checks whether the 'cardholderName' field has been set, however the value could be null */
    public boolean hasCardholderName() {
        return genClient.cacheHasKey(CacheKey.cardholderName);
    }

    /** Checks whether the 'transactionData' field has been set, however the value could be null */
    public boolean hasTransactionData() {
        return genClient.cacheHasKey(CacheKey.transactionData);
    }

    /**
     * Sets the field 'track1'.
     */
    public PaymentRequestCardDetails setTrack1(String track1) {
        return genClient.setOther(track1, CacheKey.track1);
    }

    /**
     * Sets the field 'track2'.
     */
    public PaymentRequestCardDetails setTrack2(String track2) {
        return genClient.setOther(track2, CacheKey.track2);
    }

    /**
     * Sets the field 'track3'.
     */
    public PaymentRequestCardDetails setTrack3(String track3) {
        return genClient.setOther(track3, CacheKey.track3);
    }

    /**
     * Sets the field 'encrypted'.
     */
    public PaymentRequestCardDetails setEncrypted(Boolean encrypted) {
        return genClient.setOther(encrypted, CacheKey.encrypted);
    }

    /**
     * Sets the field 'maskedTrack1'.
     */
    public PaymentRequestCardDetails setMaskedTrack1(String maskedTrack1) {
        return genClient.setOther(maskedTrack1, CacheKey.maskedTrack1);
    }

    /**
     * Sets the field 'maskedTrack2'.
     */
    public PaymentRequestCardDetails setMaskedTrack2(String maskedTrack2) {
        return genClient.setOther(maskedTrack2, CacheKey.maskedTrack2);
    }

    /**
     * Sets the field 'maskedTrack3'.
     */
    public PaymentRequestCardDetails setMaskedTrack3(String maskedTrack3) {
        return genClient.setOther(maskedTrack3, CacheKey.maskedTrack3);
    }

    /**
     * Sets the field 'uniqueToken'.
     */
    public PaymentRequestCardDetails setUniqueToken(String uniqueToken) {
        return genClient.setOther(uniqueToken, CacheKey.uniqueToken);
    }

    /**
     * Sets the field 'pan'.
     */
    public PaymentRequestCardDetails setPan(String pan) {
        return genClient.setOther(pan, CacheKey.pan);
    }

    /**
     * Sets the field 'firstName'.
     */
    public PaymentRequestCardDetails setFirstName(String firstName) {
        return genClient.setOther(firstName, CacheKey.firstName);
    }

    /**
     * Sets the field 'lastName'.
     */
    public PaymentRequestCardDetails setLastName(String lastName) {
        return genClient.setOther(lastName, CacheKey.lastName);
    }

    /**
     * Sets the field 'countryCode'.
     */
    public PaymentRequestCardDetails setCountryCode(String countryCode) {
        return genClient.setOther(countryCode, CacheKey.countryCode);
    }

    /**
     * Sets the field 'exp'.
     */
    public PaymentRequestCardDetails setExp(String exp) {
        return genClient.setOther(exp, CacheKey.exp);
    }

    /**
     * Sets the field 'streetAddress'.
     */
    public PaymentRequestCardDetails setStreetAddress(String streetAddress) {
        return genClient.setOther(streetAddress, CacheKey.streetAddress);
    }

    /**
     * Sets the field 'zip'.
     */
    public PaymentRequestCardDetails setZip(String zip) {
        return genClient.setOther(zip, CacheKey.zip);
    }

    /**
     * Sets the field 'cvv'.
     */
    public PaymentRequestCardDetails setCvv(String cvv) {
        return genClient.setOther(cvv, CacheKey.cvv);
    }

    /**
     * Sets the field 'last4'.
     */
    public PaymentRequestCardDetails setLast4(String last4) {
        return genClient.setOther(last4, CacheKey.last4);
    }

    /**
     * Sets the field 'first4'.
     */
    public PaymentRequestCardDetails setFirst4(String first4) {
        return genClient.setOther(first4, CacheKey.first4);
    }

    /**
     * Sets the field 'dukptSerial'.
     */
    public PaymentRequestCardDetails setDukptSerial(String dukptSerial) {
        return genClient.setOther(dukptSerial, CacheKey.dukptSerial);
    }

    /**
     * Sets the field 'swipeStatus'.
     */
    public PaymentRequestCardDetails setSwipeStatus(String swipeStatus) {
        return genClient.setOther(swipeStatus, CacheKey.swipeStatus);
    }

    /**
     * Sets the field 'fingerprint'.
     */
    public PaymentRequestCardDetails setFingerprint(String fingerprint) {
        return genClient.setOther(fingerprint, CacheKey.fingerprint);
    }

    /**
     * Sets the field 'deviceSerial'.
     */
    public PaymentRequestCardDetails setDeviceSerial(String deviceSerial) {
        return genClient.setOther(deviceSerial, CacheKey.deviceSerial);
    }

    /**
     * Sets the field 'manualEntered'.
     */
    public PaymentRequestCardDetails setManualEntered(Boolean manualEntered) {
        return genClient.setOther(manualEntered, CacheKey.manualEntered);
    }

    /**
     * Sets the field 'async'.
     */
    public PaymentRequestCardDetails setAsync(Boolean async) {
        return genClient.setOther(async, CacheKey.async);
    }

    /**
     * Sets the field 'isFallback'.
     */
    public PaymentRequestCardDetails setIsFallback(Boolean isFallback) {
        return genClient.setOther(isFallback, CacheKey.isFallback);
    }

    /**
     * Sets the field 'isAuth'.
     */
    public PaymentRequestCardDetails setIsAuth(Boolean isAuth) {
        return genClient.setOther(isAuth, CacheKey.isAuth);
    }

    /**
     * Sets the field 'isPrepaid'.
     */
    public PaymentRequestCardDetails setIsPrepaid(Boolean isPrepaid) {
        return genClient.setOther(isPrepaid, CacheKey.isPrepaid);
    }

    /**
     * Sets the field 'cardFunction'.
     */
    public PaymentRequestCardDetails setCardFunction(CardFunction cardFunction) {
        return genClient.setOther(cardFunction, CacheKey.cardFunction);
    }

    /**
     * Sets the field 'qrCode'.
     */
    public PaymentRequestCardDetails setQrCode(Boolean qrCode) {
        return genClient.setOther(qrCode, CacheKey.qrCode);
    }

    /**
     * Sets the field 'cardType'.
     */
    public PaymentRequestCardDetails setCardType(com.clover.sdk.v3.payments.CardType cardType) {
        return genClient.setOther(cardType, CacheKey.cardType);
    }

    /**
     * Sets the field 'entryType'.
     */
    public PaymentRequestCardDetails setEntryType(com.clover.sdk.v3.payments.CardEntryType entryType) {
        return genClient.setOther(entryType, CacheKey.entryType);
    }

    /**
     * Sets the field 'transactionNo'.
     */
    public PaymentRequestCardDetails setTransactionNo(String transactionNo) {
        return genClient.setOther(transactionNo, CacheKey.transactionNo);
    }

    /**
     * Sets the field 'cardholderName'.
     */
    public PaymentRequestCardDetails setCardholderName(String cardholderName) {
        return genClient.setOther(cardholderName, CacheKey.cardholderName);
    }

    /**
     * Sets the field 'transactionData'.
     *
     * The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
     */
    public PaymentRequestCardDetails setTransactionData(TransactionData transactionData) {
        return genClient.setRecord(transactionData, CacheKey.transactionData);
    }

    /** Clears the 'track1' field, the 'has' method for this field will now return false */
    public void clearTrack1() {
        genClient.clear(CacheKey.track1);
    }

    /** Clears the 'track2' field, the 'has' method for this field will now return false */
    public void clearTrack2() {
        genClient.clear(CacheKey.track2);
    }

    /** Clears the 'track3' field, the 'has' method for this field will now return false */
    public void clearTrack3() {
        genClient.clear(CacheKey.track3);
    }

    /** Clears the 'encrypted' field, the 'has' method for this field will now return false */
    public void clearEncrypted() {
        genClient.clear(CacheKey.encrypted);
    }

    /** Clears the 'maskedTrack1' field, the 'has' method for this field will now return false */
    public void clearMaskedTrack1() {
        genClient.clear(CacheKey.maskedTrack1);
    }

    /** Clears the 'maskedTrack2' field, the 'has' method for this field will now return false */
    public void clearMaskedTrack2() {
        genClient.clear(CacheKey.maskedTrack2);
    }

    /** Clears the 'maskedTrack3' field, the 'has' method for this field will now return false */
    public void clearMaskedTrack3() {
        genClient.clear(CacheKey.maskedTrack3);
    }

    /** Clears the 'uniqueToken' field, the 'has' method for this field will now return false */
    public void clearUniqueToken() {
        genClient.clear(CacheKey.uniqueToken);
    }

    /** Clears the 'pan' field, the 'has' method for this field will now return false */
    public void clearPan() {
        genClient.clear(CacheKey.pan);
    }

    /** Clears the 'firstName' field, the 'has' method for this field will now return false */
    public void clearFirstName() {
        genClient.clear(CacheKey.firstName);
    }

    /** Clears the 'lastName' field, the 'has' method for this field will now return false */
    public void clearLastName() {
        genClient.clear(CacheKey.lastName);
    }

    /** Clears the 'countryCode' field, the 'has' method for this field will now return false */
    public void clearCountryCode() {
        genClient.clear(CacheKey.countryCode);
    }

    /** Clears the 'exp' field, the 'has' method for this field will now return false */
    public void clearExp() {
        genClient.clear(CacheKey.exp);
    }

    /** Clears the 'streetAddress' field, the 'has' method for this field will now return false */
    public void clearStreetAddress() {
        genClient.clear(CacheKey.streetAddress);
    }

    /** Clears the 'zip' field, the 'has' method for this field will now return false */
    public void clearZip() {
        genClient.clear(CacheKey.zip);
    }

    /** Clears the 'cvv' field, the 'has' method for this field will now return false */
    public void clearCvv() {
        genClient.clear(CacheKey.cvv);
    }

    /** Clears the 'last4' field, the 'has' method for this field will now return false */
    public void clearLast4() {
        genClient.clear(CacheKey.last4);
    }

    /** Clears the 'first4' field, the 'has' method for this field will now return false */
    public void clearFirst4() {
        genClient.clear(CacheKey.first4);
    }

    /** Clears the 'dukptSerial' field, the 'has' method for this field will now return false */
    public void clearDukptSerial() {
        genClient.clear(CacheKey.dukptSerial);
    }

    /** Clears the 'swipeStatus' field, the 'has' method for this field will now return false */
    public void clearSwipeStatus() {
        genClient.clear(CacheKey.swipeStatus);
    }

    /** Clears the 'fingerprint' field, the 'has' method for this field will now return false */
    public void clearFingerprint() {
        genClient.clear(CacheKey.fingerprint);
    }

    /** Clears the 'deviceSerial' field, the 'has' method for this field will now return false */
    public void clearDeviceSerial() {
        genClient.clear(CacheKey.deviceSerial);
    }

    /** Clears the 'manualEntered' field, the 'has' method for this field will now return false */
    public void clearManualEntered() {
        genClient.clear(CacheKey.manualEntered);
    }

    /** Clears the 'async' field, the 'has' method for this field will now return false */
    public void clearAsync() {
        genClient.clear(CacheKey.async);
    }

    /** Clears the 'isFallback' field, the 'has' method for this field will now return false */
    public void clearIsFallback() {
        genClient.clear(CacheKey.isFallback);
    }

    /** Clears the 'isAuth' field, the 'has' method for this field will now return false */
    public void clearIsAuth() {
        genClient.clear(CacheKey.isAuth);
    }

    /** Clears the 'isPrepaid' field, the 'has' method for this field will now return false */
    public void clearIsPrepaid() {
        genClient.clear(CacheKey.isPrepaid);
    }

    /** Clears the 'cardFunction' field, the 'has' method for this field will now return false */
    public void clearCardFunction() {
        genClient.clear(CacheKey.cardFunction);
    }

    /** Clears the 'qrCode' field, the 'has' method for this field will now return false */
    public void clearQrCode() {
        genClient.clear(CacheKey.qrCode);
    }

    /** Clears the 'cardType' field, the 'has' method for this field will now return false */
    public void clearCardType() {
        genClient.clear(CacheKey.cardType);
    }

    /** Clears the 'entryType' field, the 'has' method for this field will now return false */
    public void clearEntryType() {
        genClient.clear(CacheKey.entryType);
    }

    /** Clears the 'transactionNo' field, the 'has' method for this field will now return false */
    public void clearTransactionNo() {
        genClient.clear(CacheKey.transactionNo);
    }

    /** Clears the 'cardholderName' field, the 'has' method for this field will now return false */
    public void clearCardholderName() {
        genClient.clear(CacheKey.cardholderName);
    }

    /** Clears the 'transactionData' field, the 'has' method for this field will now return false */
    public void clearTransactionData() {
        genClient.clear(CacheKey.transactionData);
    }

    /**
     * Returns true if this instance has any changes.
     */
    public boolean containsChanges() {
        return genClient.containsChanges();
    }

    /**
     * Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
     */
    public void resetChangeLog() {
        genClient.resetChangeLog();
    }

    /**
     * Create a copy of this instance that contains only fields that were set after the constructor was called.
     */
    public PaymentRequestCardDetails copyChanges() {
        PaymentRequestCardDetails copy = new PaymentRequestCardDetails();
        copy.mergeChanges(this);
        copy.resetChangeLog();
        return copy;
    }

    /**
     * Copy all the changed fields from the given source to this instance.
     */
    public void mergeChanges(PaymentRequestCardDetails src) {
        if (src.genClient.getChangeLog() != null) {
            genClient.mergeChanges(new PaymentRequestCardDetails(src).getJSONObject(), src.genClient);
        }
    }

    /**
     * Gets a Bundle which can be used to get and set data attached to this instance. The attached Bundle will be
     * parcelled but not jsonified.
     */
    public android.os.Bundle getBundle() {
        return genClient.getBundle();
    }

    @Override
    public String toString() {
        return genClient.toString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(android.os.Parcel dest, int flags) {
        genClient.writeToParcel(dest, flags);
    }

    public static final android.os.Parcelable.Creator<PaymentRequestCardDetails> CREATOR = new android.os.Parcelable.Creator<PaymentRequestCardDetails>() {
        @Override
        public PaymentRequestCardDetails createFromParcel(android.os.Parcel in) {
            PaymentRequestCardDetails instance = new PaymentRequestCardDetails(
                    com.clover.sdk.v3.JsonParcelHelper.ObjectWrapper.CREATOR.createFromParcel(in).unwrap());
            instance.genClient.setBundle(in.readBundle(getClass().getClassLoader()));
            instance.genClient.setChangeLog(in.readBundle());
            return instance;
        }

        @Override
        public PaymentRequestCardDetails[] newArray(int size) {
            return new PaymentRequestCardDetails[size];
        }
    };

    public static final com.clover.sdk.JSONifiable.Creator<PaymentRequestCardDetails> JSON_CREATOR = new com.clover.sdk.JSONifiable.Creator<PaymentRequestCardDetails>() {
        @Override
        public PaymentRequestCardDetails create(org.json.JSONObject jsonObject) {
            return new PaymentRequestCardDetails(jsonObject);
        }
    };

    public interface Constraints {

        public static final boolean TRACK1_IS_REQUIRED = false;

        public static final boolean TRACK2_IS_REQUIRED = false;

        public static final boolean TRACK3_IS_REQUIRED = false;

        public static final boolean ENCRYPTED_IS_REQUIRED = false;

        public static final boolean MASKEDTRACK1_IS_REQUIRED = false;

        public static final boolean MASKEDTRACK2_IS_REQUIRED = false;

        public static final boolean MASKEDTRACK3_IS_REQUIRED = false;

        public static final boolean UNIQUETOKEN_IS_REQUIRED = false;

        public static final boolean PAN_IS_REQUIRED = false;

        public static final boolean FIRSTNAME_IS_REQUIRED = false;

        public static final boolean LASTNAME_IS_REQUIRED = false;

        public static final boolean COUNTRYCODE_IS_REQUIRED = false;

        public static final boolean EXP_IS_REQUIRED = false;

        public static final boolean STREETADDRESS_IS_REQUIRED = false;

        public static final boolean ZIP_IS_REQUIRED = false;

        public static final boolean CVV_IS_REQUIRED = false;

        public static final boolean LAST4_IS_REQUIRED = false;

        public static final boolean FIRST4_IS_REQUIRED = false;

        public static final boolean DUKPTSERIAL_IS_REQUIRED = false;

        public static final boolean SWIPESTATUS_IS_REQUIRED = false;

        public static final boolean FINGERPRINT_IS_REQUIRED = false;

        public static final boolean DEVICESERIAL_IS_REQUIRED = false;

        public static final boolean MANUALENTERED_IS_REQUIRED = false;

        public static final boolean ASYNC_IS_REQUIRED = false;

        public static final boolean ISFALLBACK_IS_REQUIRED = false;

        public static final boolean ISAUTH_IS_REQUIRED = false;

        public static final boolean ISPREPAID_IS_REQUIRED = false;

        public static final boolean CARDFUNCTION_IS_REQUIRED = false;

        public static final boolean QRCODE_IS_REQUIRED = false;

        public static final boolean CARDTYPE_IS_REQUIRED = false;

        public static final boolean ENTRYTYPE_IS_REQUIRED = false;

        public static final boolean TRANSACTIONNO_IS_REQUIRED = false;

        public static final boolean CARDHOLDERNAME_IS_REQUIRED = false;

        public static final boolean TRANSACTIONDATA_IS_REQUIRED = false;

    }

}