"use strict";
/* eslint-disable-next-line no-unused-vars */
function __export(m) {
/* eslint-disable-next-line no-prototype-builtins */
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable-next-line no-unused-vars */
var jtv = require('@mojotech/json-type-validation');
/* eslint-disable-next-line no-unused-vars */
var damlTypes = require('@daml/types');


exports.OcfEmail = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({email_address: damlTypes.Text.decoder, email_type: exports.OcfEmailType.decoder, }); }),
  encode: function (__typed__) {
  return {
    email_address: damlTypes.Text.encode(__typed__.email_address),
    email_type: exports.OcfEmailType.encode(__typed__.email_type),
  };
}
,
};



exports.OcfEmailType = {
  OcfEmailTypeBusiness: 'OcfEmailTypeBusiness',
  OcfEmailTypePersonal: 'OcfEmailTypePersonal',
  OcfEmailTypeOther: 'OcfEmailTypeOther',
  keys: ['OcfEmailTypeBusiness','OcfEmailTypePersonal','OcfEmailTypeOther',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfEmailType.OcfEmailTypeBusiness), jtv.constant(exports.OcfEmailType.OcfEmailTypePersonal), jtv.constant(exports.OcfEmailType.OcfEmailTypeOther)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfPhone = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({phone_number: damlTypes.Text.decoder, phone_type: exports.OcfPhoneType.decoder, }); }),
  encode: function (__typed__) {
  return {
    phone_number: damlTypes.Text.encode(__typed__.phone_number),
    phone_type: exports.OcfPhoneType.encode(__typed__.phone_type),
  };
}
,
};



exports.OcfPhoneType = {
  OcfPhoneHome: 'OcfPhoneHome',
  OcfPhoneMobile: 'OcfPhoneMobile',
  OcfPhoneBusiness: 'OcfPhoneBusiness',
  OcfPhoneOther: 'OcfPhoneOther',
  keys: ['OcfPhoneHome','OcfPhoneMobile','OcfPhoneBusiness','OcfPhoneOther',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfPhoneType.OcfPhoneHome), jtv.constant(exports.OcfPhoneType.OcfPhoneMobile), jtv.constant(exports.OcfPhoneType.OcfPhoneBusiness), jtv.constant(exports.OcfPhoneType.OcfPhoneOther)); }),
  encode: function (__typed__) { return __typed__; },
};

