///
/// NitroPurchase.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/JSIConverter.hpp>)
#include <NitroModules/JSIConverter.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/NitroDefines.hpp>)
#include <NitroModules/NitroDefines.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/JSIHelpers.hpp>)
#include <NitroModules/JSIHelpers.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
#include <NitroModules/PropNameIDCache.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `IapPlatform` to properly resolve imports.
namespace margelo::nitro::iap { enum class IapPlatform; }
// Forward declaration of `IapStore` to properly resolve imports.
namespace margelo::nitro::iap { enum class IapStore; }
// Forward declaration of `PurchaseState` to properly resolve imports.
namespace margelo::nitro::iap { enum class PurchaseState; }
// Forward declaration of `NitroRenewalInfoIOS` to properly resolve imports.
namespace margelo::nitro::iap { struct NitroRenewalInfoIOS; }

#include <string>
#include <NitroModules/Null.hpp>
#include <variant>
#include <optional>
#include "IapPlatform.hpp"
#include "IapStore.hpp"
#include "PurchaseState.hpp"
#include "NitroRenewalInfoIOS.hpp"

namespace margelo::nitro::iap {

  /**
   * A struct which can be represented as a JavaScript object (NitroPurchase).
   */
  struct NitroPurchase final {
  public:
    std::string id     SWIFT_PRIVATE;
    std::string productId     SWIFT_PRIVATE;
    double transactionDate     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> purchaseToken     SWIFT_PRIVATE;
    IapPlatform platform     SWIFT_PRIVATE;
    IapStore store     SWIFT_PRIVATE;
    double quantity     SWIFT_PRIVATE;
    PurchaseState purchaseState     SWIFT_PRIVATE;
    bool isAutoRenewing     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, double>> quantityIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, double>> originalTransactionDateIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> originalTransactionIdentifierIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> appAccountToken     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> appBundleIdIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> countryCodeIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> currencyCodeIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> currencySymbolIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> environmentIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, double>> expirationDateIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, bool>> isUpgradedIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> offerIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> ownershipTypeIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> reasonIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> reasonStringRepresentationIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, double>> revocationDateIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> revocationReasonIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> storefrontCountryCodeIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> subscriptionGroupIdIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> transactionReasonIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> webOrderLineItemIdIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, NitroRenewalInfoIOS>> renewalInfoIOS     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> purchaseTokenAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> dataAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> signatureAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, bool>> autoRenewingAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, double>> purchaseStateAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, bool>> isAcknowledgedAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> packageNameAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> obfuscatedAccountIdAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> obfuscatedProfileIdAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, std::string>> developerPayloadAndroid     SWIFT_PRIVATE;
    std::optional<std::variant<nitro::NullType, bool>> isSuspendedAndroid     SWIFT_PRIVATE;

  public:
    NitroPurchase() = default;
    explicit NitroPurchase(std::string id, std::string productId, double transactionDate, std::optional<std::variant<nitro::NullType, std::string>> purchaseToken, IapPlatform platform, IapStore store, double quantity, PurchaseState purchaseState, bool isAutoRenewing, std::optional<std::variant<nitro::NullType, double>> quantityIOS, std::optional<std::variant<nitro::NullType, double>> originalTransactionDateIOS, std::optional<std::variant<nitro::NullType, std::string>> originalTransactionIdentifierIOS, std::optional<std::variant<nitro::NullType, std::string>> appAccountToken, std::optional<std::variant<nitro::NullType, std::string>> appBundleIdIOS, std::optional<std::variant<nitro::NullType, std::string>> countryCodeIOS, std::optional<std::variant<nitro::NullType, std::string>> currencyCodeIOS, std::optional<std::variant<nitro::NullType, std::string>> currencySymbolIOS, std::optional<std::variant<nitro::NullType, std::string>> environmentIOS, std::optional<std::variant<nitro::NullType, double>> expirationDateIOS, std::optional<std::variant<nitro::NullType, bool>> isUpgradedIOS, std::optional<std::variant<nitro::NullType, std::string>> offerIOS, std::optional<std::variant<nitro::NullType, std::string>> ownershipTypeIOS, std::optional<std::variant<nitro::NullType, std::string>> reasonIOS, std::optional<std::variant<nitro::NullType, std::string>> reasonStringRepresentationIOS, std::optional<std::variant<nitro::NullType, double>> revocationDateIOS, std::optional<std::variant<nitro::NullType, std::string>> revocationReasonIOS, std::optional<std::variant<nitro::NullType, std::string>> storefrontCountryCodeIOS, std::optional<std::variant<nitro::NullType, std::string>> subscriptionGroupIdIOS, std::optional<std::variant<nitro::NullType, std::string>> transactionReasonIOS, std::optional<std::variant<nitro::NullType, std::string>> webOrderLineItemIdIOS, std::optional<std::variant<nitro::NullType, NitroRenewalInfoIOS>> renewalInfoIOS, std::optional<std::variant<nitro::NullType, std::string>> purchaseTokenAndroid, std::optional<std::variant<nitro::NullType, std::string>> dataAndroid, std::optional<std::variant<nitro::NullType, std::string>> signatureAndroid, std::optional<std::variant<nitro::NullType, bool>> autoRenewingAndroid, std::optional<std::variant<nitro::NullType, double>> purchaseStateAndroid, std::optional<std::variant<nitro::NullType, bool>> isAcknowledgedAndroid, std::optional<std::variant<nitro::NullType, std::string>> packageNameAndroid, std::optional<std::variant<nitro::NullType, std::string>> obfuscatedAccountIdAndroid, std::optional<std::variant<nitro::NullType, std::string>> obfuscatedProfileIdAndroid, std::optional<std::variant<nitro::NullType, std::string>> developerPayloadAndroid, std::optional<std::variant<nitro::NullType, bool>> isSuspendedAndroid): id(id), productId(productId), transactionDate(transactionDate), purchaseToken(purchaseToken), platform(platform), store(store), quantity(quantity), purchaseState(purchaseState), isAutoRenewing(isAutoRenewing), quantityIOS(quantityIOS), originalTransactionDateIOS(originalTransactionDateIOS), originalTransactionIdentifierIOS(originalTransactionIdentifierIOS), appAccountToken(appAccountToken), appBundleIdIOS(appBundleIdIOS), countryCodeIOS(countryCodeIOS), currencyCodeIOS(currencyCodeIOS), currencySymbolIOS(currencySymbolIOS), environmentIOS(environmentIOS), expirationDateIOS(expirationDateIOS), isUpgradedIOS(isUpgradedIOS), offerIOS(offerIOS), ownershipTypeIOS(ownershipTypeIOS), reasonIOS(reasonIOS), reasonStringRepresentationIOS(reasonStringRepresentationIOS), revocationDateIOS(revocationDateIOS), revocationReasonIOS(revocationReasonIOS), storefrontCountryCodeIOS(storefrontCountryCodeIOS), subscriptionGroupIdIOS(subscriptionGroupIdIOS), transactionReasonIOS(transactionReasonIOS), webOrderLineItemIdIOS(webOrderLineItemIdIOS), renewalInfoIOS(renewalInfoIOS), purchaseTokenAndroid(purchaseTokenAndroid), dataAndroid(dataAndroid), signatureAndroid(signatureAndroid), autoRenewingAndroid(autoRenewingAndroid), purchaseStateAndroid(purchaseStateAndroid), isAcknowledgedAndroid(isAcknowledgedAndroid), packageNameAndroid(packageNameAndroid), obfuscatedAccountIdAndroid(obfuscatedAccountIdAndroid), obfuscatedProfileIdAndroid(obfuscatedProfileIdAndroid), developerPayloadAndroid(developerPayloadAndroid), isSuspendedAndroid(isSuspendedAndroid) {}

  public:
    friend bool operator==(const NitroPurchase& lhs, const NitroPurchase& rhs) = default;
  };

} // namespace margelo::nitro::iap

namespace margelo::nitro {

  // C++ NitroPurchase <> JS NitroPurchase (object)
  template <>
  struct JSIConverter<margelo::nitro::iap::NitroPurchase> final {
    static inline margelo::nitro::iap::NitroPurchase fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
      jsi::Object obj = arg.asObject(runtime);
      return margelo::nitro::iap::NitroPurchase(
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "productId"))),
        JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionDate"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseToken"))),
        JSIConverter<margelo::nitro::iap::IapPlatform>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "platform"))),
        JSIConverter<margelo::nitro::iap::IapStore>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "store"))),
        JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "quantity"))),
        JSIConverter<margelo::nitro::iap::PurchaseState>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseState"))),
        JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAutoRenewing"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "quantityIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionDateIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionIdentifierIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appAccountToken"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appBundleIdIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "countryCodeIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "currencyCodeIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "currencySymbolIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "environmentIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expirationDateIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isUpgradedIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ownershipTypeIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "reasonIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "reasonStringRepresentationIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "revocationDateIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "revocationReasonIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "storefrontCountryCodeIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subscriptionGroupIdIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionReasonIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "webOrderLineItemIdIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRenewalInfoIOS>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "renewalInfoIOS"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseTokenAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dataAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signatureAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "autoRenewingAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseStateAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAcknowledgedAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "packageNameAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedAccountIdAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedProfileIdAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "developerPayloadAndroid"))),
        JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isSuspendedAndroid")))
      );
    }
    static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::iap::NitroPurchase& arg) {
      jsi::Object obj(runtime);
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "id"), JSIConverter<std::string>::toJSI(runtime, arg.id));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "productId"), JSIConverter<std::string>::toJSI(runtime, arg.productId));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "transactionDate"), JSIConverter<double>::toJSI(runtime, arg.transactionDate));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "purchaseToken"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.purchaseToken));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "platform"), JSIConverter<margelo::nitro::iap::IapPlatform>::toJSI(runtime, arg.platform));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "store"), JSIConverter<margelo::nitro::iap::IapStore>::toJSI(runtime, arg.store));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "quantity"), JSIConverter<double>::toJSI(runtime, arg.quantity));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "purchaseState"), JSIConverter<margelo::nitro::iap::PurchaseState>::toJSI(runtime, arg.purchaseState));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isAutoRenewing"), JSIConverter<bool>::toJSI(runtime, arg.isAutoRenewing));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "quantityIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.quantityIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionDateIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.originalTransactionDateIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionIdentifierIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.originalTransactionIdentifierIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "appAccountToken"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.appAccountToken));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "appBundleIdIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.appBundleIdIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "countryCodeIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.countryCodeIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "currencyCodeIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.currencyCodeIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "currencySymbolIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.currencySymbolIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "environmentIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.environmentIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "expirationDateIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.expirationDateIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isUpgradedIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::toJSI(runtime, arg.isUpgradedIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "offerIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.offerIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "ownershipTypeIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.ownershipTypeIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "reasonIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.reasonIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "reasonStringRepresentationIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.reasonStringRepresentationIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "revocationDateIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.revocationDateIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "revocationReasonIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.revocationReasonIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "storefrontCountryCodeIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.storefrontCountryCodeIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "subscriptionGroupIdIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.subscriptionGroupIdIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "transactionReasonIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.transactionReasonIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "webOrderLineItemIdIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.webOrderLineItemIdIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "renewalInfoIOS"), JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRenewalInfoIOS>>>::toJSI(runtime, arg.renewalInfoIOS));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "purchaseTokenAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.purchaseTokenAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "dataAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.dataAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "signatureAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.signatureAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "autoRenewingAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::toJSI(runtime, arg.autoRenewingAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "purchaseStateAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::toJSI(runtime, arg.purchaseStateAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isAcknowledgedAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::toJSI(runtime, arg.isAcknowledgedAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "packageNameAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.packageNameAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedAccountIdAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.obfuscatedAccountIdAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedProfileIdAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.obfuscatedProfileIdAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "developerPayloadAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::toJSI(runtime, arg.developerPayloadAndroid));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isSuspendedAndroid"), JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::toJSI(runtime, arg.isSuspendedAndroid));
      return obj;
    }
    static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
      if (!value.isObject()) {
        return false;
      }
      jsi::Object obj = value.getObject(runtime);
      if (!nitro::isPlainObject(runtime, obj)) {
        return false;
      }
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "productId")))) return false;
      if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionDate")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseToken")))) return false;
      if (!JSIConverter<margelo::nitro::iap::IapPlatform>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "platform")))) return false;
      if (!JSIConverter<margelo::nitro::iap::IapStore>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "store")))) return false;
      if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "quantity")))) return false;
      if (!JSIConverter<margelo::nitro::iap::PurchaseState>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseState")))) return false;
      if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAutoRenewing")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "quantityIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionDateIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "originalTransactionIdentifierIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appAccountToken")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "appBundleIdIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "countryCodeIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "currencyCodeIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "currencySymbolIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "environmentIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expirationDateIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isUpgradedIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "offerIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ownershipTypeIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "reasonIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "reasonStringRepresentationIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "revocationDateIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "revocationReasonIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "storefrontCountryCodeIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subscriptionGroupIdIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionReasonIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "webOrderLineItemIdIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, margelo::nitro::iap::NitroRenewalInfoIOS>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "renewalInfoIOS")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseTokenAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dataAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "signatureAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "autoRenewingAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "purchaseStateAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isAcknowledgedAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "packageNameAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedAccountIdAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "obfuscatedProfileIdAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, std::string>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "developerPayloadAndroid")))) return false;
      if (!JSIConverter<std::optional<std::variant<nitro::NullType, bool>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isSuspendedAndroid")))) return false;
      return true;
    }
  };

} // namespace margelo::nitro
