Current section
Files
Jump to
Current section
Files
lib/tigerbeetlex/bindings/create_transfer_result.ex
#######################################################
# This file was auto-generated by elixir_bindings.zig #
# Do not manually modify. #
#######################################################
defmodule TigerBeetlex.CreateTransferResult do
@moduledoc false
@doc """
Obtains the atom representation of a result from its integer value.
"""
def to_atom(0), do: :ok
def to_atom(1), do: :linked_event_failed
def to_atom(2), do: :linked_event_chain_open
def to_atom(56), do: :imported_event_expected
def to_atom(57), do: :imported_event_not_expected
def to_atom(3), do: :timestamp_must_be_zero
def to_atom(58), do: :imported_event_timestamp_out_of_range
def to_atom(59), do: :imported_event_timestamp_must_not_advance
def to_atom(4), do: :reserved_flag
def to_atom(5), do: :id_must_not_be_zero
def to_atom(6), do: :id_must_not_be_int_max
def to_atom(36), do: :exists_with_different_flags
def to_atom(40), do: :exists_with_different_pending_id
def to_atom(44), do: :exists_with_different_timeout
def to_atom(37), do: :exists_with_different_debit_account_id
def to_atom(38), do: :exists_with_different_credit_account_id
def to_atom(39), do: :exists_with_different_amount
def to_atom(41), do: :exists_with_different_user_data_128
def to_atom(42), do: :exists_with_different_user_data_64
def to_atom(43), do: :exists_with_different_user_data_32
def to_atom(67), do: :exists_with_different_ledger
def to_atom(45), do: :exists_with_different_code
def to_atom(46), do: :exists
def to_atom(68), do: :id_already_failed
def to_atom(7), do: :flags_are_mutually_exclusive
def to_atom(8), do: :debit_account_id_must_not_be_zero
def to_atom(9), do: :debit_account_id_must_not_be_int_max
def to_atom(10), do: :credit_account_id_must_not_be_zero
def to_atom(11), do: :credit_account_id_must_not_be_int_max
def to_atom(12), do: :accounts_must_be_different
def to_atom(13), do: :pending_id_must_be_zero
def to_atom(14), do: :pending_id_must_not_be_zero
def to_atom(15), do: :pending_id_must_not_be_int_max
def to_atom(16), do: :pending_id_must_be_different
def to_atom(17), do: :timeout_reserved_for_pending_transfer
def to_atom(64), do: :closing_transfer_must_be_pending
def to_atom(19), do: :ledger_must_not_be_zero
def to_atom(20), do: :code_must_not_be_zero
def to_atom(21), do: :debit_account_not_found
def to_atom(22), do: :credit_account_not_found
def to_atom(23), do: :accounts_must_have_the_same_ledger
def to_atom(24), do: :transfer_must_have_the_same_ledger_as_accounts
def to_atom(25), do: :pending_transfer_not_found
def to_atom(26), do: :pending_transfer_not_pending
def to_atom(27), do: :pending_transfer_has_different_debit_account_id
def to_atom(28), do: :pending_transfer_has_different_credit_account_id
def to_atom(29), do: :pending_transfer_has_different_ledger
def to_atom(30), do: :pending_transfer_has_different_code
def to_atom(31), do: :exceeds_pending_transfer_amount
def to_atom(32), do: :pending_transfer_has_different_amount
def to_atom(33), do: :pending_transfer_already_posted
def to_atom(34), do: :pending_transfer_already_voided
def to_atom(35), do: :pending_transfer_expired
def to_atom(60), do: :imported_event_timestamp_must_not_regress
def to_atom(61), do: :imported_event_timestamp_must_postdate_debit_account
def to_atom(62), do: :imported_event_timestamp_must_postdate_credit_account
def to_atom(63), do: :imported_event_timeout_must_be_zero
def to_atom(65), do: :debit_account_already_closed
def to_atom(66), do: :credit_account_already_closed
def to_atom(47), do: :overflows_debits_pending
def to_atom(48), do: :overflows_credits_pending
def to_atom(49), do: :overflows_debits_posted
def to_atom(50), do: :overflows_credits_posted
def to_atom(51), do: :overflows_debits
def to_atom(52), do: :overflows_credits
def to_atom(53), do: :overflows_timeout
def to_atom(54), do: :exceeds_credits
def to_atom(55), do: :exceeds_debits
@doc """
Obtains the integer representation of a result reason from its atom value.
"""
def from_atom(:ok), do: 0
def from_atom(:linked_event_failed), do: 1
def from_atom(:linked_event_chain_open), do: 2
def from_atom(:imported_event_expected), do: 56
def from_atom(:imported_event_not_expected), do: 57
def from_atom(:timestamp_must_be_zero), do: 3
def from_atom(:imported_event_timestamp_out_of_range), do: 58
def from_atom(:imported_event_timestamp_must_not_advance), do: 59
def from_atom(:reserved_flag), do: 4
def from_atom(:id_must_not_be_zero), do: 5
def from_atom(:id_must_not_be_int_max), do: 6
def from_atom(:exists_with_different_flags), do: 36
def from_atom(:exists_with_different_pending_id), do: 40
def from_atom(:exists_with_different_timeout), do: 44
def from_atom(:exists_with_different_debit_account_id), do: 37
def from_atom(:exists_with_different_credit_account_id), do: 38
def from_atom(:exists_with_different_amount), do: 39
def from_atom(:exists_with_different_user_data_128), do: 41
def from_atom(:exists_with_different_user_data_64), do: 42
def from_atom(:exists_with_different_user_data_32), do: 43
def from_atom(:exists_with_different_ledger), do: 67
def from_atom(:exists_with_different_code), do: 45
def from_atom(:exists), do: 46
def from_atom(:id_already_failed), do: 68
def from_atom(:flags_are_mutually_exclusive), do: 7
def from_atom(:debit_account_id_must_not_be_zero), do: 8
def from_atom(:debit_account_id_must_not_be_int_max), do: 9
def from_atom(:credit_account_id_must_not_be_zero), do: 10
def from_atom(:credit_account_id_must_not_be_int_max), do: 11
def from_atom(:accounts_must_be_different), do: 12
def from_atom(:pending_id_must_be_zero), do: 13
def from_atom(:pending_id_must_not_be_zero), do: 14
def from_atom(:pending_id_must_not_be_int_max), do: 15
def from_atom(:pending_id_must_be_different), do: 16
def from_atom(:timeout_reserved_for_pending_transfer), do: 17
def from_atom(:closing_transfer_must_be_pending), do: 64
def from_atom(:ledger_must_not_be_zero), do: 19
def from_atom(:code_must_not_be_zero), do: 20
def from_atom(:debit_account_not_found), do: 21
def from_atom(:credit_account_not_found), do: 22
def from_atom(:accounts_must_have_the_same_ledger), do: 23
def from_atom(:transfer_must_have_the_same_ledger_as_accounts), do: 24
def from_atom(:pending_transfer_not_found), do: 25
def from_atom(:pending_transfer_not_pending), do: 26
def from_atom(:pending_transfer_has_different_debit_account_id), do: 27
def from_atom(:pending_transfer_has_different_credit_account_id), do: 28
def from_atom(:pending_transfer_has_different_ledger), do: 29
def from_atom(:pending_transfer_has_different_code), do: 30
def from_atom(:exceeds_pending_transfer_amount), do: 31
def from_atom(:pending_transfer_has_different_amount), do: 32
def from_atom(:pending_transfer_already_posted), do: 33
def from_atom(:pending_transfer_already_voided), do: 34
def from_atom(:pending_transfer_expired), do: 35
def from_atom(:imported_event_timestamp_must_not_regress), do: 60
def from_atom(:imported_event_timestamp_must_postdate_debit_account), do: 61
def from_atom(:imported_event_timestamp_must_postdate_credit_account), do: 62
def from_atom(:imported_event_timeout_must_be_zero), do: 63
def from_atom(:debit_account_already_closed), do: 65
def from_atom(:credit_account_already_closed), do: 66
def from_atom(:overflows_debits_pending), do: 47
def from_atom(:overflows_credits_pending), do: 48
def from_atom(:overflows_debits_posted), do: 49
def from_atom(:overflows_credits_posted), do: 50
def from_atom(:overflows_debits), do: 51
def from_atom(:overflows_credits), do: 52
def from_atom(:overflows_timeout), do: 53
def from_atom(:exceeds_credits), do: 54
def from_atom(:exceeds_debits), do: 55
end