// Generated from Fairmint/OpenCapTable/Types/Conversion.daml
/* eslint-disable @typescript-eslint/camelcase */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-use-before-define */
import * as jtv from '@mojotech/json-type-validation';
import * as damlTypes from '@daml/types';

import * as Fairmint_OpenCapTable_Types_Monetary from '../../../../Fairmint/OpenCapTable/Types/Monetary/module';
import * as Fairmint_OpenCapTable_Types_Stock from '../../../../Fairmint/OpenCapTable/Types/Stock/module';

export declare type OcfConversionTrigger = {
  conversion_right: OcfAnyConversionRight;
  trigger_id: string;
  type_: OcfConversionTriggerType;
  nickname: damlTypes.Optional<string>;
  trigger_condition: damlTypes.Optional<string>;
  trigger_date: damlTypes.Optional<damlTypes.Time>;
  trigger_description: damlTypes.Optional<string>;
};

export declare const OcfConversionTrigger:
  damlTypes.Serializable<OcfConversionTrigger> & {
  }
;


export declare type OcfAnyConversionRight =
  |  { tag: 'OcfRightConvertible'; value: OcfConvertibleConversionRight }
  |  { tag: 'OcfRightWarrant'; value: OcfWarrantConversionRight }
  |  { tag: 'OcfRightStockClass'; value: OcfStockClassConversionRight }
;

export declare const OcfAnyConversionRight:
  damlTypes.Serializable<OcfAnyConversionRight> & {
  }
;


export declare type OcfStockClassConversionRight = {
  conversion_mechanism: OcfConversionMechanism;
  conversion_trigger: OcfConversionTrigger;
  converts_to_stock_class_id: string;
  type_: string;
  ceiling_price_per_share: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  conversion_price: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  custom_description: damlTypes.Optional<string>;
  discount_rate: damlTypes.Optional<damlTypes.Numeric>;
  expires_at: damlTypes.Optional<damlTypes.Time>;
  floor_price_per_share: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  percent_of_capitalization: damlTypes.Optional<damlTypes.Numeric>;
  ratio: damlTypes.Optional<Fairmint_OpenCapTable_Types_Stock.OcfRatio>;
  reference_share_price: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  reference_valuation_price_per_share: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  valuation_cap: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
};

export declare const OcfStockClassConversionRight:
  damlTypes.Serializable<OcfStockClassConversionRight> & {
  }
;


export declare type OcfConvertibleConversionRight = {
  conversion_mechanism: OcfConvertibleConversionMechanism;
  type_: string;
  converts_to_future_round: damlTypes.Optional<boolean>;
  converts_to_stock_class_id: damlTypes.Optional<string>;
};

export declare const OcfConvertibleConversionRight:
  damlTypes.Serializable<OcfConvertibleConversionRight> & {
  }
;


export declare type OcfConvertibleConversionMechanism =
  |  { tag: 'OcfConvMechSAFE'; value: OcfSAFEConversionMechanism }
  |  { tag: 'OcfConvMechNote'; value: OcfNoteConversionMechanism }
  |  { tag: 'OcfConvMechCustom'; value: OcfCustomConversionMechanism }
  |  { tag: 'OcfConvMechPercentCapitalization'; value: OcfPercentCapitalizationConversionMechanism }
  |  { tag: 'OcfConvMechFixedAmount'; value: OcfFixedAmountConversionMechanism }
  |  { tag: 'OcfConvMechPpsBased'; value: OcfSharePriceBasedConversionMechanism }
  |  { tag: 'OcfConvMechValuationBased'; value: OcfValuationBasedConversionMechanism }
  |  { tag: 'OcfConvMechRatio'; value: Fairmint_OpenCapTable_Types_Stock.OcfRatio }
;

export declare const OcfConvertibleConversionMechanism:
  damlTypes.Serializable<OcfConvertibleConversionMechanism> & {
  }
;


export declare type OcfWarrantConversionRight = {
  conversion_mechanism: OcfWarrantConversionMechanism;
  type_: string;
  converts_to_future_round: damlTypes.Optional<boolean>;
  converts_to_stock_class_id: damlTypes.Optional<string>;
};

export declare const OcfWarrantConversionRight:
  damlTypes.Serializable<OcfWarrantConversionRight> & {
  }
;


export declare type OcfWarrantConversionMechanism =
  |  { tag: 'OcfWarrantMechanismCustom'; value: OcfWarrantConversionMechanism.OcfWarrantMechanismCustom }
  |  { tag: 'OcfWarrantMechanismPercentCapitalization'; value: OcfWarrantConversionMechanism.OcfWarrantMechanismPercentCapitalization }
  |  { tag: 'OcfWarrantMechanismFixedAmount'; value: OcfWarrantConversionMechanism.OcfWarrantMechanismFixedAmount }
  |  { tag: 'OcfWarrantMechanismValuationBased'; value: OcfWarrantConversionMechanism.OcfWarrantMechanismValuationBased }
  |  { tag: 'OcfWarrantMechanismPpsBased'; value: OcfWarrantConversionMechanism.OcfWarrantMechanismPpsBased }
;

export declare const OcfWarrantConversionMechanism:
  damlTypes.Serializable<OcfWarrantConversionMechanism> & {
  OcfWarrantMechanismCustom: damlTypes.Serializable<OcfWarrantConversionMechanism.OcfWarrantMechanismCustom>;
  OcfWarrantMechanismPercentCapitalization: damlTypes.Serializable<OcfWarrantConversionMechanism.OcfWarrantMechanismPercentCapitalization>;
  OcfWarrantMechanismFixedAmount: damlTypes.Serializable<OcfWarrantConversionMechanism.OcfWarrantMechanismFixedAmount>;
  OcfWarrantMechanismValuationBased: damlTypes.Serializable<OcfWarrantConversionMechanism.OcfWarrantMechanismValuationBased>;
  OcfWarrantMechanismPpsBased: damlTypes.Serializable<OcfWarrantConversionMechanism.OcfWarrantMechanismPpsBased>;
  }
;


export namespace OcfWarrantConversionMechanism {
  type OcfWarrantMechanismCustom = {
    custom_conversion_description: string;
  };
} //namespace OcfWarrantConversionMechanism


export namespace OcfWarrantConversionMechanism {
  type OcfWarrantMechanismPercentCapitalization = {
    converts_to_percent: damlTypes.Numeric;
    capitalization_definition: damlTypes.Optional<string>;
    capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
  };
} //namespace OcfWarrantConversionMechanism


export namespace OcfWarrantConversionMechanism {
  type OcfWarrantMechanismFixedAmount = {
    converts_to_quantity: damlTypes.Numeric;
  };
} //namespace OcfWarrantConversionMechanism


export namespace OcfWarrantConversionMechanism {
  type OcfWarrantMechanismValuationBased = {
    valuation_type: string;
    valuation_amount: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
    capitalization_definition: damlTypes.Optional<string>;
    capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
  };
} //namespace OcfWarrantConversionMechanism


export namespace OcfWarrantConversionMechanism {
  type OcfWarrantMechanismPpsBased = {
    description: string;
    discount: boolean;
    discount_percentage: damlTypes.Optional<damlTypes.Numeric>;
    discount_amount: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  };
} //namespace OcfWarrantConversionMechanism


export declare type OcfConvertibleType =
  | 'OcfConvertibleNote'
  | 'OcfConvertibleSafe'
  | 'OcfConvertibleSecurity'
;

export declare const OcfConvertibleType:
  damlTypes.Serializable<OcfConvertibleType> & {
  }
& { readonly keys: OcfConvertibleType[] } & { readonly [e in OcfConvertibleType]: e }
;


export declare type OcfConversionTriggerType =
  | 'OcfTriggerTypeTypeAutomaticOnCondition'
  | 'OcfTriggerTypeTypeAutomaticOnDate'
  | 'OcfTriggerTypeTypeElectiveInRange'
  | 'OcfTriggerTypeTypeElectiveOnCondition'
  | 'OcfTriggerTypeTypeElectiveAtWill'
  | 'OcfTriggerTypeTypeUnspecified'
;

export declare const OcfConversionTriggerType:
  damlTypes.Serializable<OcfConversionTriggerType> & {
  }
& { readonly keys: OcfConversionTriggerType[] } & { readonly [e in OcfConversionTriggerType]: e }
;


export declare type OcfNoteConversionMechanism = {
  compounding_type: OcfCompoundingType;
  day_count_convention: OcfDayCountType;
  interest_accrual_period: OcfAccrualPeriodType;
  interest_payout: OcfInterestPayoutType;
  interest_rates: OcfInterestRate[];
  capitalization_definition: damlTypes.Optional<string>;
  capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
  conversion_discount: damlTypes.Optional<damlTypes.Numeric>;
  conversion_mfn: damlTypes.Optional<boolean>;
  conversion_valuation_cap: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  exit_multiple: damlTypes.Optional<Fairmint_OpenCapTable_Types_Stock.OcfRatio>;
};

export declare const OcfNoteConversionMechanism:
  damlTypes.Serializable<OcfNoteConversionMechanism> & {
  }
;


export declare type OcfSAFEConversionMechanism = {
  conversion_mfn: boolean;
  capitalization_definition: damlTypes.Optional<string>;
  capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
  conversion_discount: damlTypes.Optional<damlTypes.Numeric>;
  conversion_timing: damlTypes.Optional<string>;
  conversion_valuation_cap: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  exit_multiple: damlTypes.Optional<Fairmint_OpenCapTable_Types_Stock.OcfRatio>;
};

export declare const OcfSAFEConversionMechanism:
  damlTypes.Serializable<OcfSAFEConversionMechanism> & {
  }
;


export declare type OcfValuationBasedConversionMechanism = {
  valuation_type: OcfValuationBasedFormulaType;
  capitalization_definition: damlTypes.Optional<string>;
  capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
  valuation_amount: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
};

export declare const OcfValuationBasedConversionMechanism:
  damlTypes.Serializable<OcfValuationBasedConversionMechanism> & {
  }
;


export declare type OcfValuationBasedFormulaType =
  | 'OcfValuationCap'
  | 'OcfValuationFixed'
  | 'OcfValuationActual'
;

export declare const OcfValuationBasedFormulaType:
  damlTypes.Serializable<OcfValuationBasedFormulaType> & {
  }
& { readonly keys: OcfValuationBasedFormulaType[] } & { readonly [e in OcfValuationBasedFormulaType]: e }
;


export declare type OcfSharePriceBasedConversionMechanism = {
  description: string;
  discount: boolean;
  discount_amount: damlTypes.Optional<Fairmint_OpenCapTable_Types_Monetary.OcfMonetary>;
  discount_percentage: damlTypes.Optional<damlTypes.Numeric>;
};

export declare const OcfSharePriceBasedConversionMechanism:
  damlTypes.Serializable<OcfSharePriceBasedConversionMechanism> & {
  }
;


export declare type OcfPercentCapitalizationConversionMechanism = {
  converts_to_percent: damlTypes.Numeric;
  capitalization_definition: damlTypes.Optional<string>;
  capitalization_definition_rules: damlTypes.Optional<OcfCapitalizationDefinitionRules>;
};

export declare const OcfPercentCapitalizationConversionMechanism:
  damlTypes.Serializable<OcfPercentCapitalizationConversionMechanism> & {
  }
;


export declare type OcfFixedAmountConversionMechanism = {
  converts_to_quantity: damlTypes.Numeric;
};

export declare const OcfFixedAmountConversionMechanism:
  damlTypes.Serializable<OcfFixedAmountConversionMechanism> & {
  }
;


export declare type OcfCustomConversionMechanism = {
  custom_conversion_description: string;
};

export declare const OcfCustomConversionMechanism:
  damlTypes.Serializable<OcfCustomConversionMechanism> & {
  }
;


export declare type OcfRatioConversionMechanism = {
  conversion_price: Fairmint_OpenCapTable_Types_Monetary.OcfMonetary;
  ratio: Fairmint_OpenCapTable_Types_Stock.OcfRatio;
  rounding_type: OcfRoundingType;
};

export declare const OcfRatioConversionMechanism:
  damlTypes.Serializable<OcfRatioConversionMechanism> & {
  }
;


export declare type OcfConversionMechanism =
  | 'OcfConversionMechanismRatioConversion'
  | 'OcfConversionMechanismPercentCapitalizationConversion'
  | 'OcfConversionMechanismFixedAmountConversion'
  | 'OcfConversionMechanismValuationBasedConversion'
  | 'OcfConversionMechanismPpsBasedConversion'
  | 'OcfConversionMechanismSAFEConversion'
  | 'OcfConversionMechanismNoteConversion'
  | 'OcfConversionMechanismCustomConversion'
;

export declare const OcfConversionMechanism:
  damlTypes.Serializable<OcfConversionMechanism> & {
  }
& { readonly keys: OcfConversionMechanism[] } & { readonly [e in OcfConversionMechanism]: e }
;


export declare type OcfCapitalizationDefinitionRules = {
  include_additional_option_pool_topup: boolean;
  include_new_money: boolean;
  include_option_pool_topup_for_promised_options: boolean;
  include_other_converting_securities: boolean;
  include_outstanding_options: boolean;
  include_outstanding_shares: boolean;
  include_outstanding_unissued_options: boolean;
  include_this_security: boolean;
};

export declare const OcfCapitalizationDefinitionRules:
  damlTypes.Serializable<OcfCapitalizationDefinitionRules> & {
  }
;


export declare type OcfCapitalizationDefinition = {
  exclude_security_ids: string[];
  include_security_ids: string[];
  include_stock_class_ids: string[];
  include_stock_plans_ids: string[];
};

export declare const OcfCapitalizationDefinition:
  damlTypes.Serializable<OcfCapitalizationDefinition> & {
  }
;


export declare type OcfInterestRate = {
  accrual_start_date: damlTypes.Time;
  rate: damlTypes.Numeric;
  accrual_end_date: damlTypes.Optional<damlTypes.Time>;
};

export declare const OcfInterestRate:
  damlTypes.Serializable<OcfInterestRate> & {
  }
;


export declare type OcfAccrualPeriodType =
  | 'OcfAccrualDaily'
  | 'OcfAccrualMonthly'
  | 'OcfAccrualQuarterly'
  | 'OcfAccrualSemiAnnual'
  | 'OcfAccrualAnnual'
;

export declare const OcfAccrualPeriodType:
  damlTypes.Serializable<OcfAccrualPeriodType> & {
  }
& { readonly keys: OcfAccrualPeriodType[] } & { readonly [e in OcfAccrualPeriodType]: e }
;


export declare type OcfRoundingType =
  | 'OcfRoundingCeiling'
  | 'OcfRoundingFloor'
  | 'OcfRoundingNormal'
;

export declare const OcfRoundingType:
  damlTypes.Serializable<OcfRoundingType> & {
  }
& { readonly keys: OcfRoundingType[] } & { readonly [e in OcfRoundingType]: e }
;


export declare type OcfDayCountType =
  | 'OcfDayCountActual365'
  | 'OcfDayCount30_360'
;

export declare const OcfDayCountType:
  damlTypes.Serializable<OcfDayCountType> & {
  }
& { readonly keys: OcfDayCountType[] } & { readonly [e in OcfDayCountType]: e }
;


export declare type OcfCompoundingType =
  | 'OcfCompounding'
  | 'OcfSimple'
;

export declare const OcfCompoundingType:
  damlTypes.Serializable<OcfCompoundingType> & {
  }
& { readonly keys: OcfCompoundingType[] } & { readonly [e in OcfCompoundingType]: e }
;


export declare type OcfInterestPayoutType =
  | 'OcfInterestPayoutDeferred'
  | 'OcfInterestPayoutCash'
;

export declare const OcfInterestPayoutType:
  damlTypes.Serializable<OcfInterestPayoutType> & {
  }
& { readonly keys: OcfInterestPayoutType[] } & { readonly [e in OcfInterestPayoutType]: e }
;

