"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.OcfConversionTrigger = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_right: exports.OcfAnyConversionRight.decoder, trigger_id: damlTypes.Text.decoder, type_: exports.OcfConversionTriggerType.decoder, nickname: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), trigger_condition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), trigger_date: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), trigger_description: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
  encode: function (__typed__) {
  return {
    conversion_right: exports.OcfAnyConversionRight.encode(__typed__.conversion_right),
    trigger_id: damlTypes.Text.encode(__typed__.trigger_id),
    type_: exports.OcfConversionTriggerType.encode(__typed__.type_),
    nickname: damlTypes.Optional(damlTypes.Text).encode(__typed__.nickname),
    trigger_condition: damlTypes.Optional(damlTypes.Text).encode(__typed__.trigger_condition),
    trigger_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.trigger_date),
    trigger_description: damlTypes.Optional(damlTypes.Text).encode(__typed__.trigger_description),
  };
}
,
};



exports.OcfAnyConversionRight = {
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfRightConvertible'), value: exports.OcfConvertibleConversionRight.decoder, }), jtv.object({tag: jtv.constant('OcfRightWarrant'), value: exports.OcfWarrantConversionRight.decoder, }), jtv.object({tag: jtv.constant('OcfRightStockClass'), value: exports.OcfStockClassConversionRight.decoder, })); }),
  encode: function (__typed__) {
  switch(__typed__.tag) {
    case 'OcfRightConvertible': return {tag: __typed__.tag, value: exports.OcfConvertibleConversionRight.encode(__typed__.value)};
    case 'OcfRightWarrant': return {tag: __typed__.tag, value: exports.OcfWarrantConversionRight.encode(__typed__.value)};
    case 'OcfRightStockClass': return {tag: __typed__.tag, value: exports.OcfStockClassConversionRight.encode(__typed__.value)};
    default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfAnyConversionRight';
  }
}
,
};



exports.OcfConversionTriggerType = {
  OcfTriggerTypeTypeAutomaticOnCondition: 'OcfTriggerTypeTypeAutomaticOnCondition',
  OcfTriggerTypeTypeAutomaticOnDate: 'OcfTriggerTypeTypeAutomaticOnDate',
  OcfTriggerTypeTypeElectiveInRange: 'OcfTriggerTypeTypeElectiveInRange',
  OcfTriggerTypeTypeElectiveOnCondition: 'OcfTriggerTypeTypeElectiveOnCondition',
  OcfTriggerTypeTypeElectiveAtWill: 'OcfTriggerTypeTypeElectiveAtWill',
  OcfTriggerTypeTypeUnspecified: 'OcfTriggerTypeTypeUnspecified',
  keys: ['OcfTriggerTypeTypeAutomaticOnCondition','OcfTriggerTypeTypeAutomaticOnDate','OcfTriggerTypeTypeElectiveInRange','OcfTriggerTypeTypeElectiveOnCondition','OcfTriggerTypeTypeElectiveAtWill','OcfTriggerTypeTypeUnspecified',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeAutomaticOnCondition), jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeAutomaticOnDate), jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeElectiveInRange), jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeElectiveOnCondition), jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeElectiveAtWill), jtv.constant(exports.OcfConversionTriggerType.OcfTriggerTypeTypeUnspecified)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfConvertibleConversionRight = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_mechanism: exports.OcfConvertibleConversionMechanism.decoder, type_: damlTypes.Text.decoder, converts_to_future_round: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Bool).decoder), converts_to_stock_class_id: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
  encode: function (__typed__) {
  return {
    conversion_mechanism: exports.OcfConvertibleConversionMechanism.encode(__typed__.conversion_mechanism),
    type_: damlTypes.Text.encode(__typed__.type_),
    converts_to_future_round: damlTypes.Optional(damlTypes.Bool).encode(__typed__.converts_to_future_round),
    converts_to_stock_class_id: damlTypes.Optional(damlTypes.Text).encode(__typed__.converts_to_stock_class_id),
  };
}
,
};



exports.OcfConvertibleConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfConvMechSAFE'), value: exports.OcfSAFEConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechNote'), value: exports.OcfNoteConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechCustom'), value: exports.OcfCustomConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechPercentCapitalization'), value: exports.OcfPercentCapitalizationConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechFixedAmount'), value: exports.OcfFixedAmountConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechSharePriceBased'), value: exports.OcfSharePriceBasedConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechValuationBased'), value: exports.OcfValuationBasedConversionMechanism.decoder, }), jtv.object({tag: jtv.constant('OcfConvMechRatio'), value: exports.OcfRatio.decoder, })); }),
  encode: function (__typed__) {
  switch(__typed__.tag) {
    case 'OcfConvMechSAFE': return {tag: __typed__.tag, value: exports.OcfSAFEConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechNote': return {tag: __typed__.tag, value: exports.OcfNoteConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechCustom': return {tag: __typed__.tag, value: exports.OcfCustomConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechPercentCapitalization': return {tag: __typed__.tag, value: exports.OcfPercentCapitalizationConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechFixedAmount': return {tag: __typed__.tag, value: exports.OcfFixedAmountConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechSharePriceBased': return {tag: __typed__.tag, value: exports.OcfSharePriceBasedConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechValuationBased': return {tag: __typed__.tag, value: exports.OcfValuationBasedConversionMechanism.encode(__typed__.value)};
    case 'OcfConvMechRatio': return {tag: __typed__.tag, value: exports.OcfRatio.encode(__typed__.value)};
    default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfConvertibleConversionMechanism';
  }
}
,
};



exports.OcfConvertibleType = {
  OcfConvertibleNote: 'OcfConvertibleNote',
  OcfConvertibleSafe: 'OcfConvertibleSafe',
  OcfConvertibleSecurity: 'OcfConvertibleSecurity',
  keys: ['OcfConvertibleNote','OcfConvertibleSafe','OcfConvertibleSecurity',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfConvertibleType.OcfConvertibleNote), jtv.constant(exports.OcfConvertibleType.OcfConvertibleSafe), jtv.constant(exports.OcfConvertibleType.OcfConvertibleSecurity)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfWarrantConversionRight = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_mechanism: exports.OcfWarrantConversionMechanism.decoder, type_: damlTypes.Text.decoder, converts_to_future_round: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Bool).decoder), converts_to_stock_class_id: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
  encode: function (__typed__) {
  return {
    conversion_mechanism: exports.OcfWarrantConversionMechanism.encode(__typed__.conversion_mechanism),
    type_: damlTypes.Text.encode(__typed__.type_),
    converts_to_future_round: damlTypes.Optional(damlTypes.Bool).encode(__typed__.converts_to_future_round),
    converts_to_stock_class_id: damlTypes.Optional(damlTypes.Text).encode(__typed__.converts_to_stock_class_id),
  };
}
,
};



exports.OcfWarrantConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.object({tag: jtv.constant('OcfWarrantMechanismCustom'), value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismCustom.decoder, }), jtv.object({tag: jtv.constant('OcfWarrantMechanismPercentCapitalization'), value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismPercentCapitalization.decoder, }), jtv.object({tag: jtv.constant('OcfWarrantMechanismFixedAmount'), value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismFixedAmount.decoder, }), jtv.object({tag: jtv.constant('OcfWarrantMechanismValuationBased'), value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismValuationBased.decoder, }), jtv.object({tag: jtv.constant('OcfWarrantMechanismSharePriceBased'), value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismSharePriceBased.decoder, })); }),
  encode: function (__typed__) {
  switch(__typed__.tag) {
    case 'OcfWarrantMechanismCustom': return {tag: __typed__.tag, value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismCustom.encode(__typed__.value)};
    case 'OcfWarrantMechanismPercentCapitalization': return {tag: __typed__.tag, value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismPercentCapitalization.encode(__typed__.value)};
    case 'OcfWarrantMechanismFixedAmount': return {tag: __typed__.tag, value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismFixedAmount.encode(__typed__.value)};
    case 'OcfWarrantMechanismValuationBased': return {tag: __typed__.tag, value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismValuationBased.encode(__typed__.value)};
    case 'OcfWarrantMechanismSharePriceBased': return {tag: __typed__.tag, value: exports.OcfWarrantConversionMechanism.OcfWarrantMechanismSharePriceBased.encode(__typed__.value)};
    default: throw 'unrecognized type tag: ' + __typed__.tag + ' while serializing a value of type OcfWarrantConversionMechanism';
  }
}
,
  OcfWarrantMechanismCustom:({
    decoder: damlTypes.lazyMemo(function () { return jtv.object({custom_conversion_description: damlTypes.Text.decoder, }); }),
    encode: function (__typed__) {
  return {
    custom_conversion_description: damlTypes.Text.encode(__typed__.custom_conversion_description),
  };
}
,
  }),
  OcfWarrantMechanismPercentCapitalization:({
    decoder: damlTypes.lazyMemo(function () { return jtv.object({converts_to_percent: damlTypes.Numeric(10).decoder, capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), }); }),
    encode: function (__typed__) {
  return {
    converts_to_percent: damlTypes.Numeric(10).encode(__typed__.converts_to_percent),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
  };
}
,
  }),
  OcfWarrantMechanismFixedAmount:({
    decoder: damlTypes.lazyMemo(function () { return jtv.object({converts_to_quantity: damlTypes.Numeric(10).decoder, }); }),
    encode: function (__typed__) {
  return {
    converts_to_quantity: damlTypes.Numeric(10).encode(__typed__.converts_to_quantity),
  };
}
,
  }),
  OcfWarrantMechanismValuationBased:({
    decoder: damlTypes.lazyMemo(function () { return jtv.object({valuation_type: damlTypes.Text.decoder, valuation_amount: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), }); }),
    encode: function (__typed__) {
  return {
    valuation_type: damlTypes.Text.encode(__typed__.valuation_type),
    valuation_amount: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.valuation_amount),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
  };
}
,
  }),
  OcfWarrantMechanismSharePriceBased:({
    decoder: damlTypes.lazyMemo(function () { return jtv.object({description: damlTypes.Text.decoder, discount: damlTypes.Bool.decoder, discount_percentage: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), discount_amount: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), }); }),
    encode: function (__typed__) {
  return {
    description: damlTypes.Text.encode(__typed__.description),
    discount: damlTypes.Bool.encode(__typed__.discount),
    discount_percentage: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.discount_percentage),
    discount_amount: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.discount_amount),
  };
}
,
  }),
};













exports.OcfNoteConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({compounding_type: exports.OcfCompoundingType.decoder, day_count_convention: exports.OcfDayCountType.decoder, interest_accrual_period: exports.OcfAccrualPeriodType.decoder, interest_payout: exports.OcfInterestPayoutType.decoder, interest_rates: damlTypes.List(exports.OcfInterestRate).decoder, capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), conversion_discount: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), conversion_mfn: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Bool).decoder), conversion_valuation_cap: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), exit_multiple: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfRatio).decoder), }); }),
  encode: function (__typed__) {
  return {
    compounding_type: exports.OcfCompoundingType.encode(__typed__.compounding_type),
    day_count_convention: exports.OcfDayCountType.encode(__typed__.day_count_convention),
    interest_accrual_period: exports.OcfAccrualPeriodType.encode(__typed__.interest_accrual_period),
    interest_payout: exports.OcfInterestPayoutType.encode(__typed__.interest_payout),
    interest_rates: damlTypes.List(exports.OcfInterestRate).encode(__typed__.interest_rates),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
    conversion_discount: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.conversion_discount),
    conversion_mfn: damlTypes.Optional(damlTypes.Bool).encode(__typed__.conversion_mfn),
    conversion_valuation_cap: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.conversion_valuation_cap),
    exit_multiple: damlTypes.Optional(exports.OcfRatio).encode(__typed__.exit_multiple),
  };
}
,
};



exports.OcfSAFEConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_mfn: damlTypes.Bool.decoder, capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), conversion_discount: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), conversion_timing: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), conversion_valuation_cap: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), exit_multiple: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfRatio).decoder), }); }),
  encode: function (__typed__) {
  return {
    conversion_mfn: damlTypes.Bool.encode(__typed__.conversion_mfn),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
    conversion_discount: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.conversion_discount),
    conversion_timing: damlTypes.Optional(damlTypes.Text).encode(__typed__.conversion_timing),
    conversion_valuation_cap: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.conversion_valuation_cap),
    exit_multiple: damlTypes.Optional(exports.OcfRatio).encode(__typed__.exit_multiple),
  };
}
,
};



exports.OcfValuationBasedConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({valuation_type: exports.OcfValuationBasedFormulaType.decoder, capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), valuation_amount: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), }); }),
  encode: function (__typed__) {
  return {
    valuation_type: exports.OcfValuationBasedFormulaType.encode(__typed__.valuation_type),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
    valuation_amount: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.valuation_amount),
  };
}
,
};



exports.OcfValuationBasedFormulaType = {
  OcfValuationCap: 'OcfValuationCap',
  OcfValuationFixed: 'OcfValuationFixed',
  OcfValuationActual: 'OcfValuationActual',
  keys: ['OcfValuationCap','OcfValuationFixed','OcfValuationActual',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfValuationBasedFormulaType.OcfValuationCap), jtv.constant(exports.OcfValuationBasedFormulaType.OcfValuationFixed), jtv.constant(exports.OcfValuationBasedFormulaType.OcfValuationActual)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfSharePriceBasedConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({description: damlTypes.Text.decoder, discount: damlTypes.Bool.decoder, discount_amount: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), discount_percentage: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), }); }),
  encode: function (__typed__) {
  return {
    description: damlTypes.Text.encode(__typed__.description),
    discount: damlTypes.Bool.encode(__typed__.discount),
    discount_amount: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.discount_amount),
    discount_percentage: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.discount_percentage),
  };
}
,
};



exports.OcfPercentCapitalizationConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({converts_to_percent: damlTypes.Numeric(10).decoder, capitalization_definition: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), capitalization_definition_rules: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).decoder), }); }),
  encode: function (__typed__) {
  return {
    converts_to_percent: damlTypes.Numeric(10).encode(__typed__.converts_to_percent),
    capitalization_definition: damlTypes.Optional(damlTypes.Text).encode(__typed__.capitalization_definition),
    capitalization_definition_rules: damlTypes.Optional(exports.OcfCapitalizationDefinitionRules).encode(__typed__.capitalization_definition_rules),
  };
}
,
};



exports.OcfFixedAmountConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({converts_to_quantity: damlTypes.Numeric(10).decoder, }); }),
  encode: function (__typed__) {
  return {
    converts_to_quantity: damlTypes.Numeric(10).encode(__typed__.converts_to_quantity),
  };
}
,
};



exports.OcfCustomConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({custom_conversion_description: damlTypes.Text.decoder, }); }),
  encode: function (__typed__) {
  return {
    custom_conversion_description: damlTypes.Text.encode(__typed__.custom_conversion_description),
  };
}
,
};



exports.OcfConversionMechanism = {
  OcfConversionMechanismRatioConversion: 'OcfConversionMechanismRatioConversion',
  OcfConversionMechanismPercentCapitalizationConversion: 'OcfConversionMechanismPercentCapitalizationConversion',
  OcfConversionMechanismFixedAmountConversion: 'OcfConversionMechanismFixedAmountConversion',
  OcfConversionMechanismValuationBasedConversion: 'OcfConversionMechanismValuationBasedConversion',
  OcfConversionMechanismSharePriceBasedConversion: 'OcfConversionMechanismSharePriceBasedConversion',
  OcfConversionMechanismSAFEConversion: 'OcfConversionMechanismSAFEConversion',
  OcfConversionMechanismNoteConversion: 'OcfConversionMechanismNoteConversion',
  OcfConversionMechanismCustomConversion: 'OcfConversionMechanismCustomConversion',
  keys: ['OcfConversionMechanismRatioConversion','OcfConversionMechanismPercentCapitalizationConversion','OcfConversionMechanismFixedAmountConversion','OcfConversionMechanismValuationBasedConversion','OcfConversionMechanismSharePriceBasedConversion','OcfConversionMechanismSAFEConversion','OcfConversionMechanismNoteConversion','OcfConversionMechanismCustomConversion',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismRatioConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismPercentCapitalizationConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismFixedAmountConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismValuationBasedConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismSharePriceBasedConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismSAFEConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismNoteConversion), jtv.constant(exports.OcfConversionMechanism.OcfConversionMechanismCustomConversion)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfStockClassConversionRight = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_mechanism: exports.OcfConversionMechanism.decoder, conversion_trigger: exports.OcfConversionTrigger.decoder, converts_to_stock_class_id: damlTypes.Text.decoder, type_: damlTypes.Text.decoder, ceiling_price_per_share: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), conversion_price: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), custom_description: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), discount_rate: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), expires_at: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), floor_price_per_share: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), percent_of_capitalization: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Numeric(10)).decoder), ratio: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfRatio).decoder), reference_share_price: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), reference_valuation_price_per_share: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), valuation_cap: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), }); }),
  encode: function (__typed__) {
  return {
    conversion_mechanism: exports.OcfConversionMechanism.encode(__typed__.conversion_mechanism),
    conversion_trigger: exports.OcfConversionTrigger.encode(__typed__.conversion_trigger),
    converts_to_stock_class_id: damlTypes.Text.encode(__typed__.converts_to_stock_class_id),
    type_: damlTypes.Text.encode(__typed__.type_),
    ceiling_price_per_share: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.ceiling_price_per_share),
    conversion_price: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.conversion_price),
    custom_description: damlTypes.Optional(damlTypes.Text).encode(__typed__.custom_description),
    discount_rate: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.discount_rate),
    expires_at: damlTypes.Optional(damlTypes.Time).encode(__typed__.expires_at),
    floor_price_per_share: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.floor_price_per_share),
    percent_of_capitalization: damlTypes.Optional(damlTypes.Numeric(10)).encode(__typed__.percent_of_capitalization),
    ratio: damlTypes.Optional(exports.OcfRatio).encode(__typed__.ratio),
    reference_share_price: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.reference_share_price),
    reference_valuation_price_per_share: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.reference_valuation_price_per_share),
    valuation_cap: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.valuation_cap),
  };
}
,
};



exports.OcfRatioConversionMechanism = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({conversion_price: exports.OcfMonetary.decoder, ratio: exports.OcfRatio.decoder, rounding_type: exports.OcfRoundingType.decoder, }); }),
  encode: function (__typed__) {
  return {
    conversion_price: exports.OcfMonetary.encode(__typed__.conversion_price),
    ratio: exports.OcfRatio.encode(__typed__.ratio),
    rounding_type: exports.OcfRoundingType.encode(__typed__.rounding_type),
  };
}
,
};



exports.OcfRatio = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({numerator: damlTypes.Numeric(10).decoder, denominator: damlTypes.Numeric(10).decoder, }); }),
  encode: function (__typed__) {
  return {
    numerator: damlTypes.Numeric(10).encode(__typed__.numerator),
    denominator: damlTypes.Numeric(10).encode(__typed__.denominator),
  };
}
,
};



exports.OcfStockClassType = {
  OcfStockClassTypeCommon: 'OcfStockClassTypeCommon',
  OcfStockClassTypePreferred: 'OcfStockClassTypePreferred',
  keys: ['OcfStockClassTypeCommon','OcfStockClassTypePreferred',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfStockClassType.OcfStockClassTypeCommon), jtv.constant(exports.OcfStockClassType.OcfStockClassTypePreferred)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfShareNumberRange = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({starting_share_number: damlTypes.Numeric(10).decoder, ending_share_number: damlTypes.Numeric(10).decoder, }); }),
  encode: function (__typed__) {
  return {
    starting_share_number: damlTypes.Numeric(10).encode(__typed__.starting_share_number),
    ending_share_number: damlTypes.Numeric(10).encode(__typed__.ending_share_number),
  };
}
,
};



exports.OcfSecurityExemption = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({description: damlTypes.Text.decoder, jurisdiction: damlTypes.Text.decoder, }); }),
  encode: function (__typed__) {
  return {
    description: damlTypes.Text.encode(__typed__.description),
    jurisdiction: damlTypes.Text.encode(__typed__.jurisdiction),
  };
}
,
};



exports.OcfQuantitySourceType = {
  OcfQuantityHumanEstimated: 'OcfQuantityHumanEstimated',
  OcfQuantityMachineEstimated: 'OcfQuantityMachineEstimated',
  OcfQuantityUnspecified: 'OcfQuantityUnspecified',
  OcfQuantityInstrumentFixed: 'OcfQuantityInstrumentFixed',
  OcfQuantityInstrumentMax: 'OcfQuantityInstrumentMax',
  OcfQuantityInstrumentMin: 'OcfQuantityInstrumentMin',
  keys: ['OcfQuantityHumanEstimated','OcfQuantityMachineEstimated','OcfQuantityUnspecified','OcfQuantityInstrumentFixed','OcfQuantityInstrumentMax','OcfQuantityInstrumentMin',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfQuantitySourceType.OcfQuantityHumanEstimated), jtv.constant(exports.OcfQuantitySourceType.OcfQuantityMachineEstimated), jtv.constant(exports.OcfQuantitySourceType.OcfQuantityUnspecified), jtv.constant(exports.OcfQuantitySourceType.OcfQuantityInstrumentFixed), jtv.constant(exports.OcfQuantitySourceType.OcfQuantityInstrumentMax), jtv.constant(exports.OcfQuantitySourceType.OcfQuantityInstrumentMin)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfStakeholderRelationshipType = {
  OcfRelAdvisor: 'OcfRelAdvisor',
  OcfRelBoardMember: 'OcfRelBoardMember',
  OcfRelConsultant: 'OcfRelConsultant',
  OcfRelEmployee: 'OcfRelEmployee',
  OcfRelExAdvisor: 'OcfRelExAdvisor',
  OcfRelExConsultant: 'OcfRelExConsultant',
  OcfRelExEmployee: 'OcfRelExEmployee',
  OcfRelExecutive: 'OcfRelExecutive',
  OcfRelFounder: 'OcfRelFounder',
  OcfRelInvestor: 'OcfRelInvestor',
  OcfRelNonUsEmployee: 'OcfRelNonUsEmployee',
  OcfRelOfficer: 'OcfRelOfficer',
  OcfRelOther: 'OcfRelOther',
  keys: ['OcfRelAdvisor','OcfRelBoardMember','OcfRelConsultant','OcfRelEmployee','OcfRelExAdvisor','OcfRelExConsultant','OcfRelExEmployee','OcfRelExecutive','OcfRelFounder','OcfRelInvestor','OcfRelNonUsEmployee','OcfRelOfficer','OcfRelOther',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelAdvisor), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelBoardMember), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelConsultant), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelEmployee), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelExAdvisor), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelExConsultant), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelExEmployee), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelExecutive), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelFounder), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelInvestor), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelNonUsEmployee), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelOfficer), jtv.constant(exports.OcfStakeholderRelationshipType.OcfRelOther)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.TransferOperation = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({recipient: damlTypes.Party.decoder, quantity: damlTypes.Numeric(10).decoder, }); }),
  encode: function (__typed__) {
  return {
    recipient: damlTypes.Party.encode(__typed__.recipient),
    quantity: damlTypes.Numeric(10).encode(__typed__.quantity),
  };
}
,
};



exports.Context = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({issuer: damlTypes.Party.decoder, system_operator: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    issuer: damlTypes.Party.encode(__typed__.issuer),
    system_operator: damlTypes.Party.encode(__typed__.system_operator),
  };
}
,
};



exports.OcfEquityCompensationIssuanceData = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({compensation_type: exports.OcfCompensationType.decoder, quantity: damlTypes.Numeric(10).decoder, comments: damlTypes.List(damlTypes.Text).decoder, termination_exercise_windows: damlTypes.List(exports.OcfTerminationWindow).decoder, vestings: damlTypes.List(exports.OcfVesting).decoder, base_price: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), early_exercisable: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Bool).decoder), exercise_price: jtv.Decoder.withDefault(null, damlTypes.Optional(exports.OcfMonetary).decoder), expiration_date: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), }); }),
  encode: function (__typed__) {
  return {
    compensation_type: exports.OcfCompensationType.encode(__typed__.compensation_type),
    quantity: damlTypes.Numeric(10).encode(__typed__.quantity),
    comments: damlTypes.List(damlTypes.Text).encode(__typed__.comments),
    termination_exercise_windows: damlTypes.List(exports.OcfTerminationWindow).encode(__typed__.termination_exercise_windows),
    vestings: damlTypes.List(exports.OcfVesting).encode(__typed__.vestings),
    base_price: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.base_price),
    early_exercisable: damlTypes.Optional(damlTypes.Bool).encode(__typed__.early_exercisable),
    exercise_price: damlTypes.Optional(exports.OcfMonetary).encode(__typed__.exercise_price),
    expiration_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.expiration_date),
  };
}
,
};



exports.OcfVesting = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({amount: damlTypes.Numeric(10).decoder, date: damlTypes.Time.decoder, }); }),
  encode: function (__typed__) {
  return {
    amount: damlTypes.Numeric(10).encode(__typed__.amount),
    date: damlTypes.Time.encode(__typed__.date),
  };
}
,
};



exports.OcfTerminationWindow = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({period: damlTypes.Int.decoder, period_type: exports.OcfPeriodType.decoder, reason: exports.OcfTerminationWindowType.decoder, }); }),
  encode: function (__typed__) {
  return {
    period: damlTypes.Int.encode(__typed__.period),
    period_type: exports.OcfPeriodType.encode(__typed__.period_type),
    reason: exports.OcfTerminationWindowType.encode(__typed__.reason),
  };
}
,
};



exports.OcfTerminationWindowType = {
  OcfTermVoluntaryOther: 'OcfTermVoluntaryOther',
  OcfTermVoluntaryGoodCause: 'OcfTermVoluntaryGoodCause',
  OcfTermVoluntaryRetirement: 'OcfTermVoluntaryRetirement',
  OcfTermInvoluntaryOther: 'OcfTermInvoluntaryOther',
  OcfTermInvoluntaryDeath: 'OcfTermInvoluntaryDeath',
  OcfTermInvoluntaryDisability: 'OcfTermInvoluntaryDisability',
  OcfTermInvoluntaryWithCause: 'OcfTermInvoluntaryWithCause',
  keys: ['OcfTermVoluntaryOther','OcfTermVoluntaryGoodCause','OcfTermVoluntaryRetirement','OcfTermInvoluntaryOther','OcfTermInvoluntaryDeath','OcfTermInvoluntaryDisability','OcfTermInvoluntaryWithCause',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfTerminationWindowType.OcfTermVoluntaryOther), jtv.constant(exports.OcfTerminationWindowType.OcfTermVoluntaryGoodCause), jtv.constant(exports.OcfTerminationWindowType.OcfTermVoluntaryRetirement), jtv.constant(exports.OcfTerminationWindowType.OcfTermInvoluntaryOther), jtv.constant(exports.OcfTerminationWindowType.OcfTermInvoluntaryDeath), jtv.constant(exports.OcfTerminationWindowType.OcfTermInvoluntaryDisability), jtv.constant(exports.OcfTerminationWindowType.OcfTermInvoluntaryWithCause)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfPeriodType = {
  OcfPeriodDays: 'OcfPeriodDays',
  OcfPeriodMonths: 'OcfPeriodMonths',
  OcfPeriodYears: 'OcfPeriodYears',
  keys: ['OcfPeriodDays','OcfPeriodMonths','OcfPeriodYears',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfPeriodType.OcfPeriodDays), jtv.constant(exports.OcfPeriodType.OcfPeriodMonths), jtv.constant(exports.OcfPeriodType.OcfPeriodYears)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfCompensationType = {
  OcfCompensationTypeOptionNSO: 'OcfCompensationTypeOptionNSO',
  OcfCompensationTypeOptionISO: 'OcfCompensationTypeOptionISO',
  OcfCompensationTypeOption: 'OcfCompensationTypeOption',
  OcfCompensationTypeRSU: 'OcfCompensationTypeRSU',
  OcfCompensationTypeCSAR: 'OcfCompensationTypeCSAR',
  OcfCompensationTypeSSAR: 'OcfCompensationTypeSSAR',
  keys: ['OcfCompensationTypeOptionNSO','OcfCompensationTypeOptionISO','OcfCompensationTypeOption','OcfCompensationTypeRSU','OcfCompensationTypeCSAR','OcfCompensationTypeSSAR',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfCompensationType.OcfCompensationTypeOptionNSO), jtv.constant(exports.OcfCompensationType.OcfCompensationTypeOptionISO), jtv.constant(exports.OcfCompensationType.OcfCompensationTypeOption), jtv.constant(exports.OcfCompensationType.OcfCompensationTypeRSU), jtv.constant(exports.OcfCompensationType.OcfCompensationTypeCSAR), jtv.constant(exports.OcfCompensationType.OcfCompensationTypeSSAR)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfAccrualPeriodType = {
  OcfAccrualDaily: 'OcfAccrualDaily',
  OcfAccrualMonthly: 'OcfAccrualMonthly',
  OcfAccrualQuarterly: 'OcfAccrualQuarterly',
  OcfAccrualSemiAnnual: 'OcfAccrualSemiAnnual',
  OcfAccrualAnnual: 'OcfAccrualAnnual',
  keys: ['OcfAccrualDaily','OcfAccrualMonthly','OcfAccrualQuarterly','OcfAccrualSemiAnnual','OcfAccrualAnnual',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfAccrualPeriodType.OcfAccrualDaily), jtv.constant(exports.OcfAccrualPeriodType.OcfAccrualMonthly), jtv.constant(exports.OcfAccrualPeriodType.OcfAccrualQuarterly), jtv.constant(exports.OcfAccrualPeriodType.OcfAccrualSemiAnnual), jtv.constant(exports.OcfAccrualPeriodType.OcfAccrualAnnual)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfInterestRate = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({accrual_start_date: damlTypes.Time.decoder, rate: damlTypes.Numeric(10).decoder, accrual_end_date: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Time).decoder), }); }),
  encode: function (__typed__) {
  return {
    accrual_start_date: damlTypes.Time.encode(__typed__.accrual_start_date),
    rate: damlTypes.Numeric(10).encode(__typed__.rate),
    accrual_end_date: damlTypes.Optional(damlTypes.Time).encode(__typed__.accrual_end_date),
  };
}
,
};



exports.OcfCapitalizationDefinitionRules = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({include_additional_option_pool_topup: damlTypes.Bool.decoder, include_new_money: damlTypes.Bool.decoder, include_option_pool_topup_for_promised_options: damlTypes.Bool.decoder, include_other_converting_securities: damlTypes.Bool.decoder, include_outstanding_options: damlTypes.Bool.decoder, include_outstanding_shares: damlTypes.Bool.decoder, include_outstanding_unissued_options: damlTypes.Bool.decoder, include_this_security: damlTypes.Bool.decoder, }); }),
  encode: function (__typed__) {
  return {
    include_additional_option_pool_topup: damlTypes.Bool.encode(__typed__.include_additional_option_pool_topup),
    include_new_money: damlTypes.Bool.encode(__typed__.include_new_money),
    include_option_pool_topup_for_promised_options: damlTypes.Bool.encode(__typed__.include_option_pool_topup_for_promised_options),
    include_other_converting_securities: damlTypes.Bool.encode(__typed__.include_other_converting_securities),
    include_outstanding_options: damlTypes.Bool.encode(__typed__.include_outstanding_options),
    include_outstanding_shares: damlTypes.Bool.encode(__typed__.include_outstanding_shares),
    include_outstanding_unissued_options: damlTypes.Bool.encode(__typed__.include_outstanding_unissued_options),
    include_this_security: damlTypes.Bool.encode(__typed__.include_this_security),
  };
}
,
};



exports.OcfCapitalizationDefinition = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({exclude_security_ids: damlTypes.List(damlTypes.Text).decoder, include_security_ids: damlTypes.List(damlTypes.Text).decoder, include_stock_class_ids: damlTypes.List(damlTypes.Text).decoder, include_stock_plans_ids: damlTypes.List(damlTypes.Text).decoder, }); }),
  encode: function (__typed__) {
  return {
    exclude_security_ids: damlTypes.List(damlTypes.Text).encode(__typed__.exclude_security_ids),
    include_security_ids: damlTypes.List(damlTypes.Text).encode(__typed__.include_security_ids),
    include_stock_class_ids: damlTypes.List(damlTypes.Text).encode(__typed__.include_stock_class_ids),
    include_stock_plans_ids: damlTypes.List(damlTypes.Text).encode(__typed__.include_stock_plans_ids),
  };
}
,
};



exports.OcfStockParent = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({parent_object_id: damlTypes.Text.decoder, parent_object_type: exports.OcfParentSecurityType.decoder, }); }),
  encode: function (__typed__) {
  return {
    parent_object_id: damlTypes.Text.encode(__typed__.parent_object_id),
    parent_object_type: exports.OcfParentSecurityType.encode(__typed__.parent_object_type),
  };
}
,
};



exports.OcfParentSecurityType = {
  OcfParentStockPlan: 'OcfParentStockPlan',
  OcfParentStock: 'OcfParentStock',
  OcfParentWarrant: 'OcfParentWarrant',
  OcfParentConvertible: 'OcfParentConvertible',
  keys: ['OcfParentStockPlan','OcfParentStock','OcfParentWarrant','OcfParentConvertible',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfParentSecurityType.OcfParentStockPlan), jtv.constant(exports.OcfParentSecurityType.OcfParentStock), jtv.constant(exports.OcfParentSecurityType.OcfParentWarrant), jtv.constant(exports.OcfParentSecurityType.OcfParentConvertible)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfMonetary = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({amount: damlTypes.Numeric(10).decoder, currency: damlTypes.Text.decoder, }); }),
  encode: function (__typed__) {
  return {
    amount: damlTypes.Numeric(10).encode(__typed__.amount),
    currency: damlTypes.Text.encode(__typed__.currency),
  };
}
,
};



exports.OcfAddress = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({address_type: exports.OcfAddressType.decoder, country: damlTypes.Text.decoder, city: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), country_subdivision: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), postal_code: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), street_suite: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.Text).decoder), }); }),
  encode: function (__typed__) {
  return {
    address_type: exports.OcfAddressType.encode(__typed__.address_type),
    country: damlTypes.Text.encode(__typed__.country),
    city: damlTypes.Optional(damlTypes.Text).encode(__typed__.city),
    country_subdivision: damlTypes.Optional(damlTypes.Text).encode(__typed__.country_subdivision),
    postal_code: damlTypes.Optional(damlTypes.Text).encode(__typed__.postal_code),
    street_suite: damlTypes.Optional(damlTypes.Text).encode(__typed__.street_suite),
  };
}
,
};



exports.OcfAddressType = {
  OcfAddressTypeLegal: 'OcfAddressTypeLegal',
  OcfAddressTypeContact: 'OcfAddressTypeContact',
  OcfAddressTypeOther: 'OcfAddressTypeOther',
  keys: ['OcfAddressTypeLegal','OcfAddressTypeContact','OcfAddressTypeOther',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfAddressType.OcfAddressTypeLegal), jtv.constant(exports.OcfAddressType.OcfAddressTypeContact), jtv.constant(exports.OcfAddressType.OcfAddressTypeOther)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfTaxID = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({country: damlTypes.Text.decoder, tax_id: damlTypes.Text.decoder, }); }),
  encode: function (__typed__) {
  return {
    country: damlTypes.Text.encode(__typed__.country),
    tax_id: damlTypes.Text.encode(__typed__.tax_id),
  };
}
,
};



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.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.OcfFileType = {
  OcfManifestFile: 'OcfManifestFile',
  OcfStakeholdersFile: 'OcfStakeholdersFile',
  OcfStockClassesFile: 'OcfStockClassesFile',
  OcfStockLegendTemplatesFile: 'OcfStockLegendTemplatesFile',
  OcfStockPlansFile: 'OcfStockPlansFile',
  OcfTransactionsFile: 'OcfTransactionsFile',
  OcfValuationsFile: 'OcfValuationsFile',
  OcfVestingTermsFile: 'OcfVestingTermsFile',
  OcfFinancingsFile: 'OcfFinancingsFile',
  OcfDocumentsFile: 'OcfDocumentsFile',
  keys: ['OcfManifestFile','OcfStakeholdersFile','OcfStockClassesFile','OcfStockLegendTemplatesFile','OcfStockPlansFile','OcfTransactionsFile','OcfValuationsFile','OcfVestingTermsFile','OcfFinancingsFile','OcfDocumentsFile',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfFileType.OcfManifestFile), jtv.constant(exports.OcfFileType.OcfStakeholdersFile), jtv.constant(exports.OcfFileType.OcfStockClassesFile), jtv.constant(exports.OcfFileType.OcfStockLegendTemplatesFile), jtv.constant(exports.OcfFileType.OcfStockPlansFile), jtv.constant(exports.OcfFileType.OcfTransactionsFile), jtv.constant(exports.OcfFileType.OcfValuationsFile), jtv.constant(exports.OcfFileType.OcfVestingTermsFile), jtv.constant(exports.OcfFileType.OcfFinancingsFile), jtv.constant(exports.OcfFileType.OcfDocumentsFile)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfRoundingType = {
  OcfRoundingCeiling: 'OcfRoundingCeiling',
  OcfRoundingFloor: 'OcfRoundingFloor',
  OcfRoundingNormal: 'OcfRoundingNormal',
  keys: ['OcfRoundingCeiling','OcfRoundingFloor','OcfRoundingNormal',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfRoundingType.OcfRoundingCeiling), jtv.constant(exports.OcfRoundingType.OcfRoundingFloor), jtv.constant(exports.OcfRoundingType.OcfRoundingNormal)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfDayCountType = {
  OcfDayCountActual365: 'OcfDayCountActual365',
  OcfDayCount30_360: 'OcfDayCount30_360',
  keys: ['OcfDayCountActual365','OcfDayCount30_360',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfDayCountType.OcfDayCountActual365), jtv.constant(exports.OcfDayCountType.OcfDayCount30_360)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfCompoundingType = {
  OcfCompounding: 'OcfCompounding',
  OcfSimple: 'OcfSimple',
  keys: ['OcfCompounding','OcfSimple',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfCompoundingType.OcfCompounding), jtv.constant(exports.OcfCompoundingType.OcfSimple)); }),
  encode: function (__typed__) { return __typed__; },
};



exports.OcfInterestPayoutType = {
  OcfInterestPayoutDeferred: 'OcfInterestPayoutDeferred',
  OcfInterestPayoutCash: 'OcfInterestPayoutCash',
  keys: ['OcfInterestPayoutDeferred','OcfInterestPayoutCash',],
  decoder: damlTypes.lazyMemo(function () { return jtv.oneOf(jtv.constant(exports.OcfInterestPayoutType.OcfInterestPayoutDeferred), jtv.constant(exports.OcfInterestPayoutType.OcfInterestPayoutCash)); }),
  encode: function (__typed__) { return __typed__; },
};



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__; },
};

