diff --git a/samples/Sample.Shared/Dex/DexApiClient.cs b/samples/Sample.Shared/Dex/DexApiClient.cs index a7386e41..bc79b379 100644 --- a/samples/Sample.Shared/Dex/DexApiClient.cs +++ b/samples/Sample.Shared/Dex/DexApiClient.cs @@ -1,5 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Agent.Agents; using EdjCase.ICP.Candid.Models; using EdjCase.ICP.Candid; @@ -7,6 +5,8 @@ using Sample.Shared.Dex; using System.Collections.Generic; using EdjCase.ICP.Agent.Responses; +using Token = EdjCase.ICP.Candid.Models.Principal; +using OrderId = System.UInt32; namespace Sample.Shared.Dex { diff --git a/samples/Sample.Shared/Dex/Models/Balance.cs b/samples/Sample.Shared/Dex/Models/Balance.cs index 8fa559db..a404e5ff 100644 --- a/samples/Sample.Shared/Dex/Models/Balance.cs +++ b/samples/Sample.Shared/Dex/Models/Balance.cs @@ -1,7 +1,6 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; +using Token = EdjCase.ICP.Candid.Models.Principal; namespace Sample.Shared.Dex.Models { diff --git a/samples/Sample.Shared/Dex/Models/CancelOrderErr.cs b/samples/Sample.Shared/Dex/Models/CancelOrderErr.cs index 5ec487a5..4220fdd5 100644 --- a/samples/Sample.Shared/Dex/Models/CancelOrderErr.cs +++ b/samples/Sample.Shared/Dex/Models/CancelOrderErr.cs @@ -1,6 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - namespace Sample.Shared.Dex.Models { public enum CancelOrderErr diff --git a/samples/Sample.Shared/Dex/Models/CancelOrderReceipt.cs b/samples/Sample.Shared/Dex/Models/CancelOrderReceipt.cs index 91564117..74763204 100644 --- a/samples/Sample.Shared/Dex/Models/CancelOrderReceipt.cs +++ b/samples/Sample.Shared/Dex/Models/CancelOrderReceipt.cs @@ -1,8 +1,7 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.Dex.Models; using System; +using OrderId = System.UInt32; namespace Sample.Shared.Dex.Models { diff --git a/samples/Sample.Shared/Dex/Models/DepositErr.cs b/samples/Sample.Shared/Dex/Models/DepositErr.cs index e5c65c2e..fc51708f 100644 --- a/samples/Sample.Shared/Dex/Models/DepositErr.cs +++ b/samples/Sample.Shared/Dex/Models/DepositErr.cs @@ -1,6 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - namespace Sample.Shared.Dex.Models { public enum DepositErr diff --git a/samples/Sample.Shared/Dex/Models/DepositReceipt.cs b/samples/Sample.Shared/Dex/Models/DepositReceipt.cs index d8d7bdd8..10ab793d 100644 --- a/samples/Sample.Shared/Dex/Models/DepositReceipt.cs +++ b/samples/Sample.Shared/Dex/Models/DepositReceipt.cs @@ -1,5 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.Dex.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/Dex/Models/Order.cs b/samples/Sample.Shared/Dex/Models/Order.cs index 577827b5..63cf63e1 100644 --- a/samples/Sample.Shared/Dex/Models/Order.cs +++ b/samples/Sample.Shared/Dex/Models/Order.cs @@ -1,7 +1,7 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; +using Token = EdjCase.ICP.Candid.Models.Principal; +using OrderId = System.UInt32; namespace Sample.Shared.Dex.Models { diff --git a/samples/Sample.Shared/Dex/Models/OrderPlacementErr.cs b/samples/Sample.Shared/Dex/Models/OrderPlacementErr.cs index e4ecc39f..aa15c14b 100644 --- a/samples/Sample.Shared/Dex/Models/OrderPlacementErr.cs +++ b/samples/Sample.Shared/Dex/Models/OrderPlacementErr.cs @@ -1,6 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - namespace Sample.Shared.Dex.Models { public enum OrderPlacementErr diff --git a/samples/Sample.Shared/Dex/Models/OrderPlacementReceipt.cs b/samples/Sample.Shared/Dex/Models/OrderPlacementReceipt.cs index c55c857a..15d35793 100644 --- a/samples/Sample.Shared/Dex/Models/OrderPlacementReceipt.cs +++ b/samples/Sample.Shared/Dex/Models/OrderPlacementReceipt.cs @@ -1,5 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.Dex.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/Dex/Models/WithdrawErr.cs b/samples/Sample.Shared/Dex/Models/WithdrawErr.cs index b3feef3b..96251c73 100644 --- a/samples/Sample.Shared/Dex/Models/WithdrawErr.cs +++ b/samples/Sample.Shared/Dex/Models/WithdrawErr.cs @@ -1,6 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - namespace Sample.Shared.Dex.Models { public enum WithdrawErr diff --git a/samples/Sample.Shared/Dex/Models/WithdrawReceipt.cs b/samples/Sample.Shared/Dex/Models/WithdrawReceipt.cs index d5564311..8fcea13b 100644 --- a/samples/Sample.Shared/Dex/Models/WithdrawReceipt.cs +++ b/samples/Sample.Shared/Dex/Models/WithdrawReceipt.cs @@ -1,5 +1,3 @@ -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.Dex.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/Governance/Models/Governance.cs b/samples/Sample.Shared/Governance/Models/Governance.cs index cf3f6797..c5145755 100644 --- a/samples/Sample.Shared/Governance/Models/Governance.cs +++ b/samples/Sample.Shared/Governance/Models/Governance.cs @@ -1,14 +1,14 @@ using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using EdjCase.ICP.Candid.Models; using Sample.Shared.Governance.Models; +using EdjCase.ICP.Candid.Models; namespace Sample.Shared.Governance.Models { public class Governance { [CandidName("default_followees")] - public Dictionary DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } [CandidName("making_sns_proposal")] public OptionalValue MakingSnsProposal { get; set; } @@ -64,7 +64,7 @@ public class Governance [CandidName("genesis_timestamp_seconds")] public ulong GenesisTimestampSeconds { get; set; } - public Governance(Dictionary defaultFollowees, OptionalValue makingSnsProposal, OptionalValue mostRecentMonthlyNodeProviderRewards, OptionalValue maturityModulationLastUpdatedAtTimestampSeconds, ulong waitForQuietThresholdSeconds, OptionalValue metrics, OptionalValue neuronManagementVotingPeriodSeconds, List nodeProviders, OptionalValue cachedDailyMaturityModulationBasisPoints, OptionalValue economics, OptionalValue spawningNeurons, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, OptionalValue migrations, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, OptionalValue makingSnsProposal, OptionalValue mostRecentMonthlyNodeProviderRewards, OptionalValue maturityModulationLastUpdatedAtTimestampSeconds, ulong waitForQuietThresholdSeconds, OptionalValue metrics, OptionalValue neuronManagementVotingPeriodSeconds, List nodeProviders, OptionalValue cachedDailyMaturityModulationBasisPoints, OptionalValue economics, OptionalValue spawningNeurons, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, OptionalValue migrations, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) { this.DefaultFollowees = defaultFollowees; this.MakingSnsProposal = makingSnsProposal; diff --git a/samples/Sample.Shared/ICRC1Ledger/ICRC1LedgerApiClient.cs b/samples/Sample.Shared/ICRC1Ledger/ICRC1LedgerApiClient.cs index 44424d4f..b32b1c8f 100644 --- a/samples/Sample.Shared/ICRC1Ledger/ICRC1LedgerApiClient.cs +++ b/samples/Sample.Shared/ICRC1Ledger/ICRC1LedgerApiClient.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Agent.Agents; using EdjCase.ICP.Candid.Models; using EdjCase.ICP.Candid; @@ -16,6 +6,7 @@ using System.Collections.Generic; using Sample.Shared.ICRC1Ledger; using EdjCase.ICP.Candid.Mapping; +using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/Account.cs b/samples/Sample.Shared/ICRC1Ledger/Models/Account.cs index 32f30d9d..53143a1f 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/Account.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/Account.cs @@ -1,15 +1,6 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; +using Subaccount = System.Collections.Generic.List; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/BlockRange.cs b/samples/Sample.Shared/ICRC1Ledger/Models/BlockRange.cs index d84a491e..0f2c6a3d 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/BlockRange.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/BlockRange.cs @@ -1,15 +1,6 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; +using Block = Sample.Shared.ICRC1Ledger.Models.Value; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/ChangeFeeCollector.cs b/samples/Sample.Shared/ICRC1Ledger/Models/ChangeFeeCollector.cs index 7727fb3a..eee7c158 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/ChangeFeeCollector.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/ChangeFeeCollector.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using System; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/DataCertificate.cs b/samples/Sample.Shared/ICRC1Ledger/Models/DataCertificate.cs index d3f0189e..6f047c8d 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/DataCertificate.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/DataCertificate.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksArgs.cs b/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksArgs.cs index 0f010510..a22100c8 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksArgs.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksArgs.cs @@ -1,15 +1,6 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; +using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksResponse.cs b/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksResponse.cs index 110e926a..a66c25de 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksResponse.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/GetBlocksResponse.cs @@ -1,17 +1,10 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; using Sample.Shared.ICRC1Ledger.Models; +using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; +using Block = Sample.Shared.ICRC1Ledger.Models.Value; +using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsRequest.cs b/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsRequest.cs index 50d4fc9b..055252c4 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsRequest.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsRequest.cs @@ -1,15 +1,6 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; +using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsResponse.cs b/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsResponse.cs index 4c195a04..b78c637b 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsResponse.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/GetTransactionsResponse.cs @@ -1,17 +1,9 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; using Sample.Shared.ICRC1Ledger.Models; +using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; +using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/InitArgs.cs b/samples/Sample.Shared/ICRC1Ledger/Models/InitArgs.cs index 7e2d7429..c09e86f1 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/InitArgs.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/InitArgs.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/LedgerArg.cs b/samples/Sample.Shared/ICRC1Ledger/Models/LedgerArg.cs index ac9562a8..b95810b7 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/LedgerArg.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/LedgerArg.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/MetadataValue.cs b/samples/Sample.Shared/ICRC1Ledger/Models/MetadataValue.cs index 1bfb2466..f8bc73b7 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/MetadataValue.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/MetadataValue.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using EdjCase.ICP.Candid.Models; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/Transaction.cs b/samples/Sample.Shared/ICRC1Ledger/Models/Transaction.cs index 814d6304..be04dfc9 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/Transaction.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/Transaction.cs @@ -1,17 +1,8 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Sample.Shared.ICRC1Ledger.Models; using System.Collections.Generic; +using Timestamp = System.UInt64; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/TransactionRange.cs b/samples/Sample.Shared/ICRC1Ledger/Models/TransactionRange.cs index d183f922..b9ffca6e 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/TransactionRange.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/TransactionRange.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Sample.Shared.ICRC1Ledger.Models; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/TransferArg.cs b/samples/Sample.Shared/ICRC1Ledger/Models/TransferArg.cs index 7badf499..72f6424b 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/TransferArg.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/TransferArg.cs @@ -1,17 +1,10 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Sample.Shared.ICRC1Ledger.Models; using System.Collections.Generic; +using Subaccount = System.Collections.Generic.List; +using Timestamp = System.UInt64; +using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/TransferError.cs b/samples/Sample.Shared/ICRC1Ledger/Models/TransferError.cs index 0b601f14..de52303f 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/TransferError.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/TransferError.cs @@ -1,17 +1,9 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using System; using EdjCase.ICP.Candid.Models; +using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; +using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/TransferResult.cs b/samples/Sample.Shared/ICRC1Ledger/Models/TransferResult.cs index 1b7447ba..f8a83732 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/TransferResult.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/TransferResult.cs @@ -1,16 +1,7 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using System; +using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; namespace Sample.Shared.ICRC1Ledger.Models { diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/UpgradeArgs.cs b/samples/Sample.Shared/ICRC1Ledger/Models/UpgradeArgs.cs index f27a4f29..de2d6107 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/UpgradeArgs.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/UpgradeArgs.cs @@ -1,13 +1,3 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; diff --git a/samples/Sample.Shared/ICRC1Ledger/Models/Value.cs b/samples/Sample.Shared/ICRC1Ledger/Models/Value.cs index 5835165a..a283f459 100644 --- a/samples/Sample.Shared/ICRC1Ledger/Models/Value.cs +++ b/samples/Sample.Shared/ICRC1Ledger/Models/Value.cs @@ -1,18 +1,9 @@ -using BlockIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using Subaccount = System.Collections.Generic.List; -using Timestamp = System.UInt64; -using Duration = System.UInt64; -using Tokens = EdjCase.ICP.Candid.Models.UnboundedUInt; -using TxIndex = EdjCase.ICP.Candid.Models.UnboundedUInt; -using QueryArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; -using Map = System.Collections.Generic.List<(System.String, Sample.Shared.ICRC1Ledger.Models.Value)>; -using Block = Sample.Shared.ICRC1Ledger.Models.Value; -using QueryBlockArchiveFn = EdjCase.ICP.Candid.Models.Values.CandidFunc; using EdjCase.ICP.Candid.Mapping; using Sample.Shared.ICRC1Ledger.Models; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; using System; +using Map = System.Collections.Generic.List>; namespace Sample.Shared.ICRC1Ledger.Models { @@ -23,12 +14,12 @@ public class Value public ValueTag Tag { get; set; } [VariantValueProperty()] - public object? ValueValue { get; set; } + public object? Value_ { get; set; } - public Value(ValueTag tag, object? valueValue) + public Value(ValueTag tag, object? value) { this.Tag = tag; - this.ValueValue = valueValue; + this.Value_ = value; } protected Value() @@ -73,43 +64,43 @@ public static Value Map(Map info) public List AsBlob() { this.ValidateTag(ValueTag.Blob); - return (List)this.ValueValue!; + return (List)this.Value_!; } public string AsText() { this.ValidateTag(ValueTag.Text); - return (string)this.ValueValue!; + return (string)this.Value_!; } public UnboundedUInt AsNat() { this.ValidateTag(ValueTag.Nat); - return (UnboundedUInt)this.ValueValue!; + return (UnboundedUInt)this.Value_!; } public ulong AsNat64() { this.ValidateTag(ValueTag.Nat64); - return (ulong)this.ValueValue!; + return (ulong)this.Value_!; } public UnboundedInt AsInt() { this.ValidateTag(ValueTag.Int); - return (UnboundedInt)this.ValueValue!; + return (UnboundedInt)this.Value_!; } public List AsArray() { this.ValidateTag(ValueTag.Array); - return (List)this.ValueValue!; + return (List)this.Value_!; } public Map AsMap() { this.ValidateTag(ValueTag.Map); - return (Map)this.ValueValue!; + return (Map)this.Value_!; } private void ValidateTag(ValueTag tag) diff --git a/samples/Sample.Shared/candid-client.toml b/samples/Sample.Shared/candid-client.toml index 846fcd8f..0332eb74 100644 --- a/samples/Sample.Shared/candid-client.toml +++ b/samples/Sample.Shared/candid-client.toml @@ -17,7 +17,7 @@ canister-id = "mxzaz-hqaaa-aaaar-qaada-cai" name = "AddressBook" type = "file" file-path = "ServiceDefinitions/AddressBook.did" -output-directory = "C:/Git/ICP.NET/samples/Sample.Shared/Address" # override +output-directory = "Address" # override no-folders = true keep-candid-case = true @@ -36,5 +36,4 @@ representation = "Array" type = "record" [clients.types.Governance.fields.default_followees] type = "vec" -representation = "Dictionary" - +representation = "Dictionary" \ No newline at end of file diff --git a/src/ClientGenerator/API.xml b/src/ClientGenerator/API.xml index 54ce9a1f..6e5db3da 100644 --- a/src/ClientGenerator/API.xml +++ b/src/ClientGenerator/API.xml @@ -107,16 +107,6 @@ Optional. The url of the boundry node for the internet computer. Defaults to ic0.app Optional. Specifies options for each candid type in the definition - - - Interface to specify generation options for specific types in the candid - - - - - The candid type of the implementation class - - Type options for a record field or variant option @@ -136,6 +126,16 @@ Optional. The C# type name to use instead of the default Optional. The field or option type information + + + Interface to specify generation options for specific types in the candid + + + + + The candid type of the implementation class + + Type generation options for record candid types diff --git a/src/ClientGenerator/ClientCodeGenerator.cs b/src/ClientGenerator/ClientCodeGenerator.cs index b30c139d..5ff7eb1f 100644 --- a/src/ClientGenerator/ClientCodeGenerator.cs +++ b/src/ClientGenerator/ClientCodeGenerator.cs @@ -70,7 +70,7 @@ public static ClientSyntax GenerateClient( ClientGenerationOptions options ) { - var nameHelper = new NameHelper(); + var nameHelper = new NameHelper(options.KeepCandidCase); // Mapping of A => Type // where candid is: type A = Type; Dictionary declaredTypes = service.DeclaredTypes @@ -205,19 +205,24 @@ private static SourceCodeType ResolveSourceCodeType( nameHelper, innerTypeOptions ); - switch (vTypeOptions?.Representation ?? VectorRepresentation.List) + bool isDictionaryCompatible = innerType is TupleSourceCodeType t && t.Fields.Count == 2; + VectorRepresentation defaultRepresentation = isDictionaryCompatible + ? VectorRepresentation.Dictionary + : VectorRepresentation.List; + switch (vTypeOptions?.Representation ?? defaultRepresentation) { case VectorRepresentation.Array: return new ArraySourceCodeType(innerType); case VectorRepresentation.List: return new ListSourceCodeType(innerType); case VectorRepresentation.Dictionary: - if (innerType is not TupleSourceCodeType t || t.Fields.Count != 2) + if (!isDictionaryCompatible) { throw new Exception("List to dictionary conversion is only compatible with `vec record { a; b }` candid types"); } - SourceCodeType keyType = t.Fields[0]; - SourceCodeType valueType = t.Fields[1]; + TupleSourceCodeType tuple = (TupleSourceCodeType)innerType; + SourceCodeType keyType = tuple.Fields[0]; + SourceCodeType valueType = tuple.Fields[1]; return new DictionarySourceCodeType(keyType, valueType); default: throw new NotImplementedException(); diff --git a/src/ClientGenerator/ClientGenerationOptions.cs b/src/ClientGenerator/ClientGenerationOptions.cs index 1c69849b..04d394ea 100644 --- a/src/ClientGenerator/ClientGenerationOptions.cs +++ b/src/ClientGenerator/ClientGenerationOptions.cs @@ -108,19 +108,6 @@ public ClientGenerationOptions( } } - /// - /// Interface to specify generation options for specific types in the candid - /// - public interface ITypeOptions - { - //public string? NameOverride { get; init; } // TODO - - /// - /// The candid type of the implementation class - /// - public CandidTypeCode Type { get; } - - } /// /// Type options for a record field or variant option @@ -148,6 +135,20 @@ public NamedTypeOptions( } } + /// + /// Interface to specify generation options for specific types in the candid + /// + public interface ITypeOptions + { + //public string? NameOverride { get; init; } // TODO + + /// + /// The candid type of the implementation class + /// + public CandidTypeCode Type { get; } + + } + /// /// Type generation options for record candid types /// diff --git a/src/ClientGenerator/ResolvedName.cs b/src/ClientGenerator/ResolvedName.cs index b6d9f262..d3a10bfa 100644 --- a/src/ClientGenerator/ResolvedName.cs +++ b/src/ClientGenerator/ResolvedName.cs @@ -45,13 +45,19 @@ internal string ToCamelCase() internal class NameHelper { + public bool KeepCandidCase { get; } + public NameHelper(bool keepCandidCase) + { + this.KeepCandidCase = keepCandidCase; + } + public ResolvedName ResolveName(CandidTag tag, string? nameOverride = null) { string stringValue; if (nameOverride != null) { stringValue = nameOverride; - } + } else { if (tag.Name != null) @@ -67,25 +73,28 @@ public ResolvedName ResolveName(CandidTag tag, string? nameOverride = null) { stringValue = tag.Id.ToString(); } - if (char.IsNumber(stringValue[0])) - { - // If Its a number, prefix it - stringValue = "F" + stringValue; - } } - string resolvedNameString = StringUtil.ToPascalCase(stringValue); - resolvedNameString = Escape(resolvedNameString); - var resolvedName = new ResolvedName(resolvedNameString, tag); - return resolvedName; + if (char.IsNumber(stringValue[0])) + { + // If Its a number, prefix it + stringValue = "F" + stringValue; + } + stringValue = this.KeepCandidCase ? stringValue : StringUtil.ToPascalCase(stringValue); + if (IsKeyword(stringValue)) + { + // Add @ before reserved words + stringValue = "@" + stringValue; + } + if (stringValue.StartsWith("set_") || stringValue.StartsWith("get_")) + { + // Add _ before getters/setters words + stringValue = "_" + stringValue; + } + return new ResolvedName(stringValue, tag); } private static string Escape(string value) { - if (IsKeyword(value)) - { - // Add @ before reserved words - return "@" + value; - } return value; } diff --git a/src/ClientGenerator/TomlConfigParser.cs b/src/ClientGenerator/TomlConfigParser.cs index d9066642..b5046f8f 100644 --- a/src/ClientGenerator/TomlConfigParser.cs +++ b/src/ClientGenerator/TomlConfigParser.cs @@ -7,11 +7,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml.Linq; using Tomlyn.Model; namespace EdjCase.ICP.ClientGenerator { - internal static class TomlConfigParser { public static List Parse(string filePath) @@ -23,14 +23,12 @@ public static List Parse(string filePath) string configToml = File.ReadAllText(filePath); TomlTable config = Tomlyn.Toml.ToModel(configToml); - string baseNamespace = GetRequired(config, "namespace"); - string? baseUrl = GetOptional(config, "url"); - bool? purgeDirectory = GetOptional(config, "purge-directory"); - bool? noFolders = GetOptional(config, "no-folders"); - Uri? boundryNodeUrl = baseUrl == null ? null : new Uri(baseUrl); - string outputDirectory = Path.GetRelativePath("./", GetOptional(config, "output-directory") ?? "./"); - bool? featureNullable = GetOptional(config, "feature-nullable"); - bool? keepCandidCase = GetOptional(config, "keep-candid-case"); + CommonOptions globalOptions = ParseCommonOptions(config); + if (string.IsNullOrWhiteSpace(globalOptions.Namespace)) + { + throw new InvalidOperationException($"Failed to parse the `candid-client.toml` config. Missing required global field: 'namespace'"); + } + TomlTableArray clients = config["clients"].Cast(); @@ -54,33 +52,73 @@ public static List Parse(string filePath) default: throw new NotImplementedException(); } - string @namespace = baseNamespace + "." + name; - string clientOutputDirectory = GetOptional(client, "output-directory") ?? Path.Combine(outputDirectory, name); - string clientNamespace = GetOptional(client, "namespace") ?? @namespace; - bool clientPurgeOutputDirectory = GetOptional(client, "purge-directory") ?? purgeDirectory ?? true; - bool clientNoFolders = GetOptional(client, "no-folders") ?? noFolders ?? false; - bool clientFeatureNullable = GetOptional(client, "feature-nullable") ?? featureNullable ?? true; - bool clientKeepCandidCase = GetOptional(client, "keep-candid-case") ?? keepCandidCase ?? false; - TomlTable? typeTable = GetOptional(client, "types"); - Dictionary types = BuildTypes(typeTable); + CommonOptions clientOptions = ParseCommonOptions(client, (globalOptions, name)); return new ClientGenerationOptions( name, - clientNamespace, - getDefinitionFromCanister, - filePathOrCandidId, - clientOutputDirectory, - clientPurgeOutputDirectory, - clientNoFolders, - clientFeatureNullable, - clientKeepCandidCase, - boundryNodeUrl, - types + @namespace: clientOptions.Namespace!, + getDefinitionFromCanister: getDefinitionFromCanister, + filePathOrCandidId: filePathOrCandidId, + outputDirectory: clientOptions.OutputDirectory ?? "./", + purgeOutputDirectory: clientOptions.PurgeDirectory ?? true, + noFolders: clientOptions.NoFolders ?? false, + featureNullable: clientOptions.FeatureNullable ?? true, + keepCandidCase: clientOptions.KeepCandidCase ?? false, + boundryNodeUrl: clientOptions.BaseUrl, + types: clientOptions.Types ); }) .ToList(); } + private static CommonOptions ParseCommonOptions(TomlTable config, (CommonOptions Options, string ClientName)? parent = null) + { + + string? @namespace = GetOptional(config, "namespace") ?? (parent == null ? null : parent.Value.Options.Namespace + "." + parent.Value.ClientName); + string? baseUrl = GetOptional(config, "url"); + Uri? boundryNodeUrl = baseUrl == null ? parent?.Options.BaseUrl : new Uri(baseUrl); + bool? purgeDirectory = GetOptional(config, "purge-directory") ?? parent?.Options.PurgeDirectory; + bool? noFolders = GetOptional(config, "no-folders") ?? parent?.Options.NoFolders; + string? outputDirectory = GetOptional(config, "output-directory") ?? (parent == null ? null : Path.Combine(parent.Value.Options.OutputDirectory ?? "./", parent.Value.ClientName)); + bool? featureNullable = GetOptional(config, "feature-nullable") ?? parent?.Options.FeatureNullable; + bool? keepCandidCase = GetOptional(config, "keep-candid-case") ?? parent?.Options.KeepCandidCase; + TomlTable? typeTable = GetOptional(config, "types"); + Dictionary types = BuildTypes(typeTable); + if (parent?.Options.Types != null) + { + foreach ((string key, NamedTypeOptions value) in parent.Value.Options.Types) + { + if (!parent.Value.Options.Types.ContainsKey(key)) + { + parent.Value.Options.Types.Add(key, value); + } + else + { + parent.Value.Options.Types[key] = MergeOptions(value, parent.Value.Options.Types[key]); + } + } + } + + return new CommonOptions( + @namespace, + boundryNodeUrl, + purgeDirectory, + noFolders, + outputDirectory, + featureNullable, + keepCandidCase, + types + ); + } + + private static NamedTypeOptions MergeOptions(NamedTypeOptions? primary, NamedTypeOptions? secondary) + { + return new NamedTypeOptions( + nameOverride: primary?.NameOverride ?? secondary?.NameOverride, + typeOptions: primary?.TypeOptions ?? secondary?.TypeOptions // TODO merge vs override? + ); + } + private static Dictionary BuildTypes(TomlTable? typeTable) { Dictionary types = new(); @@ -180,4 +218,37 @@ private static TEnum GetEnumRequired(TomlTable table, string key) } } + + internal class CommonOptions + { + public string? Namespace { get; } + public Uri? BaseUrl { get; } + public bool? PurgeDirectory { get; } + public bool? NoFolders { get; } + public string? OutputDirectory { get; } + public bool? FeatureNullable { get; } + public bool? KeepCandidCase { get; } + public Dictionary Types { get; } + + public CommonOptions( + string? @namespace, + Uri? baseUrl, + bool? purgeDirectory, + bool? noFolders, + string? outputDirectory, + bool? featureNullable, + bool? keepCandidCase, + Dictionary? types + ) + { + this.Namespace = @namespace; + this.BaseUrl = baseUrl; + this.PurgeDirectory = purgeDirectory; + this.NoFolders = noFolders; + this.OutputDirectory = outputDirectory; + this.FeatureNullable = featureNullable; + this.KeepCandidCase = keepCandidCase; + this.Types = types ?? new Dictionary(); + } + } } diff --git a/test/Candid.Tests/Generators/ClientGeneratorTests.cs b/test/Candid.Tests/Generators/ClientGeneratorTests.cs index c7892013..84e517b7 100644 --- a/test/Candid.Tests/Generators/ClientGeneratorTests.cs +++ b/test/Candid.Tests/Generators/ClientGeneratorTests.cs @@ -48,14 +48,15 @@ bool keepCandidCase ) { ClientGenerationOptions options = new( - serviceName, - baseNamespace, - false, - "", - "./", - noFolders, - featureNullable, - keepCandidCase, + name: serviceName, + @namespace: baseNamespace, + getDefinitionFromCanister: false, + filePathOrCandidId: "", + outputDirectory: "./", + purgeOutputDirectory: true, + noFolders: noFolders, + featureNullable: featureNullable, + keepCandidCase: keepCandidCase, boundryNodeUrl: null, types: null ); diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False.snap index e24d2318..9b9e2d89 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False.snap @@ -22,20 +22,20 @@ namespace Test this.Converter = converter; } - public async Task)>> A() + public async Task>> A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> B() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True.snap index a36237ee..c214dad0 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True.snap @@ -13,29 +13,29 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task)>> A() + public async Task>> a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> b() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False.snap index e24d2318..d331df95 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False.snap @@ -13,29 +13,29 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task)>> A() + public async Task>> A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> B() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True.snap index a36237ee..2fd21dd7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True.snap @@ -22,20 +22,20 @@ namespace Test this.Converter = converter; } - public async Task)>> A() + public async Task>> a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> b() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False.snap index e24d2318..9b9e2d89 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False.snap @@ -22,20 +22,20 @@ namespace Test this.Converter = converter; } - public async Task)>> A() + public async Task>> A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> B() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True.snap index a36237ee..c214dad0 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True.snap @@ -13,29 +13,29 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task)>> A() + public async Task>> a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> b() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False.snap index e24d2318..d331df95 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False.snap @@ -13,29 +13,29 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task)>> A() + public async Task>> A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> B() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True.snap index a36237ee..2fd21dd7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True.snap @@ -22,20 +22,20 @@ namespace Test this.Converter = converter; } - public async Task)>> A() + public async Task>> a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects)>>(this.Converter); + return reply.ToObjects>>(this.Converter); } - public async Task> B() + public async Task> b() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "b", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } } } diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True.snap index 4c6404c4..ba605c16 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True.snap @@ -16,42 +16,42 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task cancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); return reply.ToObjects(this.Converter); } - public async Task Clear() + public async Task clear() { CandidArg arg = CandidArg.FromCandid(); await this.Agent.CallAsync(this.CanisterId, "clear", arg); } - public async Task Credit(Principal arg0, Token arg1, UnboundedUInt arg2) + public async Task credit(Principal arg0, Token arg1, UnboundedUInt arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> getAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); @@ -59,7 +59,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetBalance(Token arg0) + public async Task getBalance(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalance", arg); @@ -67,7 +67,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> getBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); @@ -75,42 +75,42 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetDepositAddress() + public async Task> getDepositAddress() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getDepositAddress", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> getOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> getOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); return reply.ToObjects>(this.Converter); } - public async Task GetSymbol(Token arg0) + public async Task getSymbol(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getSymbol", arg); return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task placeOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); return reply.ToObjects(this.Converter); } - public async Task Whoami() + public async Task whoami() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "whoami", arg); @@ -118,7 +118,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); @@ -143,9 +143,9 @@ namespace Test.Models public WithdrawReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public WithdrawReceipt(WithdrawReceiptTag tag, object? value) + public WithdrawReceipt(WithdrawReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -222,9 +222,9 @@ namespace Test.Models public OrderPlacementReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) + public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -287,7 +287,6 @@ namespace Test.Models Type File: 'Order' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; @@ -296,32 +295,26 @@ namespace Test.Models { public class Order { - [CandidName("from")] - public Token From { get; set; } + public Token from { get; set; } - [CandidName("fromAmount")] - public UnboundedUInt FromAmount { get; set; } + public UnboundedUInt fromAmount { get; set; } - [CandidName("id")] - public OrderId Id { get; set; } + public OrderId id { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("to")] - public Token To { get; set; } + public Token to { get; set; } - [CandidName("toAmount")] - public UnboundedUInt ToAmount { get; set; } + public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) { - this.From = from; - this.FromAmount = fromAmount; - this.Id = id; - this.Owner = owner; - this.To = to; - this.ToAmount = toAmount; + this.from = from; + this.fromAmount = fromAmount; + this.id = id; + this.owner = owner; + this.to = to; + this.toAmount = toAmount; } public Order() @@ -346,9 +339,9 @@ namespace Test.Models public DepositReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public DepositReceipt(DepositReceiptTag tag, object? value) + public DepositReceipt(DepositReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -425,9 +418,9 @@ namespace Test.Models public CancelOrderReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) + public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -490,7 +483,6 @@ namespace Test.Models Type File: 'Balance' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; @@ -498,20 +490,17 @@ namespace Test.Models { public class Balance { - [CandidName("amount")] - public UnboundedUInt Amount { get; set; } + public UnboundedUInt amount { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("token")] - public Token Token { get; set; } + public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) { - this.Amount = amount; - this.Owner = owner; - this.Token = token; + this.amount = amount; + this.owner = owner; + this.token = token; } public Balance() diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False.snap index 01e2ecb0..4c6404c4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False.snap @@ -16,20 +16,20 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task CancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task Clear() @@ -44,19 +44,19 @@ namespace Test await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task Deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> GetAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task GetBalance(Token arg0) @@ -67,12 +67,12 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> GetBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task> GetDepositAddress() @@ -82,18 +82,18 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> GetOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> GetOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task GetSymbol(Token arg0) @@ -103,11 +103,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task Whoami() @@ -118,11 +118,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -130,11 +130,11 @@ namespace Test Type File: 'WithdrawReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(WithdrawReceiptTag))] public class WithdrawReceipt @@ -143,9 +143,9 @@ namespace Test public WithdrawReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public WithdrawReceipt(WithdrawReceiptTag tag, object value) + public WithdrawReceipt(WithdrawReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -197,7 +197,7 @@ namespace Test Type File: 'WithdrawErr' -namespace Test +namespace Test.Models { public enum WithdrawErr { @@ -209,11 +209,11 @@ namespace Test Type File: 'OrderPlacementReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(OrderPlacementReceiptTag))] public class OrderPlacementReceipt @@ -222,9 +222,9 @@ namespace Test public OrderPlacementReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) + public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -276,7 +276,7 @@ namespace Test Type File: 'OrderPlacementErr' -namespace Test +namespace Test.Models { public enum OrderPlacementErr { @@ -292,7 +292,7 @@ using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; -namespace Test +namespace Test.Models { public class Order { @@ -333,11 +333,11 @@ namespace Test Type File: 'DepositReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(DepositReceiptTag))] public class DepositReceipt @@ -346,9 +346,9 @@ namespace Test public DepositReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public DepositReceipt(DepositReceiptTag tag, object value) + public DepositReceipt(DepositReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -400,7 +400,7 @@ namespace Test Type File: 'DepositErr' -namespace Test +namespace Test.Models { public enum DepositErr { @@ -412,11 +412,11 @@ namespace Test Type File: 'CancelOrderReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; using OrderId = System.UInt32; -namespace Test +namespace Test.Models { [Variant(typeof(CancelOrderReceiptTag))] public class CancelOrderReceipt @@ -425,9 +425,9 @@ namespace Test public CancelOrderReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) + public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -479,7 +479,7 @@ namespace Test Type File: 'CancelOrderErr' -namespace Test +namespace Test.Models { public enum CancelOrderErr { @@ -494,7 +494,7 @@ using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; -namespace Test +namespace Test.Models { public class Balance { diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True.snap index 411b151e..5da894d4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True.snap @@ -25,41 +25,41 @@ namespace Test this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task cancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task Clear() + public async Task clear() { CandidArg arg = CandidArg.FromCandid(); await this.Agent.CallAsync(this.CanisterId, "clear", arg); } - public async Task Credit(Principal arg0, Token arg1, UnboundedUInt arg2) + public async Task credit(Principal arg0, Token arg1, UnboundedUInt arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> getAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task GetBalance(Token arg0) + public async Task getBalance(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalance", arg); @@ -67,50 +67,50 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> getBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetDepositAddress() + public async Task> getDepositAddress() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getDepositAddress", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> getOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> getOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task GetSymbol(Token arg0) + public async Task getSymbol(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getSymbol", arg); return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task placeOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task Whoami() + public async Task whoami() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "whoami", arg); @@ -118,11 +118,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -130,11 +130,11 @@ namespace Test Type File: 'WithdrawReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(WithdrawReceiptTag))] public class WithdrawReceipt @@ -197,7 +197,7 @@ namespace Test Type File: 'WithdrawErr' -namespace Test +namespace Test.Models { public enum WithdrawErr { @@ -209,11 +209,11 @@ namespace Test Type File: 'OrderPlacementReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(OrderPlacementReceiptTag))] public class OrderPlacementReceipt @@ -276,7 +276,7 @@ namespace Test Type File: 'OrderPlacementErr' -namespace Test +namespace Test.Models { public enum OrderPlacementErr { @@ -287,41 +287,34 @@ namespace Test Type File: 'Order' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; -namespace Test +namespace Test.Models { public class Order { - [CandidName("from")] - public Token From { get; set; } + public Token from { get; set; } - [CandidName("fromAmount")] - public UnboundedUInt FromAmount { get; set; } + public UnboundedUInt fromAmount { get; set; } - [CandidName("id")] - public OrderId Id { get; set; } + public OrderId id { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("to")] - public Token To { get; set; } + public Token to { get; set; } - [CandidName("toAmount")] - public UnboundedUInt ToAmount { get; set; } + public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) { - this.From = from; - this.FromAmount = fromAmount; - this.Id = id; - this.Owner = owner; - this.To = to; - this.ToAmount = toAmount; + this.from = from; + this.fromAmount = fromAmount; + this.id = id; + this.owner = owner; + this.to = to; + this.toAmount = toAmount; } public Order() @@ -333,11 +326,11 @@ namespace Test Type File: 'DepositReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(DepositReceiptTag))] public class DepositReceipt @@ -400,7 +393,7 @@ namespace Test Type File: 'DepositErr' -namespace Test +namespace Test.Models { public enum DepositErr { @@ -412,11 +405,11 @@ namespace Test Type File: 'CancelOrderReceipt' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; using OrderId = System.UInt32; -namespace Test +namespace Test.Models { [Variant(typeof(CancelOrderReceiptTag))] public class CancelOrderReceipt @@ -479,7 +472,7 @@ namespace Test Type File: 'CancelOrderErr' -namespace Test +namespace Test.Models { public enum CancelOrderErr { @@ -490,28 +483,24 @@ namespace Test Type File: 'Balance' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; -namespace Test +namespace Test.Models { public class Balance { - [CandidName("amount")] - public UnboundedUInt Amount { get; set; } + public UnboundedUInt amount { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("token")] - public Token Token { get; set; } + public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) { - this.Amount = amount; - this.Owner = owner; - this.Token = token; + this.amount = amount; + this.owner = owner; + this.token = token; } public Balance() diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False.snap index ea1050f6..01e2ecb0 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False.snap @@ -25,11 +25,11 @@ namespace Test this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task CancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task Clear() @@ -44,19 +44,19 @@ namespace Test await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task Deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> GetAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task GetBalance(Token arg0) @@ -67,12 +67,12 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> GetBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task> GetDepositAddress() @@ -82,18 +82,18 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> GetOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> GetOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } public async Task GetSymbol(Token arg0) @@ -103,11 +103,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task Whoami() @@ -118,11 +118,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -130,11 +130,11 @@ namespace Test Type File: 'WithdrawReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(WithdrawReceiptTag))] public class WithdrawReceipt @@ -197,7 +197,7 @@ namespace Test.Models Type File: 'WithdrawErr' -namespace Test.Models +namespace Test { public enum WithdrawErr { @@ -209,11 +209,11 @@ namespace Test.Models Type File: 'OrderPlacementReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(OrderPlacementReceiptTag))] public class OrderPlacementReceipt @@ -276,7 +276,7 @@ namespace Test.Models Type File: 'OrderPlacementErr' -namespace Test.Models +namespace Test { public enum OrderPlacementErr { @@ -292,7 +292,7 @@ using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; -namespace Test.Models +namespace Test { public class Order { @@ -333,11 +333,11 @@ namespace Test.Models Type File: 'DepositReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(DepositReceiptTag))] public class DepositReceipt @@ -400,7 +400,7 @@ namespace Test.Models Type File: 'DepositErr' -namespace Test.Models +namespace Test { public enum DepositErr { @@ -412,11 +412,11 @@ namespace Test.Models Type File: 'CancelOrderReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; using OrderId = System.UInt32; -namespace Test.Models +namespace Test { [Variant(typeof(CancelOrderReceiptTag))] public class CancelOrderReceipt @@ -479,7 +479,7 @@ namespace Test.Models Type File: 'CancelOrderErr' -namespace Test.Models +namespace Test { public enum CancelOrderErr { @@ -494,7 +494,7 @@ using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; -namespace Test.Models +namespace Test { public class Balance { diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True.snap index 4c6404c4..90baba40 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True.snap @@ -16,50 +16,50 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task cancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task Clear() + public async Task clear() { CandidArg arg = CandidArg.FromCandid(); await this.Agent.CallAsync(this.CanisterId, "clear", arg); } - public async Task Credit(Principal arg0, Token arg1, UnboundedUInt arg2) + public async Task credit(Principal arg0, Token arg1, UnboundedUInt arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> getAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task GetBalance(Token arg0) + public async Task getBalance(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalance", arg); @@ -67,50 +67,50 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> getBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetDepositAddress() + public async Task> getDepositAddress() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getDepositAddress", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> getOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> getOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task GetSymbol(Token arg0) + public async Task getSymbol(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getSymbol", arg); return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task placeOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task Whoami() + public async Task whoami() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "whoami", arg); @@ -118,11 +118,11 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -130,11 +130,11 @@ namespace Test Type File: 'WithdrawReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(WithdrawReceiptTag))] public class WithdrawReceipt @@ -143,9 +143,9 @@ namespace Test.Models public WithdrawReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public WithdrawReceipt(WithdrawReceiptTag tag, object? value) + public WithdrawReceipt(WithdrawReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -197,7 +197,7 @@ namespace Test.Models Type File: 'WithdrawErr' -namespace Test.Models +namespace Test { public enum WithdrawErr { @@ -209,11 +209,11 @@ namespace Test.Models Type File: 'OrderPlacementReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(OrderPlacementReceiptTag))] public class OrderPlacementReceipt @@ -222,9 +222,9 @@ namespace Test.Models public OrderPlacementReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) + public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -276,7 +276,7 @@ namespace Test.Models Type File: 'OrderPlacementErr' -namespace Test.Models +namespace Test { public enum OrderPlacementErr { @@ -287,41 +287,34 @@ namespace Test.Models Type File: 'Order' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; -namespace Test.Models +namespace Test { public class Order { - [CandidName("from")] - public Token From { get; set; } + public Token from { get; set; } - [CandidName("fromAmount")] - public UnboundedUInt FromAmount { get; set; } + public UnboundedUInt fromAmount { get; set; } - [CandidName("id")] - public OrderId Id { get; set; } + public OrderId id { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("to")] - public Token To { get; set; } + public Token to { get; set; } - [CandidName("toAmount")] - public UnboundedUInt ToAmount { get; set; } + public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) { - this.From = from; - this.FromAmount = fromAmount; - this.Id = id; - this.Owner = owner; - this.To = to; - this.ToAmount = toAmount; + this.from = from; + this.fromAmount = fromAmount; + this.id = id; + this.owner = owner; + this.to = to; + this.toAmount = toAmount; } public Order() @@ -333,11 +326,11 @@ namespace Test.Models Type File: 'DepositReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; using System; -namespace Test.Models +namespace Test { [Variant(typeof(DepositReceiptTag))] public class DepositReceipt @@ -346,9 +339,9 @@ namespace Test.Models public DepositReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public DepositReceipt(DepositReceiptTag tag, object? value) + public DepositReceipt(DepositReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -400,7 +393,7 @@ namespace Test.Models Type File: 'DepositErr' -namespace Test.Models +namespace Test { public enum DepositErr { @@ -412,11 +405,11 @@ namespace Test.Models Type File: 'CancelOrderReceipt' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; using OrderId = System.UInt32; -namespace Test.Models +namespace Test { [Variant(typeof(CancelOrderReceiptTag))] public class CancelOrderReceipt @@ -425,9 +418,9 @@ namespace Test.Models public CancelOrderReceiptTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) + public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) { this.Tag = tag; this.Value = value; @@ -479,7 +472,7 @@ namespace Test.Models Type File: 'CancelOrderErr' -namespace Test.Models +namespace Test { public enum CancelOrderErr { @@ -490,28 +483,24 @@ namespace Test.Models Type File: 'Balance' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; -namespace Test.Models +namespace Test { public class Balance { - [CandidName("amount")] - public UnboundedUInt Amount { get; set; } + public UnboundedUInt amount { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("token")] - public Token Token { get; set; } + public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) { - this.Amount = amount; - this.Owner = owner; - this.Token = token; + this.amount = amount; + this.owner = owner; + this.token = token; } public Balance() diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False.snap index 01e2ecb0..411b151e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False.snap @@ -16,9 +16,9 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; @@ -143,9 +143,9 @@ namespace Test public WithdrawReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public WithdrawReceipt(WithdrawReceiptTag tag, object value) + public WithdrawReceipt(WithdrawReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -222,9 +222,9 @@ namespace Test public OrderPlacementReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) + public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -346,9 +346,9 @@ namespace Test public DepositReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public DepositReceipt(DepositReceiptTag tag, object value) + public DepositReceipt(DepositReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -425,9 +425,9 @@ namespace Test public CancelOrderReceiptTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) + public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) { this.Tag = tag; this.Value = value; diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True.snap index 411b151e..69abc387 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True.snap @@ -25,33 +25,33 @@ namespace Test this.Converter = converter; } - public async Task CancelOrder(OrderId arg0) + public async Task cancelOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); return reply.ToObjects(this.Converter); } - public async Task Clear() + public async Task clear() { CandidArg arg = CandidArg.FromCandid(); await this.Agent.CallAsync(this.CanisterId, "clear", arg); } - public async Task Credit(Principal arg0, Token arg1, UnboundedUInt arg2) + public async Task credit(Principal arg0, Token arg1, UnboundedUInt arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); await this.Agent.CallAsync(this.CanisterId, "credit", arg); } - public async Task Deposit(Token arg0) + public async Task deposit(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); return reply.ToObjects(this.Converter); } - public async Task> GetAllBalances() + public async Task> getAllBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getAllBalances", arg); @@ -59,7 +59,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetBalance(Token arg0) + public async Task getBalance(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalance", arg); @@ -67,7 +67,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetBalances() + public async Task> getBalances() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalances", arg); @@ -75,42 +75,42 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetDepositAddress() + public async Task> getDepositAddress() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getDepositAddress", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrder(OrderId arg0) + public async Task> getOrder(OrderId arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); return reply.ToObjects>(this.Converter); } - public async Task> GetOrders() + public async Task> getOrders() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrders", arg); return reply.ToObjects>(this.Converter); } - public async Task GetSymbol(Token arg0) + public async Task getSymbol(Token arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getSymbol", arg); return reply.ToObjects(this.Converter); } - public async Task PlaceOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) + public async Task placeOrder(Token arg0, UnboundedUInt arg1, Token arg2, UnboundedUInt arg3) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2), CandidTypedValue.FromObject(arg3)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); return reply.ToObjects(this.Converter); } - public async Task Whoami() + public async Task whoami() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "whoami", arg); @@ -118,7 +118,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task Withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) + public async Task withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1), CandidTypedValue.FromObject(arg2)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); @@ -287,7 +287,6 @@ namespace Test Type File: 'Order' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; using OrderId = System.UInt32; @@ -296,32 +295,26 @@ namespace Test { public class Order { - [CandidName("from")] - public Token From { get; set; } + public Token from { get; set; } - [CandidName("fromAmount")] - public UnboundedUInt FromAmount { get; set; } + public UnboundedUInt fromAmount { get; set; } - [CandidName("id")] - public OrderId Id { get; set; } + public OrderId id { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("to")] - public Token To { get; set; } + public Token to { get; set; } - [CandidName("toAmount")] - public UnboundedUInt ToAmount { get; set; } + public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) { - this.From = from; - this.FromAmount = fromAmount; - this.Id = id; - this.Owner = owner; - this.To = to; - this.ToAmount = toAmount; + this.from = from; + this.fromAmount = fromAmount; + this.id = id; + this.owner = owner; + this.to = to; + this.toAmount = toAmount; } public Order() @@ -490,7 +483,6 @@ namespace Test Type File: 'Balance' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Token = EdjCase.ICP.Candid.Models.Principal; @@ -498,20 +490,17 @@ namespace Test { public class Balance { - [CandidName("amount")] - public UnboundedUInt Amount { get; set; } + public UnboundedUInt amount { get; set; } - [CandidName("owner")] - public Principal Owner { get; set; } + public Principal owner { get; set; } - [CandidName("token")] - public Token Token { get; set; } + public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) { - this.Amount = amount; - this.Owner = owner; - this.Token = token; + this.amount = amount; + this.owner = owner; + this.token = token; } public Balance() diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True.snap index 6015c723..1312f3a3 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True.snap @@ -13,16 +13,16 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task A() + public async Task a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); @@ -34,22 +34,18 @@ namespace Test Type File: 'Result' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Result { - [CandidName("a")] - public ulong A { get; set; } + public ulong a { get; set; } - [CandidName("_a")] - public ulong _A { get; set; } + public ulong _a { get; set; } public Result(ulong a, ulong _a) { - this.A = a; - this._A = _a; + this.a = a; + this._a = _a; } public Result() diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False.snap index 8feb8a4e..6015c723 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False.snap @@ -13,21 +13,21 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task A() + public async Task A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -36,7 +36,7 @@ Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Result { diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True.snap index 6f5995fd..0b6a4542 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True.snap @@ -22,34 +22,30 @@ namespace Test this.Converter = converter; } - public async Task A() + public async Task a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } Type File: 'Result' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Result { - [CandidName("a")] - public ulong A { get; set; } + public ulong a { get; set; } - [CandidName("_a")] - public ulong _A { get; set; } + public ulong _a { get; set; } public Result(ulong a, ulong _a) { - this.A = a; - this._A = _a; + this.a = a; + this._a = _a; } public Result() diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False.snap index 6ada7655..8feb8a4e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False.snap @@ -22,12 +22,12 @@ namespace Test this.Converter = converter; } - public async Task A() + public async Task A() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -36,7 +36,7 @@ Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Result { diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True.snap index 6015c723..4492d533 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True.snap @@ -13,43 +13,39 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task A() + public async Task a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } Type File: 'Result' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Result { - [CandidName("a")] - public ulong A { get; set; } + public ulong a { get; set; } - [CandidName("_a")] - public ulong _A { get; set; } + public ulong _a { get; set; } public Result(ulong a, ulong _a) { - this.A = a; - this._A = _a; + this.a = a; + this._a = _a; } public Result() diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False.snap index 8feb8a4e..6f5995fd 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False.snap @@ -13,9 +13,9 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True.snap index 6f5995fd..be72442a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True.snap @@ -22,7 +22,7 @@ namespace Test this.Converter = converter; } - public async Task A() + public async Task a() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "a", arg); @@ -34,22 +34,18 @@ namespace Test Type File: 'Result' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Result { - [CandidName("a")] - public ulong A { get; set; } + public ulong a { get; set; } - [CandidName("_a")] - public ulong _A { get; set; } + public ulong _a { get; set; } public Result(ulong a, ulong _a) { - this.A = a; - this._A = _a; + this.a = a; + this._a = _a; } public Result() diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False.snap index 6b74e80d..f81374fc 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False.snap @@ -1598,7 +1598,7 @@ namespace Test.Models public class Governance { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } [CandidName("wait_for_quiet_threshold_seconds")] public ulong WaitForQuietThresholdSeconds { get; set; } @@ -1622,18 +1622,18 @@ namespace Test.Models public ulong ShortVotingPeriodSeconds { get; set; } [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary Proposals { get; set; } [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary InFlightCommands { get; set; } [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary Neurons { get; set; } [CandidName("genesis_timestamp_seconds")] public ulong GenesisTimestampSeconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { this.DefaultFollowees = defaultFollowees; this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; @@ -1665,7 +1665,7 @@ namespace Test.Models public class GovernanceCachedMetrics { [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary NotDissolvingNeuronsE8sBuckets { get; set; } [CandidName("garbage_collectable_neurons_count")] public ulong GarbageCollectableNeuronsCount { get; set; } @@ -1674,7 +1674,7 @@ namespace Test.Models public ulong NeuronsWithInvalidStakeCount { get; set; } [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary NotDissolvingNeuronsCountBuckets { get; set; } [CandidName("total_supply_icp")] public ulong TotalSupplyIcp { get; set; } @@ -1698,13 +1698,13 @@ namespace Test.Models public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary DissolvingNeuronsCountBuckets { get; set; } [CandidName("dissolving_neurons_count")] public ulong DissolvingNeuronsCount { get; set; } [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary DissolvingNeuronsE8sBuckets { get; set; } [CandidName("community_fund_total_staked_e8s")] public ulong CommunityFundTotalStakedE8s { get; set; } @@ -1712,7 +1712,7 @@ namespace Test.Models [CandidName("timestamp_seconds")] public ulong TimestampSeconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; @@ -1903,12 +1903,12 @@ namespace Test.Models public class ListNeuronsResponse { [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary NeuronInfos { get; set; } [CandidName("full_neurons")] public List FullNeurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { this.NeuronInfos = neuronInfos; this.FullNeurons = fullNeurons; @@ -2284,7 +2284,7 @@ namespace Test.Models public OptionalValue DissolveState { get; set; } [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary Followees { get; set; } [CandidName("neuron_fees_e8s")] public ulong NeuronFeesE8s { get; set; } @@ -2295,7 +2295,7 @@ namespace Test.Models [CandidName("known_neuron_data")] public OptionalValue KnownNeuronData { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { this.Id = id; this.Controller = controller; @@ -2784,7 +2784,7 @@ namespace Test.Models public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2816,7 +2816,7 @@ namespace Test.Models [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { this.Id = id; this.FailureReason = failureReason; @@ -2863,7 +2863,7 @@ namespace Test.Models public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2898,7 +2898,7 @@ namespace Test.Models [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { this.Id = id; this.Status = status; @@ -3591,9 +3591,9 @@ namespace Test.Models public class SetDefaultFollowees { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { this.DefaultFollowees = defaultFollowees; } diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True.snap index 29c35245..29e1324d 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True.snap @@ -14,30 +14,30 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task claim_gtc_neurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(Models.ClaimOrRefreshNeuronFromAccount arg0) + public async Task claim_or_refresh_neuron_from_account(Models.ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); return reply.ToObjects(this.Converter); } - public async Task GetBuildMetadata() + public async Task _get_build_metadata() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_build_metadata", arg); @@ -45,30 +45,30 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task _get_full_neuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task _get_full_neuron_by_id_or_subaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task _get_monthly_node_provider_rewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task _get_network_economics_parameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); @@ -76,7 +76,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetNeuronIds() + public async Task> _get_neuron_ids() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_ids", arg); @@ -84,31 +84,31 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task _get_neuron_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task _get_neuron_info_by_id_or_subaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task _get_node_provider_by_caller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> _get_pending_proposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); @@ -116,7 +116,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> _get_proposal_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); @@ -124,7 +124,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task list_known_neurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); @@ -132,7 +132,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListNeurons(Models.ListNeurons arg0) + public async Task list_neurons(Models.ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); @@ -140,7 +140,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task list_node_providers() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); @@ -148,7 +148,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListProposals(Models.ListProposalInfo arg0) + public async Task list_proposals(Models.ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); @@ -156,21 +156,21 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(Models.ManageNeuron arg0) + public async Task manage_neuron(Models.ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(Models.NeuronId arg0, Models.NeuronId arg1) + public async Task transfer_gtc_neuron(Models.NeuronId arg0, Models.NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(Models.UpdateNodeProvider arg0) + public async Task update_node_provider(Models.UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); @@ -181,19 +181,17 @@ namespace Test Type File: 'AccountIdentifier' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test.Models { public class AccountIdentifier { - [CandidName("hash")] - public List Hash { get; set; } + public List hash { get; set; } public AccountIdentifier(List hash) { - this.Hash = hash; + this.hash = hash; } public AccountIdentifier() @@ -217,9 +215,9 @@ namespace Test.Models public ActionTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Action(ActionTag tag, object? value) + public Action(ActionTag tag, object value) { this.Tag = tag; this.Value = value; @@ -375,19 +373,17 @@ namespace Test.Models Type File: 'AddHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class AddHotKey { - [CandidName("new_hot_key")] - public OptionalValue NewHotKey { get; set; } + public OptionalValue new_hot_key { get; set; } public AddHotKey(OptionalValue newHotKey) { - this.NewHotKey = newHotKey; + this.new_hot_key = newHotKey; } public AddHotKey() @@ -398,7 +394,6 @@ namespace Test.Models Type File: 'AddOrRemoveNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -406,12 +401,11 @@ namespace Test.Models { public class AddOrRemoveNodeProvider { - [CandidName("change")] - public OptionalValue Change { get; set; } + public OptionalValue change { get; set; } public AddOrRemoveNodeProvider(OptionalValue change) { - this.Change = change; + this.change = change; } public AddOrRemoveNodeProvider() @@ -422,18 +416,15 @@ namespace Test.Models Type File: 'Amount' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Amount { - [CandidName("e8s")] - public ulong E8s { get; set; } + public ulong e8s { get; set; } public Amount(ulong e8s) { - this.E8s = e8s; + this.e8s = e8s; } public Amount() @@ -444,7 +435,6 @@ namespace Test.Models Type File: 'ApproveGenesisKyc' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; @@ -452,12 +442,11 @@ namespace Test.Models { public class ApproveGenesisKyc { - [CandidName("principals")] - public List Principals { get; set; } + public List principals { get; set; } public ApproveGenesisKyc(List principals) { - this.Principals = principals; + this.principals = principals; } public ApproveGenesisKyc() @@ -468,22 +457,18 @@ namespace Test.Models Type File: 'Ballot' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Ballot { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) { - this.Vote = vote; - this.VotingPower = votingPower; + this.vote = vote; + this.voting_power = votingPower; } public Ballot() @@ -494,7 +479,6 @@ namespace Test.Models Type File: 'BallotInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -502,16 +486,14 @@ namespace Test.Models { public class BallotInfo { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) { - this.Vote = vote; - this.ProposalId = proposalId; + this.vote = vote; + this.proposal_id = proposalId; } public BallotInfo() @@ -535,9 +517,9 @@ namespace Test.Models public ByTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public By(ByTag tag, object? value) + public By(ByTag tag, object value) { this.Tag = tag; this.Value = value; @@ -622,9 +604,9 @@ namespace Test.Models public ChangeTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Change(ChangeTag tag, object? value) + public Change(ChangeTag tag, object value) { this.Tag = tag; this.Value = value; @@ -676,7 +658,6 @@ namespace Test.Models Type File: 'ClaimOrRefresh' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -684,12 +665,11 @@ namespace Test.Models { public class ClaimOrRefresh { - [CandidName("by")] - public OptionalValue By { get; set; } + public OptionalValue by { get; set; } public ClaimOrRefresh(OptionalValue by) { - this.By = by; + this.by = by; } public ClaimOrRefresh() @@ -700,23 +680,20 @@ namespace Test.Models Type File: 'ClaimOrRefreshNeuronFromAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class ClaimOrRefreshNeuronFromAccount { - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) { - this.Controller = controller; - this.Memo = memo; + this.controller = controller; + this.memo = memo; } public ClaimOrRefreshNeuronFromAccount() @@ -727,7 +704,6 @@ namespace Test.Models Type File: 'ClaimOrRefreshNeuronFromAccountResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -735,12 +711,11 @@ namespace Test.Models { public class ClaimOrRefreshNeuronFromAccountResponse { - [CandidName("result")] - public OptionalValue Result { get; set; } + public OptionalValue result { get; set; } - public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) + public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) { - this.Result = result; + this.result = result; } public ClaimOrRefreshNeuronFromAccountResponse() @@ -751,7 +726,6 @@ namespace Test.Models Type File: 'ClaimOrRefreshResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -759,12 +733,11 @@ namespace Test.Models { public class ClaimOrRefreshResponse { - [CandidName("refreshed_neuron_id")] - public OptionalValue RefreshedNeuronId { get; set; } + public OptionalValue refreshed_neuron_id { get; set; } public ClaimOrRefreshResponse(OptionalValue refreshedNeuronId) { - this.RefreshedNeuronId = refreshedNeuronId; + this.refreshed_neuron_id = refreshedNeuronId; } public ClaimOrRefreshResponse() @@ -788,9 +761,9 @@ namespace Test.Models public CommandTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command(CommandTag tag, object? value) + public Command(CommandTag tag, object value) { this.Tag = tag; this.Value = value; @@ -957,7 +930,7 @@ namespace Test.Models } } -Type File: 'Command1' +Type File: 'Command_1' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -965,158 +938,158 @@ using System; namespace Test.Models { - [Variant(typeof(Command1Tag))] - public class Command1 + [Variant(typeof(Command_1Tag))] + public class Command_1 { [VariantTagProperty()] - public Command1Tag Tag { get; set; } + public Command_1Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command1(Command1Tag tag, object? value) + public Command_1(Command_1Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Command1() + protected Command_1() { } - public static Command1 Error(GovernanceError info) + public static Command_1 Error(GovernanceError info) { - return new Command1(Command1Tag.Error, info); + return new Command_1(Command_1Tag.Error, info); } - public static Command1 Spawn(SpawnResponse info) + public static Command_1 Spawn(SpawnResponse info) { - return new Command1(Command1Tag.Spawn, info); + return new Command_1(Command_1Tag.Spawn, info); } - public static Command1 Split(SpawnResponse info) + public static Command_1 Split(SpawnResponse info) { - return new Command1(Command1Tag.Split, info); + return new Command_1(Command_1Tag.Split, info); } - public static Command1 Follow(Command1.FollowInfo info) + public static Command_1 Follow(Command_1.FollowInfo info) { - return new Command1(Command1Tag.Follow, info); + return new Command_1(Command_1Tag.Follow, info); } - public static Command1 ClaimOrRefresh(ClaimOrRefreshResponse info) + public static Command_1 ClaimOrRefresh(ClaimOrRefreshResponse info) { - return new Command1(Command1Tag.ClaimOrRefresh, info); + return new Command_1(Command_1Tag.ClaimOrRefresh, info); } - public static Command1 Configure(Command1.ConfigureInfo info) + public static Command_1 Configure(Command_1.ConfigureInfo info) { - return new Command1(Command1Tag.Configure, info); + return new Command_1(Command_1Tag.Configure, info); } - public static Command1 RegisterVote(Command1.RegisterVoteInfo info) + public static Command_1 RegisterVote(Command_1.RegisterVoteInfo info) { - return new Command1(Command1Tag.RegisterVote, info); + return new Command_1(Command_1Tag.RegisterVote, info); } - public static Command1 Merge(Command1.MergeInfo info) + public static Command_1 Merge(Command_1.MergeInfo info) { - return new Command1(Command1Tag.Merge, info); + return new Command_1(Command_1Tag.Merge, info); } - public static Command1 DisburseToNeuron(SpawnResponse info) + public static Command_1 DisburseToNeuron(SpawnResponse info) { - return new Command1(Command1Tag.DisburseToNeuron, info); + return new Command_1(Command_1Tag.DisburseToNeuron, info); } - public static Command1 MakeProposal(MakeProposalResponse info) + public static Command_1 MakeProposal(MakeProposalResponse info) { - return new Command1(Command1Tag.MakeProposal, info); + return new Command_1(Command_1Tag.MakeProposal, info); } - public static Command1 MergeMaturity(MergeMaturityResponse info) + public static Command_1 MergeMaturity(MergeMaturityResponse info) { - return new Command1(Command1Tag.MergeMaturity, info); + return new Command_1(Command_1Tag.MergeMaturity, info); } - public static Command1 Disburse(DisburseResponse info) + public static Command_1 Disburse(DisburseResponse info) { - return new Command1(Command1Tag.Disburse, info); + return new Command_1(Command_1Tag.Disburse, info); } public GovernanceError AsError() { - this.ValidateTag(Command1Tag.Error); + this.ValidateTag(Command_1Tag.Error); return (GovernanceError)this.Value!; } public SpawnResponse AsSpawn() { - this.ValidateTag(Command1Tag.Spawn); + this.ValidateTag(Command_1Tag.Spawn); return (SpawnResponse)this.Value!; } public SpawnResponse AsSplit() { - this.ValidateTag(Command1Tag.Split); + this.ValidateTag(Command_1Tag.Split); return (SpawnResponse)this.Value!; } - public Command1.FollowInfo AsFollow() + public Command_1.FollowInfo AsFollow() { - this.ValidateTag(Command1Tag.Follow); - return (Command1.FollowInfo)this.Value!; + this.ValidateTag(Command_1Tag.Follow); + return (Command_1.FollowInfo)this.Value!; } public ClaimOrRefreshResponse AsClaimOrRefresh() { - this.ValidateTag(Command1Tag.ClaimOrRefresh); + this.ValidateTag(Command_1Tag.ClaimOrRefresh); return (ClaimOrRefreshResponse)this.Value!; } - public Command1.ConfigureInfo AsConfigure() + public Command_1.ConfigureInfo AsConfigure() { - this.ValidateTag(Command1Tag.Configure); - return (Command1.ConfigureInfo)this.Value!; + this.ValidateTag(Command_1Tag.Configure); + return (Command_1.ConfigureInfo)this.Value!; } - public Command1.RegisterVoteInfo AsRegisterVote() + public Command_1.RegisterVoteInfo AsRegisterVote() { - this.ValidateTag(Command1Tag.RegisterVote); - return (Command1.RegisterVoteInfo)this.Value!; + this.ValidateTag(Command_1Tag.RegisterVote); + return (Command_1.RegisterVoteInfo)this.Value!; } - public Command1.MergeInfo AsMerge() + public Command_1.MergeInfo AsMerge() { - this.ValidateTag(Command1Tag.Merge); - return (Command1.MergeInfo)this.Value!; + this.ValidateTag(Command_1Tag.Merge); + return (Command_1.MergeInfo)this.Value!; } public SpawnResponse AsDisburseToNeuron() { - this.ValidateTag(Command1Tag.DisburseToNeuron); + this.ValidateTag(Command_1Tag.DisburseToNeuron); return (SpawnResponse)this.Value!; } public MakeProposalResponse AsMakeProposal() { - this.ValidateTag(Command1Tag.MakeProposal); + this.ValidateTag(Command_1Tag.MakeProposal); return (MakeProposalResponse)this.Value!; } public MergeMaturityResponse AsMergeMaturity() { - this.ValidateTag(Command1Tag.MergeMaturity); + this.ValidateTag(Command_1Tag.MergeMaturity); return (MergeMaturityResponse)this.Value!; } public DisburseResponse AsDisburse() { - this.ValidateTag(Command1Tag.Disburse); + this.ValidateTag(Command_1Tag.Disburse); return (DisburseResponse)this.Value!; } - private void ValidateTag(Command1Tag tag) + private void ValidateTag(Command_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1153,7 +1126,7 @@ namespace Test.Models } } - public enum Command1Tag + public enum Command_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -1161,15 +1134,15 @@ namespace Test.Models Spawn, [VariantOptionType(typeof(SpawnResponse))] Split, - [VariantOptionType(typeof(Command1.FollowInfo))] + [VariantOptionType(typeof(Command_1.FollowInfo))] Follow, [VariantOptionType(typeof(ClaimOrRefreshResponse))] ClaimOrRefresh, - [VariantOptionType(typeof(Command1.ConfigureInfo))] + [VariantOptionType(typeof(Command_1.ConfigureInfo))] Configure, - [VariantOptionType(typeof(Command1.RegisterVoteInfo))] + [VariantOptionType(typeof(Command_1.RegisterVoteInfo))] RegisterVote, - [VariantOptionType(typeof(Command1.MergeInfo))] + [VariantOptionType(typeof(Command_1.MergeInfo))] Merge, [VariantOptionType(typeof(SpawnResponse))] DisburseToNeuron, @@ -1182,7 +1155,7 @@ namespace Test.Models } } -Type File: 'Command2' +Type File: 'Command_2' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -1190,114 +1163,114 @@ using System; namespace Test.Models { - [Variant(typeof(Command2Tag))] - public class Command2 + [Variant(typeof(Command_2Tag))] + public class Command_2 { [VariantTagProperty()] - public Command2Tag Tag { get; set; } + public Command_2Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command2(Command2Tag tag, object? value) + public Command_2(Command_2Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Command2() + protected Command_2() { } - public static Command2 Spawn(Spawn info) + public static Command_2 Spawn(Spawn info) { - return new Command2(Command2Tag.Spawn, info); + return new Command_2(Command_2Tag.Spawn, info); } - public static Command2 Split(Split info) + public static Command_2 Split(Split info) { - return new Command2(Command2Tag.Split, info); + return new Command_2(Command_2Tag.Split, info); } - public static Command2 Configure(Configure info) + public static Command_2 Configure(Configure info) { - return new Command2(Command2Tag.Configure, info); + return new Command_2(Command_2Tag.Configure, info); } - public static Command2 Merge(Merge info) + public static Command_2 Merge(Merge info) { - return new Command2(Command2Tag.Merge, info); + return new Command_2(Command_2Tag.Merge, info); } - public static Command2 DisburseToNeuron(DisburseToNeuron info) + public static Command_2 DisburseToNeuron(DisburseToNeuron info) { - return new Command2(Command2Tag.DisburseToNeuron, info); + return new Command_2(Command_2Tag.DisburseToNeuron, info); } - public static Command2 ClaimOrRefreshNeuron(ClaimOrRefresh info) + public static Command_2 ClaimOrRefreshNeuron(ClaimOrRefresh info) { - return new Command2(Command2Tag.ClaimOrRefreshNeuron, info); + return new Command_2(Command_2Tag.ClaimOrRefreshNeuron, info); } - public static Command2 MergeMaturity(MergeMaturity info) + public static Command_2 MergeMaturity(MergeMaturity info) { - return new Command2(Command2Tag.MergeMaturity, info); + return new Command_2(Command_2Tag.MergeMaturity, info); } - public static Command2 Disburse(Disburse info) + public static Command_2 Disburse(Disburse info) { - return new Command2(Command2Tag.Disburse, info); + return new Command_2(Command_2Tag.Disburse, info); } public Spawn AsSpawn() { - this.ValidateTag(Command2Tag.Spawn); + this.ValidateTag(Command_2Tag.Spawn); return (Spawn)this.Value!; } public Split AsSplit() { - this.ValidateTag(Command2Tag.Split); + this.ValidateTag(Command_2Tag.Split); return (Split)this.Value!; } public Configure AsConfigure() { - this.ValidateTag(Command2Tag.Configure); + this.ValidateTag(Command_2Tag.Configure); return (Configure)this.Value!; } public Merge AsMerge() { - this.ValidateTag(Command2Tag.Merge); + this.ValidateTag(Command_2Tag.Merge); return (Merge)this.Value!; } public DisburseToNeuron AsDisburseToNeuron() { - this.ValidateTag(Command2Tag.DisburseToNeuron); + this.ValidateTag(Command_2Tag.DisburseToNeuron); return (DisburseToNeuron)this.Value!; } public ClaimOrRefresh AsClaimOrRefreshNeuron() { - this.ValidateTag(Command2Tag.ClaimOrRefreshNeuron); + this.ValidateTag(Command_2Tag.ClaimOrRefreshNeuron); return (ClaimOrRefresh)this.Value!; } public MergeMaturity AsMergeMaturity() { - this.ValidateTag(Command2Tag.MergeMaturity); + this.ValidateTag(Command_2Tag.MergeMaturity); return (MergeMaturity)this.Value!; } public Disburse AsDisburse() { - this.ValidateTag(Command2Tag.Disburse); + this.ValidateTag(Command_2Tag.Disburse); return (Disburse)this.Value!; } - private void ValidateTag(Command2Tag tag) + private void ValidateTag(Command_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1306,7 +1279,7 @@ namespace Test.Models } } - public enum Command2Tag + public enum Command_2Tag { [VariantOptionType(typeof(Spawn))] Spawn, @@ -1329,7 +1302,6 @@ namespace Test.Models Type File: 'Configure' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -1337,12 +1309,11 @@ namespace Test.Models { public class Configure { - [CandidName("operation")] - public OptionalValue Operation { get; set; } + public OptionalValue operation { get; set; } public Configure(OptionalValue operation) { - this.Operation = operation; + this.operation = operation; } public Configure() @@ -1353,7 +1324,6 @@ namespace Test.Models Type File: 'Disburse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -1361,16 +1331,14 @@ namespace Test.Models { public class Disburse { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } - [CandidName("amount")] - public OptionalValue Amount { get; set; } + public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) { - this.ToAccount = toAccount; - this.Amount = amount; + this.to_account = toAccount; + this.amount = amount; } public Disburse() @@ -1381,18 +1349,15 @@ namespace Test.Models Type File: 'DisburseResponse' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class DisburseResponse { - [CandidName("transfer_block_height")] - public ulong TransferBlockHeight { get; set; } + public ulong transfer_block_height { get; set; } public DisburseResponse(ulong transferBlockHeight) { - this.TransferBlockHeight = transferBlockHeight; + this.transfer_block_height = transferBlockHeight; } public DisburseResponse() @@ -1403,35 +1368,29 @@ namespace Test.Models Type File: 'DisburseToNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class DisburseToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public ulong Nonce { get; set; } + public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.KycVerified = kycVerified; - this.AmountE8s = amountE8s; - this.NewController = newController; - this.Nonce = nonce; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.kyc_verified = kycVerified; + this.amount_e8s = amountE8s; + this.new_controller = newController; + this.nonce = nonce; } public DisburseToNeuron() @@ -1455,9 +1414,9 @@ namespace Test.Models public DissolveStateTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public DissolveState(DissolveStateTag tag, object? value) + public DissolveState(DissolveStateTag tag, object value) { this.Tag = tag; this.Value = value; @@ -1509,23 +1468,20 @@ namespace Test.Models Type File: 'ExecuteNnsFunction' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test.Models { public class ExecuteNnsFunction { - [CandidName("nns_function")] - public int NnsFunction { get; set; } + public int nns_function { get; set; } - [CandidName("payload")] - public List Payload { get; set; } + public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) { - this.NnsFunction = nnsFunction; - this.Payload = payload; + this.nns_function = nnsFunction; + this.payload = payload; } public ExecuteNnsFunction() @@ -1536,7 +1492,6 @@ namespace Test.Models Type File: 'Follow' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1544,16 +1499,14 @@ namespace Test.Models { public class Follow { - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("followees")] - public List Followees { get; set; } + public List followees { get; set; } public Follow(int topic, List followees) { - this.Topic = topic; - this.Followees = followees; + this.topic = topic; + this.followees = followees; } public Follow() @@ -1564,7 +1517,6 @@ namespace Test.Models Type File: 'Followees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1572,12 +1524,11 @@ namespace Test.Models { public class Followees { - [CandidName("followees")] - public List Followees_ { get; set; } + public List followees { get; set; } public Followees(List followees) { - this.Followees_ = followees; + this.followees = followees; } public Followees() @@ -1588,7 +1539,6 @@ namespace Test.Models Type File: 'Governance' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; using EdjCase.ICP.Candid.Models; @@ -1597,56 +1547,44 @@ namespace Test.Models { public class Governance { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - [CandidName("wait_for_quiet_threshold_seconds")] - public ulong WaitForQuietThresholdSeconds { get; set; } + public ulong wait_for_quiet_threshold_seconds { get; set; } - [CandidName("metrics")] - public OptionalValue Metrics { get; set; } + public OptionalValue metrics { get; set; } - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } - [CandidName("economics")] - public OptionalValue Economics { get; set; } + public OptionalValue economics { get; set; } - [CandidName("latest_reward_event")] - public OptionalValue LatestRewardEvent { get; set; } + public OptionalValue latest_reward_event { get; set; } - [CandidName("to_claim_transfers")] - public List ToClaimTransfers { get; set; } + public List to_claim_transfers { get; set; } - [CandidName("short_voting_period_seconds")] - public ulong ShortVotingPeriodSeconds { get; set; } + public ulong short_voting_period_seconds { get; set; } - [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary proposals { get; set; } - [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary in_flight_commands { get; set; } - [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary neurons { get; set; } - [CandidName("genesis_timestamp_seconds")] - public ulong GenesisTimestampSeconds { get; set; } + public ulong genesis_timestamp_seconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { - this.DefaultFollowees = defaultFollowees; - this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; - this.Metrics = metrics; - this.NodeProviders = nodeProviders; - this.Economics = economics; - this.LatestRewardEvent = latestRewardEvent; - this.ToClaimTransfers = toClaimTransfers; - this.ShortVotingPeriodSeconds = shortVotingPeriodSeconds; - this.Proposals = proposals; - this.InFlightCommands = inFlightCommands; - this.Neurons = neurons; - this.GenesisTimestampSeconds = genesisTimestampSeconds; + this.default_followees = defaultFollowees; + this.wait_for_quiet_threshold_seconds = waitForQuietThresholdSeconds; + this.metrics = metrics; + this.node_providers = nodeProviders; + this.economics = economics; + this.latest_reward_event = latestRewardEvent; + this.to_claim_transfers = toClaimTransfers; + this.short_voting_period_seconds = shortVotingPeriodSeconds; + this.proposals = proposals; + this.in_flight_commands = inFlightCommands; + this.neurons = neurons; + this.genesis_timestamp_seconds = genesisTimestampSeconds; } public Governance() @@ -1657,79 +1595,62 @@ namespace Test.Models Type File: 'GovernanceCachedMetrics' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test.Models { public class GovernanceCachedMetrics { - [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - [CandidName("garbage_collectable_neurons_count")] - public ulong GarbageCollectableNeuronsCount { get; set; } + public ulong garbage_collectable_neurons_count { get; set; } - [CandidName("neurons_with_invalid_stake_count")] - public ulong NeuronsWithInvalidStakeCount { get; set; } + public ulong neurons_with_invalid_stake_count { get; set; } - [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary not_dissolving_neurons_count_buckets { get; set; } - [CandidName("total_supply_icp")] - public ulong TotalSupplyIcp { get; set; } + public ulong total_supply_icp { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_count")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayCount { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - [CandidName("dissolved_neurons_count")] - public ulong DissolvedNeuronsCount { get; set; } + public ulong dissolved_neurons_count { get; set; } - [CandidName("total_staked_e8s")] - public ulong TotalStakedE8s { get; set; } + public ulong total_staked_e8s { get; set; } - [CandidName("not_dissolving_neurons_count")] - public ulong NotDissolvingNeuronsCount { get; set; } + public ulong not_dissolving_neurons_count { get; set; } - [CandidName("dissolved_neurons_e8s")] - public ulong DissolvedNeuronsE8s { get; set; } + public ulong dissolved_neurons_e8s { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_e8s")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary dissolving_neurons_count_buckets { get; set; } - [CandidName("dissolving_neurons_count")] - public ulong DissolvingNeuronsCount { get; set; } + public ulong dissolving_neurons_count { get; set; } - [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary dissolving_neurons_e8s_buckets { get; set; } - [CandidName("community_fund_total_staked_e8s")] - public ulong CommunityFundTotalStakedE8s { get; set; } + public ulong community_fund_total_staked_e8s { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { - this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; - this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; - this.NeuronsWithInvalidStakeCount = neuronsWithInvalidStakeCount; - this.NotDissolvingNeuronsCountBuckets = notDissolvingNeuronsCountBuckets; - this.TotalSupplyIcp = totalSupplyIcp; - this.NeuronsWithLessThan6MonthsDissolveDelayCount = neuronsWithLessThan6MonthsDissolveDelayCount; - this.DissolvedNeuronsCount = dissolvedNeuronsCount; - this.TotalStakedE8s = totalStakedE8s; - this.NotDissolvingNeuronsCount = notDissolvingNeuronsCount; - this.DissolvedNeuronsE8s = dissolvedNeuronsE8s; - this.NeuronsWithLessThan6MonthsDissolveDelayE8s = neuronsWithLessThan6MonthsDissolveDelayE8s; - this.DissolvingNeuronsCountBuckets = dissolvingNeuronsCountBuckets; - this.DissolvingNeuronsCount = dissolvingNeuronsCount; - this.DissolvingNeuronsE8sBuckets = dissolvingNeuronsE8sBuckets; - this.CommunityFundTotalStakedE8s = communityFundTotalStakedE8s; - this.TimestampSeconds = timestampSeconds; + this.not_dissolving_neurons_e8s_buckets = notDissolvingNeuronsE8sBuckets; + this.garbage_collectable_neurons_count = garbageCollectableNeuronsCount; + this.neurons_with_invalid_stake_count = neuronsWithInvalidStakeCount; + this.not_dissolving_neurons_count_buckets = notDissolvingNeuronsCountBuckets; + this.total_supply_icp = totalSupplyIcp; + this.neurons_with_less_than_6_months_dissolve_delay_count = neuronsWithLessThan6MonthsDissolveDelayCount; + this.dissolved_neurons_count = dissolvedNeuronsCount; + this.total_staked_e8s = totalStakedE8s; + this.not_dissolving_neurons_count = notDissolvingNeuronsCount; + this.dissolved_neurons_e8s = dissolvedNeuronsE8s; + this.neurons_with_less_than_6_months_dissolve_delay_e8s = neuronsWithLessThan6MonthsDissolveDelayE8s; + this.dissolving_neurons_count_buckets = dissolvingNeuronsCountBuckets; + this.dissolving_neurons_count = dissolvingNeuronsCount; + this.dissolving_neurons_e8s_buckets = dissolvingNeuronsE8sBuckets; + this.community_fund_total_staked_e8s = communityFundTotalStakedE8s; + this.timestamp_seconds = timestampSeconds; } public GovernanceCachedMetrics() @@ -1740,22 +1661,18 @@ namespace Test.Models Type File: 'GovernanceError' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class GovernanceError { - [CandidName("error_message")] - public string ErrorMessage { get; set; } + public string error_message { get; set; } - [CandidName("error_type")] - public int ErrorType { get; set; } + public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) { - this.ErrorMessage = errorMessage; - this.ErrorType = errorType; + this.error_message = errorMessage; + this.error_type = errorType; } public GovernanceError() @@ -1766,18 +1683,15 @@ namespace Test.Models Type File: 'IncreaseDissolveDelay' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class IncreaseDissolveDelay { - [CandidName("additional_dissolve_delay_seconds")] - public uint AdditionalDissolveDelaySeconds { get; set; } + public uint additional_dissolve_delay_seconds { get; set; } public IncreaseDissolveDelay(uint additionalDissolveDelaySeconds) { - this.AdditionalDissolveDelaySeconds = additionalDissolveDelaySeconds; + this.additional_dissolve_delay_seconds = additionalDissolveDelaySeconds; } public IncreaseDissolveDelay() @@ -1788,7 +1702,6 @@ namespace Test.Models Type File: 'KnownNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -1796,16 +1709,14 @@ namespace Test.Models { public class KnownNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) { - this.Id = id; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.known_neuron_data = knownNeuronData; } public KnownNeuron() @@ -1816,23 +1727,20 @@ namespace Test.Models Type File: 'KnownNeuronData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class KnownNeuronData { - [CandidName("name")] - public string Name { get; set; } + public string name { get; set; } - [CandidName("description")] - public OptionalValue Description { get; set; } + public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) { - this.Name = name; - this.Description = description; + this.name = name; + this.description = description; } public KnownNeuronData() @@ -1843,7 +1751,6 @@ namespace Test.Models Type File: 'ListKnownNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1851,12 +1758,11 @@ namespace Test.Models { public class ListKnownNeuronsResponse { - [CandidName("known_neurons")] - public List KnownNeurons { get; set; } + public List known_neurons { get; set; } public ListKnownNeuronsResponse(List knownNeurons) { - this.KnownNeurons = knownNeurons; + this.known_neurons = knownNeurons; } public ListKnownNeuronsResponse() @@ -1867,23 +1773,20 @@ namespace Test.Models Type File: 'ListNeurons' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test.Models { public class ListNeurons { - [CandidName("neuron_ids")] - public List NeuronIds { get; set; } + public List neuron_ids { get; set; } - [CandidName("include_neurons_readable_by_caller")] - public bool IncludeNeuronsReadableByCaller { get; set; } + public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) { - this.NeuronIds = neuronIds; - this.IncludeNeuronsReadableByCaller = includeNeuronsReadableByCaller; + this.neuron_ids = neuronIds; + this.include_neurons_readable_by_caller = includeNeuronsReadableByCaller; } public ListNeurons() @@ -1894,7 +1797,6 @@ namespace Test.Models Type File: 'ListNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1902,16 +1804,14 @@ namespace Test.Models { public class ListNeuronsResponse { - [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary neuron_infos { get; set; } - [CandidName("full_neurons")] - public List FullNeurons { get; set; } + public List full_neurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { - this.NeuronInfos = neuronInfos; - this.FullNeurons = fullNeurons; + this.neuron_infos = neuronInfos; + this.full_neurons = fullNeurons; } public ListNeuronsResponse() @@ -1922,7 +1822,6 @@ namespace Test.Models Type File: 'ListNodeProvidersResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1930,12 +1829,11 @@ namespace Test.Models { public class ListNodeProvidersResponse { - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } public ListNodeProvidersResponse(List nodeProviders) { - this.NodeProviders = nodeProviders; + this.node_providers = nodeProviders; } public ListNodeProvidersResponse() @@ -1946,7 +1844,6 @@ namespace Test.Models Type File: 'ListProposalInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -1955,28 +1852,23 @@ namespace Test.Models { public class ListProposalInfo { - [CandidName("include_reward_status")] - public List IncludeRewardStatus { get; set; } + public List include_reward_status { get; set; } - [CandidName("before_proposal")] - public OptionalValue BeforeProposal { get; set; } + public OptionalValue before_proposal { get; set; } - [CandidName("limit")] - public uint Limit { get; set; } + public uint limit { get; set; } - [CandidName("exclude_topic")] - public List ExcludeTopic { get; set; } + public List exclude_topic { get; set; } - [CandidName("include_status")] - public List IncludeStatus { get; set; } + public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) { - this.IncludeRewardStatus = includeRewardStatus; - this.BeforeProposal = beforeProposal; - this.Limit = limit; - this.ExcludeTopic = excludeTopic; - this.IncludeStatus = includeStatus; + this.include_reward_status = includeRewardStatus; + this.before_proposal = beforeProposal; + this.limit = limit; + this.exclude_topic = excludeTopic; + this.include_status = includeStatus; } public ListProposalInfo() @@ -1987,7 +1879,6 @@ namespace Test.Models Type File: 'ListProposalInfoResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -1995,12 +1886,11 @@ namespace Test.Models { public class ListProposalInfoResponse { - [CandidName("proposal_info")] - public List ProposalInfo { get; set; } + public List proposal_info { get; set; } public ListProposalInfoResponse(List proposalInfo) { - this.ProposalInfo = proposalInfo; + this.proposal_info = proposalInfo; } public ListProposalInfoResponse() @@ -2011,7 +1901,6 @@ namespace Test.Models Type File: 'MakeProposalResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2019,12 +1908,11 @@ namespace Test.Models { public class MakeProposalResponse { - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public MakeProposalResponse(OptionalValue proposalId) { - this.ProposalId = proposalId; + this.proposal_id = proposalId; } public MakeProposalResponse() @@ -2035,7 +1923,6 @@ namespace Test.Models Type File: 'ManageNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2043,20 +1930,17 @@ namespace Test.Models { public class ManageNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("neuron_id_or_subaccount")] - public OptionalValue NeuronIdOrSubaccount { get; set; } + public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) { - this.Id = id; - this.Command = command; - this.NeuronIdOrSubaccount = neuronIdOrSubaccount; + this.id = id; + this.command = command; + this.neuron_id_or_subaccount = neuronIdOrSubaccount; } public ManageNeuron() @@ -2067,7 +1951,6 @@ namespace Test.Models Type File: 'ManageNeuronResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2075,12 +1958,11 @@ namespace Test.Models { public class ManageNeuronResponse { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - public ManageNeuronResponse(OptionalValue command) + public ManageNeuronResponse(OptionalValue command) { - this.Command = command; + this.command = command; } public ManageNeuronResponse() @@ -2091,7 +1973,6 @@ namespace Test.Models Type File: 'Merge' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2099,12 +1980,11 @@ namespace Test.Models { public class Merge { - [CandidName("source_neuron_id")] - public OptionalValue SourceNeuronId { get; set; } + public OptionalValue source_neuron_id { get; set; } public Merge(OptionalValue sourceNeuronId) { - this.SourceNeuronId = sourceNeuronId; + this.source_neuron_id = sourceNeuronId; } public Merge() @@ -2115,18 +1995,15 @@ namespace Test.Models Type File: 'MergeMaturity' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class MergeMaturity { - [CandidName("percentage_to_merge")] - public uint PercentageToMerge { get; set; } + public uint percentage_to_merge { get; set; } public MergeMaturity(uint percentageToMerge) { - this.PercentageToMerge = percentageToMerge; + this.percentage_to_merge = percentageToMerge; } public MergeMaturity() @@ -2137,22 +2014,18 @@ namespace Test.Models Type File: 'MergeMaturityResponse' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class MergeMaturityResponse { - [CandidName("merged_maturity_e8s")] - public ulong MergedMaturityE8s { get; set; } + public ulong merged_maturity_e8s { get; set; } - [CandidName("new_stake_e8s")] - public ulong NewStakeE8s { get; set; } + public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) { - this.MergedMaturityE8s = mergedMaturityE8s; - this.NewStakeE8s = newStakeE8s; + this.merged_maturity_e8s = mergedMaturityE8s; + this.new_stake_e8s = newStakeE8s; } public MergeMaturityResponse() @@ -2163,18 +2036,15 @@ namespace Test.Models Type File: 'Motion' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Motion { - [CandidName("motion_text")] - public string MotionText { get; set; } + public string motion_text { get; set; } public Motion(string motionText) { - this.MotionText = motionText; + this.motion_text = motionText; } public Motion() @@ -2185,46 +2055,36 @@ namespace Test.Models Type File: 'NetworkEconomics' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class NetworkEconomics { - [CandidName("neuron_minimum_stake_e8s")] - public ulong NeuronMinimumStakeE8s { get; set; } + public ulong neuron_minimum_stake_e8s { get; set; } - [CandidName("max_proposals_to_keep_per_topic")] - public uint MaxProposalsToKeepPerTopic { get; set; } + public uint max_proposals_to_keep_per_topic { get; set; } - [CandidName("neuron_management_fee_per_proposal_e8s")] - public ulong NeuronManagementFeePerProposalE8s { get; set; } + public ulong neuron_management_fee_per_proposal_e8s { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("transaction_fee_e8s")] - public ulong TransactionFeeE8s { get; set; } + public ulong transaction_fee_e8s { get; set; } - [CandidName("neuron_spawn_dissolve_delay_seconds")] - public ulong NeuronSpawnDissolveDelaySeconds { get; set; } + public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - [CandidName("minimum_icp_xdr_rate")] - public ulong MinimumIcpXdrRate { get; set; } + public ulong minimum_icp_xdr_rate { get; set; } - [CandidName("maximum_node_provider_rewards_e8s")] - public ulong MaximumNodeProviderRewardsE8s { get; set; } + public ulong maximum_node_provider_rewards_e8s { get; set; } public NetworkEconomics(ulong neuronMinimumStakeE8s, uint maxProposalsToKeepPerTopic, ulong neuronManagementFeePerProposalE8s, ulong rejectCostE8s, ulong transactionFeeE8s, ulong neuronSpawnDissolveDelaySeconds, ulong minimumIcpXdrRate, ulong maximumNodeProviderRewardsE8s) { - this.NeuronMinimumStakeE8s = neuronMinimumStakeE8s; - this.MaxProposalsToKeepPerTopic = maxProposalsToKeepPerTopic; - this.NeuronManagementFeePerProposalE8s = neuronManagementFeePerProposalE8s; - this.RejectCostE8s = rejectCostE8s; - this.TransactionFeeE8s = transactionFeeE8s; - this.NeuronSpawnDissolveDelaySeconds = neuronSpawnDissolveDelaySeconds; - this.MinimumIcpXdrRate = minimumIcpXdrRate; - this.MaximumNodeProviderRewardsE8s = maximumNodeProviderRewardsE8s; + this.neuron_minimum_stake_e8s = neuronMinimumStakeE8s; + this.max_proposals_to_keep_per_topic = maxProposalsToKeepPerTopic; + this.neuron_management_fee_per_proposal_e8s = neuronManagementFeePerProposalE8s; + this.reject_cost_e8s = rejectCostE8s; + this.transaction_fee_e8s = transactionFeeE8s; + this.neuron_spawn_dissolve_delay_seconds = neuronSpawnDissolveDelaySeconds; + this.minimum_icp_xdr_rate = minimumIcpXdrRate; + this.maximum_node_provider_rewards_e8s = maximumNodeProviderRewardsE8s; } public NetworkEconomics() @@ -2235,7 +2095,6 @@ namespace Test.Models Type File: 'Neuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; using System.Collections.Generic; @@ -2244,76 +2103,59 @@ namespace Test.Models { public class Neuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("not_for_profit")] - public bool NotForProfit { get; set; } + public bool not_for_profit { get; set; } - [CandidName("maturity_e8s_equivalent")] - public ulong MaturityE8sEquivalent { get; set; } + public ulong maturity_e8s_equivalent { get; set; } - [CandidName("cached_neuron_stake_e8s")] - public ulong CachedNeuronStakeE8s { get; set; } + public ulong cached_neuron_stake_e8s { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("aging_since_timestamp_seconds")] - public ulong AgingSinceTimestampSeconds { get; set; } + public ulong aging_since_timestamp_seconds { get; set; } - [CandidName("hot_keys")] - public List HotKeys { get; set; } + public List hot_keys { get; set; } - [CandidName("account")] - public List Account { get; set; } + public List account { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("dissolve_state")] - public OptionalValue DissolveState { get; set; } + public OptionalValue dissolve_state { get; set; } - [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary followees { get; set; } - [CandidName("neuron_fees_e8s")] - public ulong NeuronFeesE8s { get; set; } + public ulong neuron_fees_e8s { get; set; } - [CandidName("transfer")] - public OptionalValue Transfer { get; set; } + public OptionalValue transfer { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { - this.Id = id; - this.Controller = controller; - this.RecentBallots = recentBallots; - this.KycVerified = kycVerified; - this.NotForProfit = notForProfit; - this.MaturityE8sEquivalent = maturityE8sEquivalent; - this.CachedNeuronStakeE8s = cachedNeuronStakeE8s; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.AgingSinceTimestampSeconds = agingSinceTimestampSeconds; - this.HotKeys = hotKeys; - this.Account = account; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.DissolveState = dissolveState; - this.Followees = followees; - this.NeuronFeesE8s = neuronFeesE8s; - this.Transfer = transfer; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.controller = controller; + this.recent_ballots = recentBallots; + this.kyc_verified = kycVerified; + this.not_for_profit = notForProfit; + this.maturity_e8s_equivalent = maturityE8sEquivalent; + this.cached_neuron_stake_e8s = cachedNeuronStakeE8s; + this.created_timestamp_seconds = createdTimestampSeconds; + this.aging_since_timestamp_seconds = agingSinceTimestampSeconds; + this.hot_keys = hotKeys; + this.account = account; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.dissolve_state = dissolveState; + this.followees = followees; + this.neuron_fees_e8s = neuronFeesE8s; + this.transfer = transfer; + this.known_neuron_data = knownNeuronData; } public Neuron() @@ -2324,18 +2166,15 @@ namespace Test.Models Type File: 'NeuronId' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class NeuronId { - [CandidName("id")] - public ulong Id { get; set; } + public ulong id { get; set; } public NeuronId(ulong id) { - this.Id = id; + this.id = id; } public NeuronId() @@ -2360,9 +2199,9 @@ namespace Test.Models public NeuronIdOrSubaccountTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) + public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) { this.Tag = tag; this.Value = value; @@ -2414,7 +2253,6 @@ namespace Test.Models Type File: 'NeuronInFlightCommand' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2422,16 +2260,14 @@ namespace Test.Models { public class NeuronInFlightCommand { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("timestamp")] - public ulong Timestamp { get; set; } + public ulong timestamp { get; set; } - public NeuronInFlightCommand(OptionalValue command, ulong timestamp) + public NeuronInFlightCommand(OptionalValue command, ulong timestamp) { - this.Command = command; - this.Timestamp = timestamp; + this.command = command; + this.timestamp = timestamp; } public NeuronInFlightCommand() @@ -2442,7 +2278,6 @@ namespace Test.Models Type File: 'NeuronInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; using EdjCase.ICP.Candid.Models; @@ -2451,48 +2286,38 @@ namespace Test.Models { public class NeuronInfo { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("state")] - public int State { get; set; } + public int state { get; set; } - [CandidName("stake_e8s")] - public ulong StakeE8s { get; set; } + public ulong stake_e8s { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("retrieved_at_timestamp_seconds")] - public ulong RetrievedAtTimestampSeconds { get; set; } + public ulong retrieved_at_timestamp_seconds { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } - [CandidName("age_seconds")] - public ulong AgeSeconds { get; set; } + public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, OptionalValue joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, OptionalValue knownNeuronData, ulong votingPower, ulong ageSeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.RecentBallots = recentBallots; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.State = state; - this.StakeE8s = stakeE8s; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.RetrievedAtTimestampSeconds = retrievedAtTimestampSeconds; - this.KnownNeuronData = knownNeuronData; - this.VotingPower = votingPower; - this.AgeSeconds = ageSeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.recent_ballots = recentBallots; + this.created_timestamp_seconds = createdTimestampSeconds; + this.state = state; + this.stake_e8s = stakeE8s; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.retrieved_at_timestamp_seconds = retrievedAtTimestampSeconds; + this.known_neuron_data = knownNeuronData; + this.voting_power = votingPower; + this.age_seconds = ageSeconds; } public NeuronInfo() @@ -2503,7 +2328,6 @@ namespace Test.Models Type File: 'NeuronStakeTransfer' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; @@ -2511,36 +2335,29 @@ namespace Test.Models { public class NeuronStakeTransfer { - [CandidName("to_subaccount")] - public List ToSubaccount { get; set; } + public List to_subaccount { get; set; } - [CandidName("neuron_stake_e8s")] - public ulong NeuronStakeE8s { get; set; } + public ulong neuron_stake_e8s { get; set; } - [CandidName("from")] - public OptionalValue From { get; set; } + public OptionalValue from { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } - [CandidName("from_subaccount")] - public List FromSubaccount { get; set; } + public List from_subaccount { get; set; } - [CandidName("transfer_timestamp")] - public ulong TransferTimestamp { get; set; } + public ulong transfer_timestamp { get; set; } - [CandidName("block_height")] - public ulong BlockHeight { get; set; } + public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) { - this.ToSubaccount = toSubaccount; - this.NeuronStakeE8s = neuronStakeE8s; - this.From = from; - this.Memo = memo; - this.FromSubaccount = fromSubaccount; - this.TransferTimestamp = transferTimestamp; - this.BlockHeight = blockHeight; + this.to_subaccount = toSubaccount; + this.neuron_stake_e8s = neuronStakeE8s; + this.from = from; + this.memo = memo; + this.from_subaccount = fromSubaccount; + this.transfer_timestamp = transferTimestamp; + this.block_height = blockHeight; } public NeuronStakeTransfer() @@ -2551,7 +2368,6 @@ namespace Test.Models Type File: 'NodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2559,16 +2375,14 @@ namespace Test.Models { public class NodeProvider { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) { - this.Id = id; - this.RewardAccount = rewardAccount; + this.id = id; + this.reward_account = rewardAccount; } public NodeProvider() @@ -2592,9 +2406,9 @@ namespace Test.Models public OperationTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Operation(OperationTag tag, object? value) + public Operation(OperationTag tag, object value) { this.Tag = tag; this.Value = value; @@ -2732,7 +2546,6 @@ namespace Test.Models Type File: 'Proposal' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2740,24 +2553,20 @@ namespace Test.Models { public class Proposal { - [CandidName("url")] - public string Url { get; set; } + public string url { get; set; } - [CandidName("title")] - public OptionalValue Title { get; set; } + public OptionalValue title { get; set; } - [CandidName("action")] - public OptionalValue Action { get; set; } + public OptionalValue action { get; set; } - [CandidName("summary")] - public string Summary { get; set; } + public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) { - this.Url = url; - this.Title = title; - this.Action = action; - this.Summary = summary; + this.url = url; + this.title = title; + this.action = action; + this.summary = summary; } public Proposal() @@ -2768,7 +2577,6 @@ namespace Test.Models Type File: 'ProposalData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; using System.Collections.Generic; @@ -2777,60 +2585,47 @@ namespace Test.Models { public class ProposalData { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("wait_for_quiet_state")] - public OptionalValue WaitForQuietState { get; set; } + public OptionalValue wait_for_quiet_state { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { - this.Id = id; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.WaitForQuietState = waitForQuietState; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.wait_for_quiet_state = waitForQuietState; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalData() @@ -2841,7 +2636,6 @@ namespace Test.Models Type File: 'ProposalInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; using System.Collections.Generic; @@ -2850,72 +2644,56 @@ namespace Test.Models { public class ProposalInfo { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("status")] - public int Status { get; set; } + public int status { get; set; } - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("deadline_timestamp_seconds")] - public OptionalValue DeadlineTimestampSeconds { get; set; } + public OptionalValue deadline_timestamp_seconds { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("reward_status")] - public int RewardStatus { get; set; } + public int reward_status { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { - this.Id = id; - this.Status = status; - this.Topic = topic; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.DeadlineTimestampSeconds = deadlineTimestampSeconds; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.RewardStatus = rewardStatus; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.status = status; + this.topic = topic; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.deadline_timestamp_seconds = deadlineTimestampSeconds; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.reward_status = rewardStatus; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalInfo() @@ -2926,7 +2704,6 @@ namespace Test.Models Type File: 'RegisterVote' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -2934,16 +2711,14 @@ namespace Test.Models { public class RegisterVote { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) { - this.Vote = vote; - this.Proposal = proposal; + this.vote = vote; + this.proposal = proposal; } public RegisterVote() @@ -2954,19 +2729,17 @@ namespace Test.Models Type File: 'RemoveHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class RemoveHotKey { - [CandidName("hot_key_to_remove")] - public OptionalValue HotKeyToRemove { get; set; } + public OptionalValue hot_key_to_remove { get; set; } public RemoveHotKey(OptionalValue hotKeyToRemove) { - this.HotKeyToRemove = hotKeyToRemove; + this.hot_key_to_remove = hotKeyToRemove; } public RemoveHotKey() @@ -2990,9 +2763,9 @@ namespace Test.Models public ResultTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result(ResultTag tag, object? value) + public Result(ResultTag tag, object value) { this.Tag = tag; this.Value = value; @@ -3035,7 +2808,7 @@ namespace Test.Models } } -Type File: 'Result1' +Type File: 'Result_1' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -3043,48 +2816,48 @@ using System; namespace Test.Models { - [Variant(typeof(Result1Tag))] - public class Result1 + [Variant(typeof(Result_1Tag))] + public class Result_1 { [VariantTagProperty()] - public Result1Tag Tag { get; set; } + public Result_1Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result1(Result1Tag tag, object? value) + public Result_1(Result_1Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result1() + protected Result_1() { } - public static Result1 Error(GovernanceError info) + public static Result_1 Error(GovernanceError info) { - return new Result1(Result1Tag.Error, info); + return new Result_1(Result_1Tag.Error, info); } - public static Result1 NeuronId(NeuronId info) + public static Result_1 NeuronId(NeuronId info) { - return new Result1(Result1Tag.NeuronId, info); + return new Result_1(Result_1Tag.NeuronId, info); } public GovernanceError AsError() { - this.ValidateTag(Result1Tag.Error); + this.ValidateTag(Result_1Tag.Error); return (GovernanceError)this.Value!; } public NeuronId AsNeuronId() { - this.ValidateTag(Result1Tag.NeuronId); + this.ValidateTag(Result_1Tag.NeuronId); return (NeuronId)this.Value!; } - private void ValidateTag(Result1Tag tag) + private void ValidateTag(Result_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3093,7 +2866,7 @@ namespace Test.Models } } - public enum Result1Tag + public enum Result_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -3102,7 +2875,7 @@ namespace Test.Models } } -Type File: 'Result2' +Type File: 'Result_2' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -3110,48 +2883,48 @@ using System; namespace Test.Models { - [Variant(typeof(Result2Tag))] - public class Result2 + [Variant(typeof(Result_2Tag))] + public class Result_2 { [VariantTagProperty()] - public Result2Tag Tag { get; set; } + public Result_2Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result2(Result2Tag tag, object? value) + public Result_2(Result_2Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result2() + protected Result_2() { } - public static Result2 Ok(Neuron info) + public static Result_2 Ok(Neuron info) { - return new Result2(Result2Tag.Ok, info); + return new Result_2(Result_2Tag.Ok, info); } - public static Result2 Err(GovernanceError info) + public static Result_2 Err(GovernanceError info) { - return new Result2(Result2Tag.Err, info); + return new Result_2(Result_2Tag.Err, info); } public Neuron AsOk() { - this.ValidateTag(Result2Tag.Ok); + this.ValidateTag(Result_2Tag.Ok); return (Neuron)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result2Tag.Err); + this.ValidateTag(Result_2Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result2Tag tag) + private void ValidateTag(Result_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3160,7 +2933,7 @@ namespace Test.Models } } - public enum Result2Tag + public enum Result_2Tag { [VariantOptionType(typeof(Neuron))] Ok, @@ -3169,7 +2942,7 @@ namespace Test.Models } } -Type File: 'Result3' +Type File: 'Result_3' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -3177,48 +2950,48 @@ using System; namespace Test.Models { - [Variant(typeof(Result3Tag))] - public class Result3 + [Variant(typeof(Result_3Tag))] + public class Result_3 { [VariantTagProperty()] - public Result3Tag Tag { get; set; } + public Result_3Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result3(Result3Tag tag, object? value) + public Result_3(Result_3Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result3() + protected Result_3() { } - public static Result3 Ok(RewardNodeProviders info) + public static Result_3 Ok(RewardNodeProviders info) { - return new Result3(Result3Tag.Ok, info); + return new Result_3(Result_3Tag.Ok, info); } - public static Result3 Err(GovernanceError info) + public static Result_3 Err(GovernanceError info) { - return new Result3(Result3Tag.Err, info); + return new Result_3(Result_3Tag.Err, info); } public RewardNodeProviders AsOk() { - this.ValidateTag(Result3Tag.Ok); + this.ValidateTag(Result_3Tag.Ok); return (RewardNodeProviders)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result3Tag.Err); + this.ValidateTag(Result_3Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result3Tag tag) + private void ValidateTag(Result_3Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3227,7 +3000,7 @@ namespace Test.Models } } - public enum Result3Tag + public enum Result_3Tag { [VariantOptionType(typeof(RewardNodeProviders))] Ok, @@ -3236,7 +3009,7 @@ namespace Test.Models } } -Type File: 'Result4' +Type File: 'Result_4' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -3244,48 +3017,48 @@ using System; namespace Test.Models { - [Variant(typeof(Result4Tag))] - public class Result4 + [Variant(typeof(Result_4Tag))] + public class Result_4 { [VariantTagProperty()] - public Result4Tag Tag { get; set; } + public Result_4Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result4(Result4Tag tag, object? value) + public Result_4(Result_4Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result4() + protected Result_4() { } - public static Result4 Ok(NeuronInfo info) + public static Result_4 Ok(NeuronInfo info) { - return new Result4(Result4Tag.Ok, info); + return new Result_4(Result_4Tag.Ok, info); } - public static Result4 Err(GovernanceError info) + public static Result_4 Err(GovernanceError info) { - return new Result4(Result4Tag.Err, info); + return new Result_4(Result_4Tag.Err, info); } public NeuronInfo AsOk() { - this.ValidateTag(Result4Tag.Ok); + this.ValidateTag(Result_4Tag.Ok); return (NeuronInfo)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result4Tag.Err); + this.ValidateTag(Result_4Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result4Tag tag) + private void ValidateTag(Result_4Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3294,7 +3067,7 @@ namespace Test.Models } } - public enum Result4Tag + public enum Result_4Tag { [VariantOptionType(typeof(NeuronInfo))] Ok, @@ -3303,7 +3076,7 @@ namespace Test.Models } } -Type File: 'Result5' +Type File: 'Result_5' using EdjCase.ICP.Candid.Mapping; using Test.Models; @@ -3311,48 +3084,48 @@ using System; namespace Test.Models { - [Variant(typeof(Result5Tag))] - public class Result5 + [Variant(typeof(Result_5Tag))] + public class Result_5 { [VariantTagProperty()] - public Result5Tag Tag { get; set; } + public Result_5Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result5(Result5Tag tag, object? value) + public Result_5(Result_5Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result5() + protected Result_5() { } - public static Result5 Ok(NodeProvider info) + public static Result_5 Ok(NodeProvider info) { - return new Result5(Result5Tag.Ok, info); + return new Result_5(Result_5Tag.Ok, info); } - public static Result5 Err(GovernanceError info) + public static Result_5 Err(GovernanceError info) { - return new Result5(Result5Tag.Err, info); + return new Result_5(Result_5Tag.Err, info); } public NodeProvider AsOk() { - this.ValidateTag(Result5Tag.Ok); + this.ValidateTag(Result_5Tag.Ok); return (NodeProvider)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result5Tag.Err); + this.ValidateTag(Result_5Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result5Tag tag) + private void ValidateTag(Result_5Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3361,7 +3134,7 @@ namespace Test.Models } } - public enum Result5Tag + public enum Result_5Tag { [VariantOptionType(typeof(NodeProvider))] Ok, @@ -3372,7 +3145,6 @@ namespace Test.Models Type File: 'RewardEvent' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -3380,24 +3152,20 @@ namespace Test.Models { public class RewardEvent { - [CandidName("day_after_genesis")] - public ulong DayAfterGenesis { get; set; } + public ulong day_after_genesis { get; set; } - [CandidName("actual_timestamp_seconds")] - public ulong ActualTimestampSeconds { get; set; } + public ulong actual_timestamp_seconds { get; set; } - [CandidName("distributed_e8s_equivalent")] - public ulong DistributedE8sEquivalent { get; set; } + public ulong distributed_e8s_equivalent { get; set; } - [CandidName("settled_proposals")] - public List SettledProposals { get; set; } + public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) { - this.DayAfterGenesis = dayAfterGenesis; - this.ActualTimestampSeconds = actualTimestampSeconds; - this.DistributedE8sEquivalent = distributedE8sEquivalent; - this.SettledProposals = settledProposals; + this.day_after_genesis = dayAfterGenesis; + this.actual_timestamp_seconds = actualTimestampSeconds; + this.distributed_e8s_equivalent = distributedE8sEquivalent; + this.settled_proposals = settledProposals; } public RewardEvent() @@ -3421,9 +3189,9 @@ namespace Test.Models public RewardModeTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public RewardMode(RewardModeTag tag, object? value) + public RewardMode(RewardModeTag tag, object value) { this.Tag = tag; this.Value = value; @@ -3475,7 +3243,6 @@ namespace Test.Models Type File: 'RewardNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -3483,20 +3250,17 @@ namespace Test.Models { public class RewardNodeProvider { - [CandidName("node_provider")] - public OptionalValue NodeProvider { get; set; } + public OptionalValue node_provider { get; set; } - [CandidName("reward_mode")] - public OptionalValue RewardMode { get; set; } + public OptionalValue reward_mode { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) { - this.NodeProvider = nodeProvider; - this.RewardMode = rewardMode; - this.AmountE8s = amountE8s; + this.node_provider = nodeProvider; + this.reward_mode = rewardMode; + this.amount_e8s = amountE8s; } public RewardNodeProvider() @@ -3507,7 +3271,6 @@ namespace Test.Models Type File: 'RewardNodeProviders' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; using Test.Models; @@ -3516,16 +3279,14 @@ namespace Test.Models { public class RewardNodeProviders { - [CandidName("use_registry_derived_rewards")] - public OptionalValue UseRegistryDerivedRewards { get; set; } + public OptionalValue use_registry_derived_rewards { get; set; } - [CandidName("rewards")] - public List Rewards { get; set; } + public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) { - this.UseRegistryDerivedRewards = useRegistryDerivedRewards; - this.Rewards = rewards; + this.use_registry_derived_rewards = useRegistryDerivedRewards; + this.rewards = rewards; } public RewardNodeProviders() @@ -3536,7 +3297,6 @@ namespace Test.Models Type File: 'RewardToAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -3544,12 +3304,11 @@ namespace Test.Models { public class RewardToAccount { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } public RewardToAccount(OptionalValue toAccount) { - this.ToAccount = toAccount; + this.to_account = toAccount; } public RewardToAccount() @@ -3560,18 +3319,15 @@ namespace Test.Models Type File: 'RewardToNeuron' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class RewardToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } public RewardToNeuron(ulong dissolveDelaySeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; } public RewardToNeuron() @@ -3582,7 +3338,6 @@ namespace Test.Models Type File: 'SetDefaultFollowees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test.Models; @@ -3590,12 +3345,11 @@ namespace Test.Models { public class SetDefaultFollowees { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { - this.DefaultFollowees = defaultFollowees; + this.default_followees = defaultFollowees; } public SetDefaultFollowees() @@ -3606,18 +3360,15 @@ namespace Test.Models Type File: 'SetDissolveTimestamp' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class SetDissolveTimestamp { - [CandidName("dissolve_timestamp_seconds")] - public ulong DissolveTimestampSeconds { get; set; } + public ulong dissolve_timestamp_seconds { get; set; } public SetDissolveTimestamp(ulong dissolveTimestampSeconds) { - this.DissolveTimestampSeconds = dissolveTimestampSeconds; + this.dissolve_timestamp_seconds = dissolveTimestampSeconds; } public SetDissolveTimestamp() @@ -3628,27 +3379,23 @@ namespace Test.Models Type File: 'Spawn' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test.Models { public class Spawn { - [CandidName("percentage_to_spawn")] - public OptionalValue PercentageToSpawn { get; set; } + public OptionalValue percentage_to_spawn { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public OptionalValue Nonce { get; set; } + public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) { - this.PercentageToSpawn = percentageToSpawn; - this.NewController = newController; - this.Nonce = nonce; + this.percentage_to_spawn = percentageToSpawn; + this.new_controller = newController; + this.nonce = nonce; } public Spawn() @@ -3659,7 +3406,6 @@ namespace Test.Models Type File: 'SpawnResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -3667,12 +3413,11 @@ namespace Test.Models { public class SpawnResponse { - [CandidName("created_neuron_id")] - public OptionalValue CreatedNeuronId { get; set; } + public OptionalValue created_neuron_id { get; set; } public SpawnResponse(OptionalValue createdNeuronId) { - this.CreatedNeuronId = createdNeuronId; + this.created_neuron_id = createdNeuronId; } public SpawnResponse() @@ -3683,18 +3428,15 @@ namespace Test.Models Type File: 'Split' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Split { - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public Split(ulong amountE8s) { - this.AmountE8s = amountE8s; + this.amount_e8s = amountE8s; } public Split() @@ -3705,30 +3447,24 @@ namespace Test.Models Type File: 'Tally' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class Tally { - [CandidName("no")] - public ulong No { get; set; } + public ulong no { get; set; } - [CandidName("yes")] - public ulong Yes { get; set; } + public ulong yes { get; set; } - [CandidName("total")] - public ulong Total { get; set; } + public ulong total { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) { - this.No = no; - this.Yes = yes; - this.Total = total; - this.TimestampSeconds = timestampSeconds; + this.no = no; + this.yes = yes; + this.total = total; + this.timestamp_seconds = timestampSeconds; } public Tally() @@ -3739,7 +3475,6 @@ namespace Test.Models Type File: 'UpdateNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test.Models; @@ -3747,12 +3482,11 @@ namespace Test.Models { public class UpdateNodeProvider { - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public UpdateNodeProvider(OptionalValue rewardAccount) { - this.RewardAccount = rewardAccount; + this.reward_account = rewardAccount; } public UpdateNodeProvider() @@ -3763,18 +3497,15 @@ namespace Test.Models Type File: 'WaitForQuietState' -using EdjCase.ICP.Candid.Mapping; - namespace Test.Models { public class WaitForQuietState { - [CandidName("current_deadline_timestamp_seconds")] - public ulong CurrentDeadlineTimestampSeconds { get; set; } + public ulong current_deadline_timestamp_seconds { get; set; } public WaitForQuietState(ulong currentDeadlineTimestampSeconds) { - this.CurrentDeadlineTimestampSeconds = currentDeadlineTimestampSeconds; + this.current_deadline_timestamp_seconds = currentDeadlineTimestampSeconds; } public WaitForQuietState() diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False.snap index 83d720e9..25c8b48e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False.snap @@ -14,27 +14,27 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task ClaimGtcNeurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(ClaimOrRefreshNeuronFromAccount arg0) + public async Task ClaimOrRefreshNeuronFromAccount(Models.ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task GetBuildMetadata() @@ -45,35 +45,35 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task GetFullNeuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task GetFullNeuronByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task GetMonthlyNodeProviderRewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task GetNetworkEconomicsParameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task> GetNeuronIds() @@ -84,97 +84,97 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task GetNeuronInfo(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task GetNeuronInfoByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task GetNodeProviderByCaller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> GetPendingProposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> GetProposalInfo(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task ListKnownNeurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNeurons(ListNeurons arg0) + public async Task ListNeurons(Models.ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task ListNodeProviders() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListProposals(ListProposalInfo arg0) + public async Task ListProposals(Models.ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(ManageNeuron arg0) + public async Task ManageNeuron(Models.ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(NeuronId arg0, NeuronId arg1) + public async Task TransferGtcNeuron(Models.NeuronId arg0, Models.NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(UpdateNodeProvider arg0) + public async Task UpdateNodeProvider(Models.UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -184,7 +184,7 @@ Type File: 'AccountIdentifier' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class AccountIdentifier { @@ -205,10 +205,10 @@ namespace Test Type File: 'Action' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ActionTag))] public class Action @@ -217,9 +217,9 @@ namespace Test public ActionTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Action(ActionTag tag, object value) + public Action(ActionTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -378,7 +378,7 @@ Type File: 'AddHotKey' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class AddHotKey { @@ -400,9 +400,9 @@ Type File: 'AddOrRemoveNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class AddOrRemoveNodeProvider { @@ -424,7 +424,7 @@ Type File: 'Amount' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Amount { @@ -448,7 +448,7 @@ using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class ApproveGenesisKyc { @@ -470,7 +470,7 @@ Type File: 'Ballot' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Ballot { @@ -496,9 +496,9 @@ Type File: 'BallotInfo' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class BallotInfo { @@ -523,10 +523,10 @@ namespace Test Type File: 'By' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ByTag))] public class By @@ -535,9 +535,9 @@ namespace Test public ByTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public By(ByTag tag, object value) + public By(ByTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -610,10 +610,10 @@ namespace Test Type File: 'Change' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ChangeTag))] public class Change @@ -622,9 +622,9 @@ namespace Test public ChangeTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Change(ChangeTag tag, object value) + public Change(ChangeTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -678,9 +678,9 @@ Type File: 'ClaimOrRefresh' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefresh { @@ -703,7 +703,7 @@ Type File: 'ClaimOrRefreshNeuronFromAccount' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshNeuronFromAccount { @@ -729,9 +729,9 @@ Type File: 'ClaimOrRefreshNeuronFromAccountResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshNeuronFromAccountResponse { @@ -753,9 +753,9 @@ Type File: 'ClaimOrRefreshResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshResponse { @@ -776,10 +776,10 @@ namespace Test Type File: 'Command' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(CommandTag))] public class Command @@ -788,9 +788,9 @@ namespace Test public CommandTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command(CommandTag tag, object value) + public Command(CommandTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -960,10 +960,10 @@ namespace Test Type File: 'Command1' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Command1Tag))] public class Command1 @@ -972,9 +972,9 @@ namespace Test public Command1Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command1(Command1Tag tag, object value) + public Command1(Command1Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1185,10 +1185,10 @@ namespace Test Type File: 'Command2' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Command2Tag))] public class Command2 @@ -1197,9 +1197,9 @@ namespace Test public Command2Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command2(Command2Tag tag, object value) + public Command2(Command2Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1331,9 +1331,9 @@ Type File: 'Configure' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Configure { @@ -1355,9 +1355,9 @@ Type File: 'Disburse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Disburse { @@ -1383,7 +1383,7 @@ Type File: 'DisburseResponse' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class DisburseResponse { @@ -1406,7 +1406,7 @@ Type File: 'DisburseToNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class DisburseToNeuron { @@ -1443,10 +1443,10 @@ namespace Test Type File: 'DissolveState' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(DissolveStateTag))] public class DissolveState @@ -1455,9 +1455,9 @@ namespace Test public DissolveStateTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public DissolveState(DissolveStateTag tag, object value) + public DissolveState(DissolveStateTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1512,7 +1512,7 @@ Type File: 'ExecuteNnsFunction' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ExecuteNnsFunction { @@ -1538,9 +1538,9 @@ Type File: 'Follow' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Follow { @@ -1566,9 +1566,9 @@ Type File: 'Followees' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Followees { @@ -1590,15 +1590,15 @@ Type File: 'Governance' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class Governance { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } [CandidName("wait_for_quiet_threshold_seconds")] public ulong WaitForQuietThresholdSeconds { get; set; } @@ -1622,18 +1622,18 @@ namespace Test public ulong ShortVotingPeriodSeconds { get; set; } [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary Proposals { get; set; } [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary InFlightCommands { get; set; } [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary Neurons { get; set; } [CandidName("genesis_timestamp_seconds")] public ulong GenesisTimestampSeconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { this.DefaultFollowees = defaultFollowees; this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; @@ -1660,12 +1660,12 @@ Type File: 'GovernanceCachedMetrics' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class GovernanceCachedMetrics { [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary NotDissolvingNeuronsE8sBuckets { get; set; } [CandidName("garbage_collectable_neurons_count")] public ulong GarbageCollectableNeuronsCount { get; set; } @@ -1674,7 +1674,7 @@ namespace Test public ulong NeuronsWithInvalidStakeCount { get; set; } [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary NotDissolvingNeuronsCountBuckets { get; set; } [CandidName("total_supply_icp")] public ulong TotalSupplyIcp { get; set; } @@ -1698,13 +1698,13 @@ namespace Test public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary DissolvingNeuronsCountBuckets { get; set; } [CandidName("dissolving_neurons_count")] public ulong DissolvingNeuronsCount { get; set; } [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary DissolvingNeuronsE8sBuckets { get; set; } [CandidName("community_fund_total_staked_e8s")] public ulong CommunityFundTotalStakedE8s { get; set; } @@ -1712,7 +1712,7 @@ namespace Test [CandidName("timestamp_seconds")] public ulong TimestampSeconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; @@ -1742,7 +1742,7 @@ Type File: 'GovernanceError' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class GovernanceError { @@ -1768,7 +1768,7 @@ Type File: 'IncreaseDissolveDelay' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class IncreaseDissolveDelay { @@ -1790,9 +1790,9 @@ Type File: 'KnownNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class KnownNeuron { @@ -1819,7 +1819,7 @@ Type File: 'KnownNeuronData' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class KnownNeuronData { @@ -1845,9 +1845,9 @@ Type File: 'ListKnownNeuronsResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListKnownNeuronsResponse { @@ -1870,7 +1870,7 @@ Type File: 'ListNeurons' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ListNeurons { @@ -1896,19 +1896,19 @@ Type File: 'ListNeuronsResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListNeuronsResponse { [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary NeuronInfos { get; set; } [CandidName("full_neurons")] public List FullNeurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { this.NeuronInfos = neuronInfos; this.FullNeurons = fullNeurons; @@ -1924,9 +1924,9 @@ Type File: 'ListNodeProvidersResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListNodeProvidersResponse { @@ -1949,9 +1949,9 @@ Type File: 'ListProposalInfo' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListProposalInfo { @@ -1989,9 +1989,9 @@ Type File: 'ListProposalInfoResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListProposalInfoResponse { @@ -2013,9 +2013,9 @@ Type File: 'MakeProposalResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class MakeProposalResponse { @@ -2037,9 +2037,9 @@ Type File: 'ManageNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ManageNeuron { @@ -2069,9 +2069,9 @@ Type File: 'ManageNeuronResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ManageNeuronResponse { @@ -2093,9 +2093,9 @@ Type File: 'Merge' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Merge { @@ -2117,7 +2117,7 @@ Type File: 'MergeMaturity' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class MergeMaturity { @@ -2139,7 +2139,7 @@ Type File: 'MergeMaturityResponse' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class MergeMaturityResponse { @@ -2165,7 +2165,7 @@ Type File: 'Motion' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Motion { @@ -2187,7 +2187,7 @@ Type File: 'NetworkEconomics' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class NetworkEconomics { @@ -2237,10 +2237,10 @@ Type File: 'Neuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class Neuron { @@ -2284,7 +2284,7 @@ namespace Test public OptionalValue DissolveState { get; set; } [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary Followees { get; set; } [CandidName("neuron_fees_e8s")] public ulong NeuronFeesE8s { get; set; } @@ -2295,7 +2295,7 @@ namespace Test [CandidName("known_neuron_data")] public OptionalValue KnownNeuronData { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { this.Id = id; this.Controller = controller; @@ -2326,7 +2326,7 @@ Type File: 'NeuronId' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class NeuronId { @@ -2347,11 +2347,11 @@ namespace Test Type File: 'NeuronIdOrSubaccount' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System.Collections.Generic; using System; -namespace Test +namespace Test.Models { [Variant(typeof(NeuronIdOrSubaccountTag))] public class NeuronIdOrSubaccount @@ -2360,9 +2360,9 @@ namespace Test public NeuronIdOrSubaccountTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) + public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -2416,9 +2416,9 @@ Type File: 'NeuronInFlightCommand' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class NeuronInFlightCommand { @@ -2444,10 +2444,10 @@ Type File: 'NeuronInfo' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class NeuronInfo { @@ -2507,7 +2507,7 @@ using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class NeuronStakeTransfer { @@ -2553,9 +2553,9 @@ Type File: 'NodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class NodeProvider { @@ -2580,10 +2580,10 @@ namespace Test Type File: 'Operation' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(OperationTag))] public class Operation @@ -2592,9 +2592,9 @@ namespace Test public OperationTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Operation(OperationTag tag, object value) + public Operation(OperationTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -2734,9 +2734,9 @@ Type File: 'Proposal' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Proposal { @@ -2770,10 +2770,10 @@ Type File: 'ProposalData' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ProposalData { @@ -2784,7 +2784,7 @@ namespace Test public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2816,7 +2816,7 @@ namespace Test [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { this.Id = id; this.FailureReason = failureReason; @@ -2843,10 +2843,10 @@ Type File: 'ProposalInfo' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ProposalInfo { @@ -2863,7 +2863,7 @@ namespace Test public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2898,7 +2898,7 @@ namespace Test [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { this.Id = id; this.Status = status; @@ -2928,9 +2928,9 @@ Type File: 'RegisterVote' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RegisterVote { @@ -2957,7 +2957,7 @@ Type File: 'RemoveHotKey' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class RemoveHotKey { @@ -2978,10 +2978,10 @@ namespace Test Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ResultTag))] public class Result @@ -2990,9 +2990,9 @@ namespace Test public ResultTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result(ResultTag tag, object value) + public Result(ResultTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3038,10 +3038,10 @@ namespace Test Type File: 'Result1' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Result1Tag))] public class Result1 @@ -3050,9 +3050,9 @@ namespace Test public Result1Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result1(Result1Tag tag, object value) + public Result1(Result1Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3105,10 +3105,10 @@ namespace Test Type File: 'Result2' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Result2Tag))] public class Result2 @@ -3117,9 +3117,9 @@ namespace Test public Result2Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result2(Result2Tag tag, object value) + public Result2(Result2Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3172,10 +3172,10 @@ namespace Test Type File: 'Result3' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Result3Tag))] public class Result3 @@ -3184,9 +3184,9 @@ namespace Test public Result3Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result3(Result3Tag tag, object value) + public Result3(Result3Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3239,10 +3239,10 @@ namespace Test Type File: 'Result4' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Result4Tag))] public class Result4 @@ -3251,9 +3251,9 @@ namespace Test public Result4Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result4(Result4Tag tag, object value) + public Result4(Result4Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3306,10 +3306,10 @@ namespace Test Type File: 'Result5' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(Result5Tag))] public class Result5 @@ -3318,9 +3318,9 @@ namespace Test public Result5Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result5(Result5Tag tag, object value) + public Result5(Result5Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3374,9 +3374,9 @@ Type File: 'RewardEvent' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardEvent { @@ -3409,10 +3409,10 @@ namespace Test Type File: 'RewardMode' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(RewardModeTag))] public class RewardMode @@ -3421,9 +3421,9 @@ namespace Test public RewardModeTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public RewardMode(RewardModeTag tag, object value) + public RewardMode(RewardModeTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3477,9 +3477,9 @@ Type File: 'RewardNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardNodeProvider { @@ -3510,9 +3510,9 @@ Type File: 'RewardNodeProviders' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardNodeProviders { @@ -3538,9 +3538,9 @@ Type File: 'RewardToAccount' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardToAccount { @@ -3562,7 +3562,7 @@ Type File: 'RewardToNeuron' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class RewardToNeuron { @@ -3584,16 +3584,16 @@ Type File: 'SetDefaultFollowees' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class SetDefaultFollowees { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { this.DefaultFollowees = defaultFollowees; } @@ -3608,7 +3608,7 @@ Type File: 'SetDissolveTimestamp' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class SetDissolveTimestamp { @@ -3631,7 +3631,7 @@ Type File: 'Spawn' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class Spawn { @@ -3661,9 +3661,9 @@ Type File: 'SpawnResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class SpawnResponse { @@ -3685,7 +3685,7 @@ Type File: 'Split' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Split { @@ -3707,7 +3707,7 @@ Type File: 'Tally' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class Tally { @@ -3741,9 +3741,9 @@ Type File: 'UpdateNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class UpdateNodeProvider { @@ -3765,7 +3765,7 @@ Type File: 'WaitForQuietState' using EdjCase.ICP.Candid.Mapping; -namespace Test +namespace Test.Models { public class WaitForQuietState { diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True.snap index f30bf14a..21dd66b2 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True.snap @@ -23,21 +23,21 @@ namespace Test this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task claim_gtc_neurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(ClaimOrRefreshNeuronFromAccount arg0) + public async Task claim_or_refresh_neuron_from_account(Models.ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetBuildMetadata() + public async Task _get_build_metadata() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_build_metadata", arg); @@ -45,38 +45,38 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task _get_full_neuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task _get_full_neuron_by_id_or_subaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task _get_monthly_node_provider_rewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task _get_network_economics_parameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetNeuronIds() + public async Task> _get_neuron_ids() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_ids", arg); @@ -84,116 +84,114 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task _get_neuron_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task _get_neuron_info_by_id_or_subaccount(Models.NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task _get_node_provider_by_caller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> _get_pending_proposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> _get_proposal_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task list_known_neurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNeurons(ListNeurons arg0) + public async Task list_neurons(Models.ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task list_node_providers() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListProposals(ListProposalInfo arg0) + public async Task list_proposals(Models.ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(ManageNeuron arg0) + public async Task manage_neuron(Models.ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(NeuronId arg0, NeuronId arg1) + public async Task transfer_gtc_neuron(Models.NeuronId arg0, Models.NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(UpdateNodeProvider arg0) + public async Task update_node_provider(Models.UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } Type File: 'AccountIdentifier' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class AccountIdentifier { - [CandidName("hash")] - public List Hash { get; set; } + public List hash { get; set; } public AccountIdentifier(List hash) { - this.Hash = hash; + this.hash = hash; } public AccountIdentifier() @@ -205,10 +203,10 @@ namespace Test Type File: 'Action' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ActionTag))] public class Action @@ -375,19 +373,17 @@ namespace Test Type File: 'AddHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class AddHotKey { - [CandidName("new_hot_key")] - public OptionalValue NewHotKey { get; set; } + public OptionalValue new_hot_key { get; set; } public AddHotKey(OptionalValue newHotKey) { - this.NewHotKey = newHotKey; + this.new_hot_key = newHotKey; } public AddHotKey() @@ -398,20 +394,18 @@ namespace Test Type File: 'AddOrRemoveNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class AddOrRemoveNodeProvider { - [CandidName("change")] - public OptionalValue Change { get; set; } + public OptionalValue change { get; set; } public AddOrRemoveNodeProvider(OptionalValue change) { - this.Change = change; + this.change = change; } public AddOrRemoveNodeProvider() @@ -422,18 +416,15 @@ namespace Test Type File: 'Amount' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Amount { - [CandidName("e8s")] - public ulong E8s { get; set; } + public ulong e8s { get; set; } public Amount(ulong e8s) { - this.E8s = e8s; + this.e8s = e8s; } public Amount() @@ -444,20 +435,18 @@ namespace Test Type File: 'ApproveGenesisKyc' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class ApproveGenesisKyc { - [CandidName("principals")] - public List Principals { get; set; } + public List principals { get; set; } public ApproveGenesisKyc(List principals) { - this.Principals = principals; + this.principals = principals; } public ApproveGenesisKyc() @@ -468,22 +457,18 @@ namespace Test Type File: 'Ballot' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Ballot { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) { - this.Vote = vote; - this.VotingPower = votingPower; + this.vote = vote; + this.voting_power = votingPower; } public Ballot() @@ -494,24 +479,21 @@ namespace Test Type File: 'BallotInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class BallotInfo { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) { - this.Vote = vote; - this.ProposalId = proposalId; + this.vote = vote; + this.proposal_id = proposalId; } public BallotInfo() @@ -523,10 +505,10 @@ namespace Test Type File: 'By' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ByTag))] public class By @@ -610,10 +592,10 @@ namespace Test Type File: 'Change' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ChangeTag))] public class Change @@ -676,20 +658,18 @@ namespace Test Type File: 'ClaimOrRefresh' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefresh { - [CandidName("by")] - public OptionalValue By { get; set; } + public OptionalValue by { get; set; } public ClaimOrRefresh(OptionalValue by) { - this.By = by; + this.by = by; } public ClaimOrRefresh() @@ -700,23 +680,20 @@ namespace Test Type File: 'ClaimOrRefreshNeuronFromAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshNeuronFromAccount { - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) { - this.Controller = controller; - this.Memo = memo; + this.controller = controller; + this.memo = memo; } public ClaimOrRefreshNeuronFromAccount() @@ -727,20 +704,18 @@ namespace Test Type File: 'ClaimOrRefreshNeuronFromAccountResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshNeuronFromAccountResponse { - [CandidName("result")] - public OptionalValue Result { get; set; } + public OptionalValue result { get; set; } - public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) + public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) { - this.Result = result; + this.result = result; } public ClaimOrRefreshNeuronFromAccountResponse() @@ -751,20 +726,18 @@ namespace Test Type File: 'ClaimOrRefreshResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ClaimOrRefreshResponse { - [CandidName("refreshed_neuron_id")] - public OptionalValue RefreshedNeuronId { get; set; } + public OptionalValue refreshed_neuron_id { get; set; } public ClaimOrRefreshResponse(OptionalValue refreshedNeuronId) { - this.RefreshedNeuronId = refreshedNeuronId; + this.refreshed_neuron_id = refreshedNeuronId; } public ClaimOrRefreshResponse() @@ -776,10 +749,10 @@ namespace Test Type File: 'Command' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(CommandTag))] public class Command @@ -957,166 +930,166 @@ namespace Test } } -Type File: 'Command1' +Type File: 'Command_1' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Command1Tag))] - public class Command1 + [Variant(typeof(Command_1Tag))] + public class Command_1 { [VariantTagProperty()] - public Command1Tag Tag { get; set; } + public Command_1Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Command1(Command1Tag tag, object? value) + public Command_1(Command_1Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Command1() + protected Command_1() { } - public static Command1 Error(GovernanceError info) + public static Command_1 Error(GovernanceError info) { - return new Command1(Command1Tag.Error, info); + return new Command_1(Command_1Tag.Error, info); } - public static Command1 Spawn(SpawnResponse info) + public static Command_1 Spawn(SpawnResponse info) { - return new Command1(Command1Tag.Spawn, info); + return new Command_1(Command_1Tag.Spawn, info); } - public static Command1 Split(SpawnResponse info) + public static Command_1 Split(SpawnResponse info) { - return new Command1(Command1Tag.Split, info); + return new Command_1(Command_1Tag.Split, info); } - public static Command1 Follow(Command1.FollowInfo info) + public static Command_1 Follow(Command_1.FollowInfo info) { - return new Command1(Command1Tag.Follow, info); + return new Command_1(Command_1Tag.Follow, info); } - public static Command1 ClaimOrRefresh(ClaimOrRefreshResponse info) + public static Command_1 ClaimOrRefresh(ClaimOrRefreshResponse info) { - return new Command1(Command1Tag.ClaimOrRefresh, info); + return new Command_1(Command_1Tag.ClaimOrRefresh, info); } - public static Command1 Configure(Command1.ConfigureInfo info) + public static Command_1 Configure(Command_1.ConfigureInfo info) { - return new Command1(Command1Tag.Configure, info); + return new Command_1(Command_1Tag.Configure, info); } - public static Command1 RegisterVote(Command1.RegisterVoteInfo info) + public static Command_1 RegisterVote(Command_1.RegisterVoteInfo info) { - return new Command1(Command1Tag.RegisterVote, info); + return new Command_1(Command_1Tag.RegisterVote, info); } - public static Command1 Merge(Command1.MergeInfo info) + public static Command_1 Merge(Command_1.MergeInfo info) { - return new Command1(Command1Tag.Merge, info); + return new Command_1(Command_1Tag.Merge, info); } - public static Command1 DisburseToNeuron(SpawnResponse info) + public static Command_1 DisburseToNeuron(SpawnResponse info) { - return new Command1(Command1Tag.DisburseToNeuron, info); + return new Command_1(Command_1Tag.DisburseToNeuron, info); } - public static Command1 MakeProposal(MakeProposalResponse info) + public static Command_1 MakeProposal(MakeProposalResponse info) { - return new Command1(Command1Tag.MakeProposal, info); + return new Command_1(Command_1Tag.MakeProposal, info); } - public static Command1 MergeMaturity(MergeMaturityResponse info) + public static Command_1 MergeMaturity(MergeMaturityResponse info) { - return new Command1(Command1Tag.MergeMaturity, info); + return new Command_1(Command_1Tag.MergeMaturity, info); } - public static Command1 Disburse(DisburseResponse info) + public static Command_1 Disburse(DisburseResponse info) { - return new Command1(Command1Tag.Disburse, info); + return new Command_1(Command_1Tag.Disburse, info); } public GovernanceError AsError() { - this.ValidateTag(Command1Tag.Error); + this.ValidateTag(Command_1Tag.Error); return (GovernanceError)this.Value!; } public SpawnResponse AsSpawn() { - this.ValidateTag(Command1Tag.Spawn); + this.ValidateTag(Command_1Tag.Spawn); return (SpawnResponse)this.Value!; } public SpawnResponse AsSplit() { - this.ValidateTag(Command1Tag.Split); + this.ValidateTag(Command_1Tag.Split); return (SpawnResponse)this.Value!; } - public Command1.FollowInfo AsFollow() + public Command_1.FollowInfo AsFollow() { - this.ValidateTag(Command1Tag.Follow); - return (Command1.FollowInfo)this.Value!; + this.ValidateTag(Command_1Tag.Follow); + return (Command_1.FollowInfo)this.Value!; } public ClaimOrRefreshResponse AsClaimOrRefresh() { - this.ValidateTag(Command1Tag.ClaimOrRefresh); + this.ValidateTag(Command_1Tag.ClaimOrRefresh); return (ClaimOrRefreshResponse)this.Value!; } - public Command1.ConfigureInfo AsConfigure() + public Command_1.ConfigureInfo AsConfigure() { - this.ValidateTag(Command1Tag.Configure); - return (Command1.ConfigureInfo)this.Value!; + this.ValidateTag(Command_1Tag.Configure); + return (Command_1.ConfigureInfo)this.Value!; } - public Command1.RegisterVoteInfo AsRegisterVote() + public Command_1.RegisterVoteInfo AsRegisterVote() { - this.ValidateTag(Command1Tag.RegisterVote); - return (Command1.RegisterVoteInfo)this.Value!; + this.ValidateTag(Command_1Tag.RegisterVote); + return (Command_1.RegisterVoteInfo)this.Value!; } - public Command1.MergeInfo AsMerge() + public Command_1.MergeInfo AsMerge() { - this.ValidateTag(Command1Tag.Merge); - return (Command1.MergeInfo)this.Value!; + this.ValidateTag(Command_1Tag.Merge); + return (Command_1.MergeInfo)this.Value!; } public SpawnResponse AsDisburseToNeuron() { - this.ValidateTag(Command1Tag.DisburseToNeuron); + this.ValidateTag(Command_1Tag.DisburseToNeuron); return (SpawnResponse)this.Value!; } public MakeProposalResponse AsMakeProposal() { - this.ValidateTag(Command1Tag.MakeProposal); + this.ValidateTag(Command_1Tag.MakeProposal); return (MakeProposalResponse)this.Value!; } public MergeMaturityResponse AsMergeMaturity() { - this.ValidateTag(Command1Tag.MergeMaturity); + this.ValidateTag(Command_1Tag.MergeMaturity); return (MergeMaturityResponse)this.Value!; } public DisburseResponse AsDisburse() { - this.ValidateTag(Command1Tag.Disburse); + this.ValidateTag(Command_1Tag.Disburse); return (DisburseResponse)this.Value!; } - private void ValidateTag(Command1Tag tag) + private void ValidateTag(Command_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1153,7 +1126,7 @@ namespace Test } } - public enum Command1Tag + public enum Command_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -1161,15 +1134,15 @@ namespace Test Spawn, [VariantOptionType(typeof(SpawnResponse))] Split, - [VariantOptionType(typeof(Command1.FollowInfo))] + [VariantOptionType(typeof(Command_1.FollowInfo))] Follow, [VariantOptionType(typeof(ClaimOrRefreshResponse))] ClaimOrRefresh, - [VariantOptionType(typeof(Command1.ConfigureInfo))] + [VariantOptionType(typeof(Command_1.ConfigureInfo))] Configure, - [VariantOptionType(typeof(Command1.RegisterVoteInfo))] + [VariantOptionType(typeof(Command_1.RegisterVoteInfo))] RegisterVote, - [VariantOptionType(typeof(Command1.MergeInfo))] + [VariantOptionType(typeof(Command_1.MergeInfo))] Merge, [VariantOptionType(typeof(SpawnResponse))] DisburseToNeuron, @@ -1182,122 +1155,122 @@ namespace Test } } -Type File: 'Command2' +Type File: 'Command_2' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Command2Tag))] - public class Command2 + [Variant(typeof(Command_2Tag))] + public class Command_2 { [VariantTagProperty()] - public Command2Tag Tag { get; set; } + public Command_2Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Command2(Command2Tag tag, object? value) + public Command_2(Command_2Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Command2() + protected Command_2() { } - public static Command2 Spawn(Spawn info) + public static Command_2 Spawn(Spawn info) { - return new Command2(Command2Tag.Spawn, info); + return new Command_2(Command_2Tag.Spawn, info); } - public static Command2 Split(Split info) + public static Command_2 Split(Split info) { - return new Command2(Command2Tag.Split, info); + return new Command_2(Command_2Tag.Split, info); } - public static Command2 Configure(Configure info) + public static Command_2 Configure(Configure info) { - return new Command2(Command2Tag.Configure, info); + return new Command_2(Command_2Tag.Configure, info); } - public static Command2 Merge(Merge info) + public static Command_2 Merge(Merge info) { - return new Command2(Command2Tag.Merge, info); + return new Command_2(Command_2Tag.Merge, info); } - public static Command2 DisburseToNeuron(DisburseToNeuron info) + public static Command_2 DisburseToNeuron(DisburseToNeuron info) { - return new Command2(Command2Tag.DisburseToNeuron, info); + return new Command_2(Command_2Tag.DisburseToNeuron, info); } - public static Command2 ClaimOrRefreshNeuron(ClaimOrRefresh info) + public static Command_2 ClaimOrRefreshNeuron(ClaimOrRefresh info) { - return new Command2(Command2Tag.ClaimOrRefreshNeuron, info); + return new Command_2(Command_2Tag.ClaimOrRefreshNeuron, info); } - public static Command2 MergeMaturity(MergeMaturity info) + public static Command_2 MergeMaturity(MergeMaturity info) { - return new Command2(Command2Tag.MergeMaturity, info); + return new Command_2(Command_2Tag.MergeMaturity, info); } - public static Command2 Disburse(Disburse info) + public static Command_2 Disburse(Disburse info) { - return new Command2(Command2Tag.Disburse, info); + return new Command_2(Command_2Tag.Disburse, info); } public Spawn AsSpawn() { - this.ValidateTag(Command2Tag.Spawn); + this.ValidateTag(Command_2Tag.Spawn); return (Spawn)this.Value!; } public Split AsSplit() { - this.ValidateTag(Command2Tag.Split); + this.ValidateTag(Command_2Tag.Split); return (Split)this.Value!; } public Configure AsConfigure() { - this.ValidateTag(Command2Tag.Configure); + this.ValidateTag(Command_2Tag.Configure); return (Configure)this.Value!; } public Merge AsMerge() { - this.ValidateTag(Command2Tag.Merge); + this.ValidateTag(Command_2Tag.Merge); return (Merge)this.Value!; } public DisburseToNeuron AsDisburseToNeuron() { - this.ValidateTag(Command2Tag.DisburseToNeuron); + this.ValidateTag(Command_2Tag.DisburseToNeuron); return (DisburseToNeuron)this.Value!; } public ClaimOrRefresh AsClaimOrRefreshNeuron() { - this.ValidateTag(Command2Tag.ClaimOrRefreshNeuron); + this.ValidateTag(Command_2Tag.ClaimOrRefreshNeuron); return (ClaimOrRefresh)this.Value!; } public MergeMaturity AsMergeMaturity() { - this.ValidateTag(Command2Tag.MergeMaturity); + this.ValidateTag(Command_2Tag.MergeMaturity); return (MergeMaturity)this.Value!; } public Disburse AsDisburse() { - this.ValidateTag(Command2Tag.Disburse); + this.ValidateTag(Command_2Tag.Disburse); return (Disburse)this.Value!; } - private void ValidateTag(Command2Tag tag) + private void ValidateTag(Command_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1306,7 +1279,7 @@ namespace Test } } - public enum Command2Tag + public enum Command_2Tag { [VariantOptionType(typeof(Spawn))] Spawn, @@ -1329,20 +1302,18 @@ namespace Test Type File: 'Configure' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Configure { - [CandidName("operation")] - public OptionalValue Operation { get; set; } + public OptionalValue operation { get; set; } public Configure(OptionalValue operation) { - this.Operation = operation; + this.operation = operation; } public Configure() @@ -1353,24 +1324,21 @@ namespace Test Type File: 'Disburse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Disburse { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } - [CandidName("amount")] - public OptionalValue Amount { get; set; } + public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) { - this.ToAccount = toAccount; - this.Amount = amount; + this.to_account = toAccount; + this.amount = amount; } public Disburse() @@ -1381,18 +1349,15 @@ namespace Test Type File: 'DisburseResponse' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class DisburseResponse { - [CandidName("transfer_block_height")] - public ulong TransferBlockHeight { get; set; } + public ulong transfer_block_height { get; set; } public DisburseResponse(ulong transferBlockHeight) { - this.TransferBlockHeight = transferBlockHeight; + this.transfer_block_height = transferBlockHeight; } public DisburseResponse() @@ -1403,35 +1368,29 @@ namespace Test Type File: 'DisburseToNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class DisburseToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public ulong Nonce { get; set; } + public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.KycVerified = kycVerified; - this.AmountE8s = amountE8s; - this.NewController = newController; - this.Nonce = nonce; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.kyc_verified = kycVerified; + this.amount_e8s = amountE8s; + this.new_controller = newController; + this.nonce = nonce; } public DisburseToNeuron() @@ -1443,10 +1402,10 @@ namespace Test Type File: 'DissolveState' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(DissolveStateTag))] public class DissolveState @@ -1509,23 +1468,20 @@ namespace Test Type File: 'ExecuteNnsFunction' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ExecuteNnsFunction { - [CandidName("nns_function")] - public int NnsFunction { get; set; } + public int nns_function { get; set; } - [CandidName("payload")] - public List Payload { get; set; } + public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) { - this.NnsFunction = nnsFunction; - this.Payload = payload; + this.nns_function = nnsFunction; + this.payload = payload; } public ExecuteNnsFunction() @@ -1536,24 +1492,21 @@ namespace Test Type File: 'Follow' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Follow { - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("followees")] - public List Followees { get; set; } + public List followees { get; set; } public Follow(int topic, List followees) { - this.Topic = topic; - this.Followees = followees; + this.topic = topic; + this.followees = followees; } public Follow() @@ -1564,20 +1517,18 @@ namespace Test Type File: 'Followees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Followees { - [CandidName("followees")] - public List Followees_ { get; set; } + public List followees { get; set; } public Followees(List followees) { - this.Followees_ = followees; + this.followees = followees; } public Followees() @@ -1588,65 +1539,52 @@ namespace Test Type File: 'Governance' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class Governance { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - [CandidName("wait_for_quiet_threshold_seconds")] - public ulong WaitForQuietThresholdSeconds { get; set; } + public ulong wait_for_quiet_threshold_seconds { get; set; } - [CandidName("metrics")] - public OptionalValue Metrics { get; set; } + public OptionalValue metrics { get; set; } - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } - [CandidName("economics")] - public OptionalValue Economics { get; set; } + public OptionalValue economics { get; set; } - [CandidName("latest_reward_event")] - public OptionalValue LatestRewardEvent { get; set; } + public OptionalValue latest_reward_event { get; set; } - [CandidName("to_claim_transfers")] - public List ToClaimTransfers { get; set; } + public List to_claim_transfers { get; set; } - [CandidName("short_voting_period_seconds")] - public ulong ShortVotingPeriodSeconds { get; set; } + public ulong short_voting_period_seconds { get; set; } - [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary proposals { get; set; } - [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary in_flight_commands { get; set; } - [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary neurons { get; set; } - [CandidName("genesis_timestamp_seconds")] - public ulong GenesisTimestampSeconds { get; set; } + public ulong genesis_timestamp_seconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { - this.DefaultFollowees = defaultFollowees; - this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; - this.Metrics = metrics; - this.NodeProviders = nodeProviders; - this.Economics = economics; - this.LatestRewardEvent = latestRewardEvent; - this.ToClaimTransfers = toClaimTransfers; - this.ShortVotingPeriodSeconds = shortVotingPeriodSeconds; - this.Proposals = proposals; - this.InFlightCommands = inFlightCommands; - this.Neurons = neurons; - this.GenesisTimestampSeconds = genesisTimestampSeconds; + this.default_followees = defaultFollowees; + this.wait_for_quiet_threshold_seconds = waitForQuietThresholdSeconds; + this.metrics = metrics; + this.node_providers = nodeProviders; + this.economics = economics; + this.latest_reward_event = latestRewardEvent; + this.to_claim_transfers = toClaimTransfers; + this.short_voting_period_seconds = shortVotingPeriodSeconds; + this.proposals = proposals; + this.in_flight_commands = inFlightCommands; + this.neurons = neurons; + this.genesis_timestamp_seconds = genesisTimestampSeconds; } public Governance() @@ -1657,79 +1595,62 @@ namespace Test Type File: 'GovernanceCachedMetrics' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class GovernanceCachedMetrics { - [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - [CandidName("garbage_collectable_neurons_count")] - public ulong GarbageCollectableNeuronsCount { get; set; } + public ulong garbage_collectable_neurons_count { get; set; } - [CandidName("neurons_with_invalid_stake_count")] - public ulong NeuronsWithInvalidStakeCount { get; set; } + public ulong neurons_with_invalid_stake_count { get; set; } - [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary not_dissolving_neurons_count_buckets { get; set; } - [CandidName("total_supply_icp")] - public ulong TotalSupplyIcp { get; set; } + public ulong total_supply_icp { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_count")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayCount { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - [CandidName("dissolved_neurons_count")] - public ulong DissolvedNeuronsCount { get; set; } + public ulong dissolved_neurons_count { get; set; } - [CandidName("total_staked_e8s")] - public ulong TotalStakedE8s { get; set; } + public ulong total_staked_e8s { get; set; } - [CandidName("not_dissolving_neurons_count")] - public ulong NotDissolvingNeuronsCount { get; set; } + public ulong not_dissolving_neurons_count { get; set; } - [CandidName("dissolved_neurons_e8s")] - public ulong DissolvedNeuronsE8s { get; set; } + public ulong dissolved_neurons_e8s { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_e8s")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary dissolving_neurons_count_buckets { get; set; } - [CandidName("dissolving_neurons_count")] - public ulong DissolvingNeuronsCount { get; set; } + public ulong dissolving_neurons_count { get; set; } - [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary dissolving_neurons_e8s_buckets { get; set; } - [CandidName("community_fund_total_staked_e8s")] - public ulong CommunityFundTotalStakedE8s { get; set; } + public ulong community_fund_total_staked_e8s { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { - this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; - this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; - this.NeuronsWithInvalidStakeCount = neuronsWithInvalidStakeCount; - this.NotDissolvingNeuronsCountBuckets = notDissolvingNeuronsCountBuckets; - this.TotalSupplyIcp = totalSupplyIcp; - this.NeuronsWithLessThan6MonthsDissolveDelayCount = neuronsWithLessThan6MonthsDissolveDelayCount; - this.DissolvedNeuronsCount = dissolvedNeuronsCount; - this.TotalStakedE8s = totalStakedE8s; - this.NotDissolvingNeuronsCount = notDissolvingNeuronsCount; - this.DissolvedNeuronsE8s = dissolvedNeuronsE8s; - this.NeuronsWithLessThan6MonthsDissolveDelayE8s = neuronsWithLessThan6MonthsDissolveDelayE8s; - this.DissolvingNeuronsCountBuckets = dissolvingNeuronsCountBuckets; - this.DissolvingNeuronsCount = dissolvingNeuronsCount; - this.DissolvingNeuronsE8sBuckets = dissolvingNeuronsE8sBuckets; - this.CommunityFundTotalStakedE8s = communityFundTotalStakedE8s; - this.TimestampSeconds = timestampSeconds; + this.not_dissolving_neurons_e8s_buckets = notDissolvingNeuronsE8sBuckets; + this.garbage_collectable_neurons_count = garbageCollectableNeuronsCount; + this.neurons_with_invalid_stake_count = neuronsWithInvalidStakeCount; + this.not_dissolving_neurons_count_buckets = notDissolvingNeuronsCountBuckets; + this.total_supply_icp = totalSupplyIcp; + this.neurons_with_less_than_6_months_dissolve_delay_count = neuronsWithLessThan6MonthsDissolveDelayCount; + this.dissolved_neurons_count = dissolvedNeuronsCount; + this.total_staked_e8s = totalStakedE8s; + this.not_dissolving_neurons_count = notDissolvingNeuronsCount; + this.dissolved_neurons_e8s = dissolvedNeuronsE8s; + this.neurons_with_less_than_6_months_dissolve_delay_e8s = neuronsWithLessThan6MonthsDissolveDelayE8s; + this.dissolving_neurons_count_buckets = dissolvingNeuronsCountBuckets; + this.dissolving_neurons_count = dissolvingNeuronsCount; + this.dissolving_neurons_e8s_buckets = dissolvingNeuronsE8sBuckets; + this.community_fund_total_staked_e8s = communityFundTotalStakedE8s; + this.timestamp_seconds = timestampSeconds; } public GovernanceCachedMetrics() @@ -1740,22 +1661,18 @@ namespace Test Type File: 'GovernanceError' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class GovernanceError { - [CandidName("error_message")] - public string ErrorMessage { get; set; } + public string error_message { get; set; } - [CandidName("error_type")] - public int ErrorType { get; set; } + public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) { - this.ErrorMessage = errorMessage; - this.ErrorType = errorType; + this.error_message = errorMessage; + this.error_type = errorType; } public GovernanceError() @@ -1766,18 +1683,15 @@ namespace Test Type File: 'IncreaseDissolveDelay' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class IncreaseDissolveDelay { - [CandidName("additional_dissolve_delay_seconds")] - public uint AdditionalDissolveDelaySeconds { get; set; } + public uint additional_dissolve_delay_seconds { get; set; } public IncreaseDissolveDelay(uint additionalDissolveDelaySeconds) { - this.AdditionalDissolveDelaySeconds = additionalDissolveDelaySeconds; + this.additional_dissolve_delay_seconds = additionalDissolveDelaySeconds; } public IncreaseDissolveDelay() @@ -1788,24 +1702,21 @@ namespace Test Type File: 'KnownNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class KnownNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) { - this.Id = id; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.known_neuron_data = knownNeuronData; } public KnownNeuron() @@ -1816,23 +1727,20 @@ namespace Test Type File: 'KnownNeuronData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class KnownNeuronData { - [CandidName("name")] - public string Name { get; set; } + public string name { get; set; } - [CandidName("description")] - public OptionalValue Description { get; set; } + public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) { - this.Name = name; - this.Description = description; + this.name = name; + this.description = description; } public KnownNeuronData() @@ -1843,20 +1751,18 @@ namespace Test Type File: 'ListKnownNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListKnownNeuronsResponse { - [CandidName("known_neurons")] - public List KnownNeurons { get; set; } + public List known_neurons { get; set; } public ListKnownNeuronsResponse(List knownNeurons) { - this.KnownNeurons = knownNeurons; + this.known_neurons = knownNeurons; } public ListKnownNeuronsResponse() @@ -1867,23 +1773,20 @@ namespace Test Type File: 'ListNeurons' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ListNeurons { - [CandidName("neuron_ids")] - public List NeuronIds { get; set; } + public List neuron_ids { get; set; } - [CandidName("include_neurons_readable_by_caller")] - public bool IncludeNeuronsReadableByCaller { get; set; } + public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) { - this.NeuronIds = neuronIds; - this.IncludeNeuronsReadableByCaller = includeNeuronsReadableByCaller; + this.neuron_ids = neuronIds; + this.include_neurons_readable_by_caller = includeNeuronsReadableByCaller; } public ListNeurons() @@ -1894,24 +1797,21 @@ namespace Test Type File: 'ListNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListNeuronsResponse { - [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary neuron_infos { get; set; } - [CandidName("full_neurons")] - public List FullNeurons { get; set; } + public List full_neurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { - this.NeuronInfos = neuronInfos; - this.FullNeurons = fullNeurons; + this.neuron_infos = neuronInfos; + this.full_neurons = fullNeurons; } public ListNeuronsResponse() @@ -1922,20 +1822,18 @@ namespace Test Type File: 'ListNodeProvidersResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListNodeProvidersResponse { - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } public ListNodeProvidersResponse(List nodeProviders) { - this.NodeProviders = nodeProviders; + this.node_providers = nodeProviders; } public ListNodeProvidersResponse() @@ -1946,37 +1844,31 @@ namespace Test Type File: 'ListProposalInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListProposalInfo { - [CandidName("include_reward_status")] - public List IncludeRewardStatus { get; set; } + public List include_reward_status { get; set; } - [CandidName("before_proposal")] - public OptionalValue BeforeProposal { get; set; } + public OptionalValue before_proposal { get; set; } - [CandidName("limit")] - public uint Limit { get; set; } + public uint limit { get; set; } - [CandidName("exclude_topic")] - public List ExcludeTopic { get; set; } + public List exclude_topic { get; set; } - [CandidName("include_status")] - public List IncludeStatus { get; set; } + public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) { - this.IncludeRewardStatus = includeRewardStatus; - this.BeforeProposal = beforeProposal; - this.Limit = limit; - this.ExcludeTopic = excludeTopic; - this.IncludeStatus = includeStatus; + this.include_reward_status = includeRewardStatus; + this.before_proposal = beforeProposal; + this.limit = limit; + this.exclude_topic = excludeTopic; + this.include_status = includeStatus; } public ListProposalInfo() @@ -1987,20 +1879,18 @@ namespace Test Type File: 'ListProposalInfoResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ListProposalInfoResponse { - [CandidName("proposal_info")] - public List ProposalInfo { get; set; } + public List proposal_info { get; set; } public ListProposalInfoResponse(List proposalInfo) { - this.ProposalInfo = proposalInfo; + this.proposal_info = proposalInfo; } public ListProposalInfoResponse() @@ -2011,20 +1901,18 @@ namespace Test Type File: 'MakeProposalResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class MakeProposalResponse { - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public MakeProposalResponse(OptionalValue proposalId) { - this.ProposalId = proposalId; + this.proposal_id = proposalId; } public MakeProposalResponse() @@ -2035,28 +1923,24 @@ namespace Test Type File: 'ManageNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ManageNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("neuron_id_or_subaccount")] - public OptionalValue NeuronIdOrSubaccount { get; set; } + public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) { - this.Id = id; - this.Command = command; - this.NeuronIdOrSubaccount = neuronIdOrSubaccount; + this.id = id; + this.command = command; + this.neuron_id_or_subaccount = neuronIdOrSubaccount; } public ManageNeuron() @@ -2067,20 +1951,18 @@ namespace Test Type File: 'ManageNeuronResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class ManageNeuronResponse { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - public ManageNeuronResponse(OptionalValue command) + public ManageNeuronResponse(OptionalValue command) { - this.Command = command; + this.command = command; } public ManageNeuronResponse() @@ -2091,20 +1973,18 @@ namespace Test Type File: 'Merge' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Merge { - [CandidName("source_neuron_id")] - public OptionalValue SourceNeuronId { get; set; } + public OptionalValue source_neuron_id { get; set; } public Merge(OptionalValue sourceNeuronId) { - this.SourceNeuronId = sourceNeuronId; + this.source_neuron_id = sourceNeuronId; } public Merge() @@ -2115,18 +1995,15 @@ namespace Test Type File: 'MergeMaturity' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class MergeMaturity { - [CandidName("percentage_to_merge")] - public uint PercentageToMerge { get; set; } + public uint percentage_to_merge { get; set; } public MergeMaturity(uint percentageToMerge) { - this.PercentageToMerge = percentageToMerge; + this.percentage_to_merge = percentageToMerge; } public MergeMaturity() @@ -2137,22 +2014,18 @@ namespace Test Type File: 'MergeMaturityResponse' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class MergeMaturityResponse { - [CandidName("merged_maturity_e8s")] - public ulong MergedMaturityE8s { get; set; } + public ulong merged_maturity_e8s { get; set; } - [CandidName("new_stake_e8s")] - public ulong NewStakeE8s { get; set; } + public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) { - this.MergedMaturityE8s = mergedMaturityE8s; - this.NewStakeE8s = newStakeE8s; + this.merged_maturity_e8s = mergedMaturityE8s; + this.new_stake_e8s = newStakeE8s; } public MergeMaturityResponse() @@ -2163,18 +2036,15 @@ namespace Test Type File: 'Motion' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Motion { - [CandidName("motion_text")] - public string MotionText { get; set; } + public string motion_text { get; set; } public Motion(string motionText) { - this.MotionText = motionText; + this.motion_text = motionText; } public Motion() @@ -2185,46 +2055,36 @@ namespace Test Type File: 'NetworkEconomics' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class NetworkEconomics { - [CandidName("neuron_minimum_stake_e8s")] - public ulong NeuronMinimumStakeE8s { get; set; } + public ulong neuron_minimum_stake_e8s { get; set; } - [CandidName("max_proposals_to_keep_per_topic")] - public uint MaxProposalsToKeepPerTopic { get; set; } + public uint max_proposals_to_keep_per_topic { get; set; } - [CandidName("neuron_management_fee_per_proposal_e8s")] - public ulong NeuronManagementFeePerProposalE8s { get; set; } + public ulong neuron_management_fee_per_proposal_e8s { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("transaction_fee_e8s")] - public ulong TransactionFeeE8s { get; set; } + public ulong transaction_fee_e8s { get; set; } - [CandidName("neuron_spawn_dissolve_delay_seconds")] - public ulong NeuronSpawnDissolveDelaySeconds { get; set; } + public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - [CandidName("minimum_icp_xdr_rate")] - public ulong MinimumIcpXdrRate { get; set; } + public ulong minimum_icp_xdr_rate { get; set; } - [CandidName("maximum_node_provider_rewards_e8s")] - public ulong MaximumNodeProviderRewardsE8s { get; set; } + public ulong maximum_node_provider_rewards_e8s { get; set; } public NetworkEconomics(ulong neuronMinimumStakeE8s, uint maxProposalsToKeepPerTopic, ulong neuronManagementFeePerProposalE8s, ulong rejectCostE8s, ulong transactionFeeE8s, ulong neuronSpawnDissolveDelaySeconds, ulong minimumIcpXdrRate, ulong maximumNodeProviderRewardsE8s) { - this.NeuronMinimumStakeE8s = neuronMinimumStakeE8s; - this.MaxProposalsToKeepPerTopic = maxProposalsToKeepPerTopic; - this.NeuronManagementFeePerProposalE8s = neuronManagementFeePerProposalE8s; - this.RejectCostE8s = rejectCostE8s; - this.TransactionFeeE8s = transactionFeeE8s; - this.NeuronSpawnDissolveDelaySeconds = neuronSpawnDissolveDelaySeconds; - this.MinimumIcpXdrRate = minimumIcpXdrRate; - this.MaximumNodeProviderRewardsE8s = maximumNodeProviderRewardsE8s; + this.neuron_minimum_stake_e8s = neuronMinimumStakeE8s; + this.max_proposals_to_keep_per_topic = maxProposalsToKeepPerTopic; + this.neuron_management_fee_per_proposal_e8s = neuronManagementFeePerProposalE8s; + this.reject_cost_e8s = rejectCostE8s; + this.transaction_fee_e8s = transactionFeeE8s; + this.neuron_spawn_dissolve_delay_seconds = neuronSpawnDissolveDelaySeconds; + this.minimum_icp_xdr_rate = minimumIcpXdrRate; + this.maximum_node_provider_rewards_e8s = maximumNodeProviderRewardsE8s; } public NetworkEconomics() @@ -2235,85 +2095,67 @@ namespace Test Type File: 'Neuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class Neuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("not_for_profit")] - public bool NotForProfit { get; set; } + public bool not_for_profit { get; set; } - [CandidName("maturity_e8s_equivalent")] - public ulong MaturityE8sEquivalent { get; set; } + public ulong maturity_e8s_equivalent { get; set; } - [CandidName("cached_neuron_stake_e8s")] - public ulong CachedNeuronStakeE8s { get; set; } + public ulong cached_neuron_stake_e8s { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("aging_since_timestamp_seconds")] - public ulong AgingSinceTimestampSeconds { get; set; } + public ulong aging_since_timestamp_seconds { get; set; } - [CandidName("hot_keys")] - public List HotKeys { get; set; } + public List hot_keys { get; set; } - [CandidName("account")] - public List Account { get; set; } + public List account { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("dissolve_state")] - public OptionalValue DissolveState { get; set; } + public OptionalValue dissolve_state { get; set; } - [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary followees { get; set; } - [CandidName("neuron_fees_e8s")] - public ulong NeuronFeesE8s { get; set; } + public ulong neuron_fees_e8s { get; set; } - [CandidName("transfer")] - public OptionalValue Transfer { get; set; } + public OptionalValue transfer { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { - this.Id = id; - this.Controller = controller; - this.RecentBallots = recentBallots; - this.KycVerified = kycVerified; - this.NotForProfit = notForProfit; - this.MaturityE8sEquivalent = maturityE8sEquivalent; - this.CachedNeuronStakeE8s = cachedNeuronStakeE8s; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.AgingSinceTimestampSeconds = agingSinceTimestampSeconds; - this.HotKeys = hotKeys; - this.Account = account; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.DissolveState = dissolveState; - this.Followees = followees; - this.NeuronFeesE8s = neuronFeesE8s; - this.Transfer = transfer; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.controller = controller; + this.recent_ballots = recentBallots; + this.kyc_verified = kycVerified; + this.not_for_profit = notForProfit; + this.maturity_e8s_equivalent = maturityE8sEquivalent; + this.cached_neuron_stake_e8s = cachedNeuronStakeE8s; + this.created_timestamp_seconds = createdTimestampSeconds; + this.aging_since_timestamp_seconds = agingSinceTimestampSeconds; + this.hot_keys = hotKeys; + this.account = account; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.dissolve_state = dissolveState; + this.followees = followees; + this.neuron_fees_e8s = neuronFeesE8s; + this.transfer = transfer; + this.known_neuron_data = knownNeuronData; } public Neuron() @@ -2324,18 +2166,15 @@ namespace Test Type File: 'NeuronId' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class NeuronId { - [CandidName("id")] - public ulong Id { get; set; } + public ulong id { get; set; } public NeuronId(ulong id) { - this.Id = id; + this.id = id; } public NeuronId() @@ -2347,11 +2186,11 @@ namespace Test Type File: 'NeuronIdOrSubaccount' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System.Collections.Generic; using System; -namespace Test +namespace Test.Models { [Variant(typeof(NeuronIdOrSubaccountTag))] public class NeuronIdOrSubaccount @@ -2414,24 +2253,21 @@ namespace Test Type File: 'NeuronInFlightCommand' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class NeuronInFlightCommand { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("timestamp")] - public ulong Timestamp { get; set; } + public ulong timestamp { get; set; } - public NeuronInFlightCommand(OptionalValue command, ulong timestamp) + public NeuronInFlightCommand(OptionalValue command, ulong timestamp) { - this.Command = command; - this.Timestamp = timestamp; + this.command = command; + this.timestamp = timestamp; } public NeuronInFlightCommand() @@ -2442,57 +2278,46 @@ namespace Test Type File: 'NeuronInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class NeuronInfo { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("state")] - public int State { get; set; } + public int state { get; set; } - [CandidName("stake_e8s")] - public ulong StakeE8s { get; set; } + public ulong stake_e8s { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("retrieved_at_timestamp_seconds")] - public ulong RetrievedAtTimestampSeconds { get; set; } + public ulong retrieved_at_timestamp_seconds { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } - [CandidName("age_seconds")] - public ulong AgeSeconds { get; set; } + public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, OptionalValue joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, OptionalValue knownNeuronData, ulong votingPower, ulong ageSeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.RecentBallots = recentBallots; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.State = state; - this.StakeE8s = stakeE8s; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.RetrievedAtTimestampSeconds = retrievedAtTimestampSeconds; - this.KnownNeuronData = knownNeuronData; - this.VotingPower = votingPower; - this.AgeSeconds = ageSeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.recent_ballots = recentBallots; + this.created_timestamp_seconds = createdTimestampSeconds; + this.state = state; + this.stake_e8s = stakeE8s; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.retrieved_at_timestamp_seconds = retrievedAtTimestampSeconds; + this.known_neuron_data = knownNeuronData; + this.voting_power = votingPower; + this.age_seconds = ageSeconds; } public NeuronInfo() @@ -2503,44 +2328,36 @@ namespace Test Type File: 'NeuronStakeTransfer' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class NeuronStakeTransfer { - [CandidName("to_subaccount")] - public List ToSubaccount { get; set; } + public List to_subaccount { get; set; } - [CandidName("neuron_stake_e8s")] - public ulong NeuronStakeE8s { get; set; } + public ulong neuron_stake_e8s { get; set; } - [CandidName("from")] - public OptionalValue From { get; set; } + public OptionalValue from { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } - [CandidName("from_subaccount")] - public List FromSubaccount { get; set; } + public List from_subaccount { get; set; } - [CandidName("transfer_timestamp")] - public ulong TransferTimestamp { get; set; } + public ulong transfer_timestamp { get; set; } - [CandidName("block_height")] - public ulong BlockHeight { get; set; } + public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) { - this.ToSubaccount = toSubaccount; - this.NeuronStakeE8s = neuronStakeE8s; - this.From = from; - this.Memo = memo; - this.FromSubaccount = fromSubaccount; - this.TransferTimestamp = transferTimestamp; - this.BlockHeight = blockHeight; + this.to_subaccount = toSubaccount; + this.neuron_stake_e8s = neuronStakeE8s; + this.from = from; + this.memo = memo; + this.from_subaccount = fromSubaccount; + this.transfer_timestamp = transferTimestamp; + this.block_height = blockHeight; } public NeuronStakeTransfer() @@ -2551,24 +2368,21 @@ namespace Test Type File: 'NodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class NodeProvider { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) { - this.Id = id; - this.RewardAccount = rewardAccount; + this.id = id; + this.reward_account = rewardAccount; } public NodeProvider() @@ -2580,10 +2394,10 @@ namespace Test Type File: 'Operation' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(OperationTag))] public class Operation @@ -2732,32 +2546,27 @@ namespace Test Type File: 'Proposal' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class Proposal { - [CandidName("url")] - public string Url { get; set; } + public string url { get; set; } - [CandidName("title")] - public OptionalValue Title { get; set; } + public OptionalValue title { get; set; } - [CandidName("action")] - public OptionalValue Action { get; set; } + public OptionalValue action { get; set; } - [CandidName("summary")] - public string Summary { get; set; } + public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) { - this.Url = url; - this.Title = title; - this.Action = action; - this.Summary = summary; + this.url = url; + this.title = title; + this.action = action; + this.summary = summary; } public Proposal() @@ -2768,69 +2577,55 @@ namespace Test Type File: 'ProposalData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ProposalData { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("wait_for_quiet_state")] - public OptionalValue WaitForQuietState { get; set; } + public OptionalValue wait_for_quiet_state { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { - this.Id = id; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.WaitForQuietState = waitForQuietState; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.wait_for_quiet_state = waitForQuietState; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalData() @@ -2841,81 +2636,64 @@ namespace Test Type File: 'ProposalInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; using System.Collections.Generic; -namespace Test +namespace Test.Models { public class ProposalInfo { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("status")] - public int Status { get; set; } + public int status { get; set; } - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("deadline_timestamp_seconds")] - public OptionalValue DeadlineTimestampSeconds { get; set; } + public OptionalValue deadline_timestamp_seconds { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("reward_status")] - public int RewardStatus { get; set; } + public int reward_status { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { - this.Id = id; - this.Status = status; - this.Topic = topic; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.DeadlineTimestampSeconds = deadlineTimestampSeconds; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.RewardStatus = rewardStatus; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.status = status; + this.topic = topic; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.deadline_timestamp_seconds = deadlineTimestampSeconds; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.reward_status = rewardStatus; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalInfo() @@ -2926,24 +2704,21 @@ namespace Test Type File: 'RegisterVote' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RegisterVote { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) { - this.Vote = vote; - this.Proposal = proposal; + this.vote = vote; + this.proposal = proposal; } public RegisterVote() @@ -2954,19 +2729,17 @@ namespace Test Type File: 'RemoveHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class RemoveHotKey { - [CandidName("hot_key_to_remove")] - public OptionalValue HotKeyToRemove { get; set; } + public OptionalValue hot_key_to_remove { get; set; } public RemoveHotKey(OptionalValue hotKeyToRemove) { - this.HotKeyToRemove = hotKeyToRemove; + this.hot_key_to_remove = hotKeyToRemove; } public RemoveHotKey() @@ -2978,10 +2751,10 @@ namespace Test Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(ResultTag))] public class Result @@ -3035,56 +2808,56 @@ namespace Test } } -Type File: 'Result1' +Type File: 'Result_1' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Result1Tag))] - public class Result1 + [Variant(typeof(Result_1Tag))] + public class Result_1 { [VariantTagProperty()] - public Result1Tag Tag { get; set; } + public Result_1Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result1(Result1Tag tag, object? value) + public Result_1(Result_1Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result1() + protected Result_1() { } - public static Result1 Error(GovernanceError info) + public static Result_1 Error(GovernanceError info) { - return new Result1(Result1Tag.Error, info); + return new Result_1(Result_1Tag.Error, info); } - public static Result1 NeuronId(NeuronId info) + public static Result_1 NeuronId(NeuronId info) { - return new Result1(Result1Tag.NeuronId, info); + return new Result_1(Result_1Tag.NeuronId, info); } public GovernanceError AsError() { - this.ValidateTag(Result1Tag.Error); + this.ValidateTag(Result_1Tag.Error); return (GovernanceError)this.Value!; } public NeuronId AsNeuronId() { - this.ValidateTag(Result1Tag.NeuronId); + this.ValidateTag(Result_1Tag.NeuronId); return (NeuronId)this.Value!; } - private void ValidateTag(Result1Tag tag) + private void ValidateTag(Result_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3093,7 +2866,7 @@ namespace Test } } - public enum Result1Tag + public enum Result_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -3102,56 +2875,56 @@ namespace Test } } -Type File: 'Result2' +Type File: 'Result_2' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Result2Tag))] - public class Result2 + [Variant(typeof(Result_2Tag))] + public class Result_2 { [VariantTagProperty()] - public Result2Tag Tag { get; set; } + public Result_2Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result2(Result2Tag tag, object? value) + public Result_2(Result_2Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result2() + protected Result_2() { } - public static Result2 Ok(Neuron info) + public static Result_2 Ok(Neuron info) { - return new Result2(Result2Tag.Ok, info); + return new Result_2(Result_2Tag.Ok, info); } - public static Result2 Err(GovernanceError info) + public static Result_2 Err(GovernanceError info) { - return new Result2(Result2Tag.Err, info); + return new Result_2(Result_2Tag.Err, info); } public Neuron AsOk() { - this.ValidateTag(Result2Tag.Ok); + this.ValidateTag(Result_2Tag.Ok); return (Neuron)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result2Tag.Err); + this.ValidateTag(Result_2Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result2Tag tag) + private void ValidateTag(Result_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3160,7 +2933,7 @@ namespace Test } } - public enum Result2Tag + public enum Result_2Tag { [VariantOptionType(typeof(Neuron))] Ok, @@ -3169,56 +2942,56 @@ namespace Test } } -Type File: 'Result3' +Type File: 'Result_3' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Result3Tag))] - public class Result3 + [Variant(typeof(Result_3Tag))] + public class Result_3 { [VariantTagProperty()] - public Result3Tag Tag { get; set; } + public Result_3Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result3(Result3Tag tag, object? value) + public Result_3(Result_3Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result3() + protected Result_3() { } - public static Result3 Ok(RewardNodeProviders info) + public static Result_3 Ok(RewardNodeProviders info) { - return new Result3(Result3Tag.Ok, info); + return new Result_3(Result_3Tag.Ok, info); } - public static Result3 Err(GovernanceError info) + public static Result_3 Err(GovernanceError info) { - return new Result3(Result3Tag.Err, info); + return new Result_3(Result_3Tag.Err, info); } public RewardNodeProviders AsOk() { - this.ValidateTag(Result3Tag.Ok); + this.ValidateTag(Result_3Tag.Ok); return (RewardNodeProviders)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result3Tag.Err); + this.ValidateTag(Result_3Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result3Tag tag) + private void ValidateTag(Result_3Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3227,7 +3000,7 @@ namespace Test } } - public enum Result3Tag + public enum Result_3Tag { [VariantOptionType(typeof(RewardNodeProviders))] Ok, @@ -3236,56 +3009,56 @@ namespace Test } } -Type File: 'Result4' +Type File: 'Result_4' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Result4Tag))] - public class Result4 + [Variant(typeof(Result_4Tag))] + public class Result_4 { [VariantTagProperty()] - public Result4Tag Tag { get; set; } + public Result_4Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result4(Result4Tag tag, object? value) + public Result_4(Result_4Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result4() + protected Result_4() { } - public static Result4 Ok(NeuronInfo info) + public static Result_4 Ok(NeuronInfo info) { - return new Result4(Result4Tag.Ok, info); + return new Result_4(Result_4Tag.Ok, info); } - public static Result4 Err(GovernanceError info) + public static Result_4 Err(GovernanceError info) { - return new Result4(Result4Tag.Err, info); + return new Result_4(Result_4Tag.Err, info); } public NeuronInfo AsOk() { - this.ValidateTag(Result4Tag.Ok); + this.ValidateTag(Result_4Tag.Ok); return (NeuronInfo)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result4Tag.Err); + this.ValidateTag(Result_4Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result4Tag tag) + private void ValidateTag(Result_4Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3294,7 +3067,7 @@ namespace Test } } - public enum Result4Tag + public enum Result_4Tag { [VariantOptionType(typeof(NeuronInfo))] Ok, @@ -3303,56 +3076,56 @@ namespace Test } } -Type File: 'Result5' +Type File: 'Result_5' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { - [Variant(typeof(Result5Tag))] - public class Result5 + [Variant(typeof(Result_5Tag))] + public class Result_5 { [VariantTagProperty()] - public Result5Tag Tag { get; set; } + public Result_5Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result5(Result5Tag tag, object? value) + public Result_5(Result_5Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result5() + protected Result_5() { } - public static Result5 Ok(NodeProvider info) + public static Result_5 Ok(NodeProvider info) { - return new Result5(Result5Tag.Ok, info); + return new Result_5(Result_5Tag.Ok, info); } - public static Result5 Err(GovernanceError info) + public static Result_5 Err(GovernanceError info) { - return new Result5(Result5Tag.Err, info); + return new Result_5(Result_5Tag.Err, info); } public NodeProvider AsOk() { - this.ValidateTag(Result5Tag.Ok); + this.ValidateTag(Result_5Tag.Ok); return (NodeProvider)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result5Tag.Err); + this.ValidateTag(Result_5Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result5Tag tag) + private void ValidateTag(Result_5Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3361,7 +3134,7 @@ namespace Test } } - public enum Result5Tag + public enum Result_5Tag { [VariantOptionType(typeof(NodeProvider))] Ok, @@ -3372,32 +3145,27 @@ namespace Test Type File: 'RewardEvent' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardEvent { - [CandidName("day_after_genesis")] - public ulong DayAfterGenesis { get; set; } + public ulong day_after_genesis { get; set; } - [CandidName("actual_timestamp_seconds")] - public ulong ActualTimestampSeconds { get; set; } + public ulong actual_timestamp_seconds { get; set; } - [CandidName("distributed_e8s_equivalent")] - public ulong DistributedE8sEquivalent { get; set; } + public ulong distributed_e8s_equivalent { get; set; } - [CandidName("settled_proposals")] - public List SettledProposals { get; set; } + public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) { - this.DayAfterGenesis = dayAfterGenesis; - this.ActualTimestampSeconds = actualTimestampSeconds; - this.DistributedE8sEquivalent = distributedE8sEquivalent; - this.SettledProposals = settledProposals; + this.day_after_genesis = dayAfterGenesis; + this.actual_timestamp_seconds = actualTimestampSeconds; + this.distributed_e8s_equivalent = distributedE8sEquivalent; + this.settled_proposals = settledProposals; } public RewardEvent() @@ -3409,10 +3177,10 @@ namespace Test Type File: 'RewardMode' using EdjCase.ICP.Candid.Mapping; -using Test; +using Test.Models; using System; -namespace Test +namespace Test.Models { [Variant(typeof(RewardModeTag))] public class RewardMode @@ -3475,28 +3243,24 @@ namespace Test Type File: 'RewardNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardNodeProvider { - [CandidName("node_provider")] - public OptionalValue NodeProvider { get; set; } + public OptionalValue node_provider { get; set; } - [CandidName("reward_mode")] - public OptionalValue RewardMode { get; set; } + public OptionalValue reward_mode { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) { - this.NodeProvider = nodeProvider; - this.RewardMode = rewardMode; - this.AmountE8s = amountE8s; + this.node_provider = nodeProvider; + this.reward_mode = rewardMode; + this.amount_e8s = amountE8s; } public RewardNodeProvider() @@ -3507,25 +3271,22 @@ namespace Test Type File: 'RewardNodeProviders' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardNodeProviders { - [CandidName("use_registry_derived_rewards")] - public OptionalValue UseRegistryDerivedRewards { get; set; } + public OptionalValue use_registry_derived_rewards { get; set; } - [CandidName("rewards")] - public List Rewards { get; set; } + public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) { - this.UseRegistryDerivedRewards = useRegistryDerivedRewards; - this.Rewards = rewards; + this.use_registry_derived_rewards = useRegistryDerivedRewards; + this.rewards = rewards; } public RewardNodeProviders() @@ -3536,20 +3297,18 @@ namespace Test Type File: 'RewardToAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class RewardToAccount { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } public RewardToAccount(OptionalValue toAccount) { - this.ToAccount = toAccount; + this.to_account = toAccount; } public RewardToAccount() @@ -3560,18 +3319,15 @@ namespace Test Type File: 'RewardToNeuron' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class RewardToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } public RewardToNeuron(ulong dissolveDelaySeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; } public RewardToNeuron() @@ -3582,20 +3338,18 @@ namespace Test Type File: 'SetDefaultFollowees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class SetDefaultFollowees { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { - this.DefaultFollowees = defaultFollowees; + this.default_followees = defaultFollowees; } public SetDefaultFollowees() @@ -3606,18 +3360,15 @@ namespace Test Type File: 'SetDissolveTimestamp' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class SetDissolveTimestamp { - [CandidName("dissolve_timestamp_seconds")] - public ulong DissolveTimestampSeconds { get; set; } + public ulong dissolve_timestamp_seconds { get; set; } public SetDissolveTimestamp(ulong dissolveTimestampSeconds) { - this.DissolveTimestampSeconds = dissolveTimestampSeconds; + this.dissolve_timestamp_seconds = dissolveTimestampSeconds; } public SetDissolveTimestamp() @@ -3628,27 +3379,23 @@ namespace Test Type File: 'Spawn' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test +namespace Test.Models { public class Spawn { - [CandidName("percentage_to_spawn")] - public OptionalValue PercentageToSpawn { get; set; } + public OptionalValue percentage_to_spawn { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public OptionalValue Nonce { get; set; } + public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) { - this.PercentageToSpawn = percentageToSpawn; - this.NewController = newController; - this.Nonce = nonce; + this.percentage_to_spawn = percentageToSpawn; + this.new_controller = newController; + this.nonce = nonce; } public Spawn() @@ -3659,20 +3406,18 @@ namespace Test Type File: 'SpawnResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class SpawnResponse { - [CandidName("created_neuron_id")] - public OptionalValue CreatedNeuronId { get; set; } + public OptionalValue created_neuron_id { get; set; } public SpawnResponse(OptionalValue createdNeuronId) { - this.CreatedNeuronId = createdNeuronId; + this.created_neuron_id = createdNeuronId; } public SpawnResponse() @@ -3683,18 +3428,15 @@ namespace Test Type File: 'Split' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Split { - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public Split(ulong amountE8s) { - this.AmountE8s = amountE8s; + this.amount_e8s = amountE8s; } public Split() @@ -3705,30 +3447,24 @@ namespace Test Type File: 'Tally' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class Tally { - [CandidName("no")] - public ulong No { get; set; } + public ulong no { get; set; } - [CandidName("yes")] - public ulong Yes { get; set; } + public ulong yes { get; set; } - [CandidName("total")] - public ulong Total { get; set; } + public ulong total { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) { - this.No = no; - this.Yes = yes; - this.Total = total; - this.TimestampSeconds = timestampSeconds; + this.no = no; + this.yes = yes; + this.total = total; + this.timestamp_seconds = timestampSeconds; } public Tally() @@ -3739,20 +3475,18 @@ namespace Test Type File: 'UpdateNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test; +using Test.Models; -namespace Test +namespace Test.Models { public class UpdateNodeProvider { - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public UpdateNodeProvider(OptionalValue rewardAccount) { - this.RewardAccount = rewardAccount; + this.reward_account = rewardAccount; } public UpdateNodeProvider() @@ -3763,18 +3497,15 @@ namespace Test Type File: 'WaitForQuietState' -using EdjCase.ICP.Candid.Mapping; - -namespace Test +namespace Test.Models { public class WaitForQuietState { - [CandidName("current_deadline_timestamp_seconds")] - public ulong CurrentDeadlineTimestampSeconds { get; set; } + public ulong current_deadline_timestamp_seconds { get; set; } public WaitForQuietState(ulong currentDeadlineTimestampSeconds) { - this.CurrentDeadlineTimestampSeconds = currentDeadlineTimestampSeconds; + this.current_deadline_timestamp_seconds = currentDeadlineTimestampSeconds; } public WaitForQuietState() diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False.snap index 6b74e80d..b3bb5ae1 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False.snap @@ -23,18 +23,18 @@ namespace Test this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task ClaimGtcNeurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(Models.ClaimOrRefreshNeuronFromAccount arg0) + public async Task ClaimOrRefreshNeuronFromAccount(ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task GetBuildMetadata() @@ -45,35 +45,35 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task GetFullNeuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task GetFullNeuronByIdOrSubaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task GetMonthlyNodeProviderRewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task GetNetworkEconomicsParameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } public async Task> GetNeuronIds() @@ -84,97 +84,97 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task GetNeuronInfo(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task GetNeuronInfoByIdOrSubaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task GetNodeProviderByCaller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> GetPendingProposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> GetProposalInfo(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task ListKnownNeurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNeurons(Models.ListNeurons arg0) + public async Task ListNeurons(ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task ListNodeProviders() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListProposals(Models.ListProposalInfo arg0) + public async Task ListProposals(ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(Models.ManageNeuron arg0) + public async Task ManageNeuron(ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(Models.NeuronId arg0, Models.NeuronId arg1) + public async Task TransferGtcNeuron(NeuronId arg0, NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(Models.UpdateNodeProvider arg0) + public async Task UpdateNodeProvider(UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } @@ -184,7 +184,7 @@ Type File: 'AccountIdentifier' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class AccountIdentifier { @@ -205,10 +205,10 @@ namespace Test.Models Type File: 'Action' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ActionTag))] public class Action @@ -378,7 +378,7 @@ Type File: 'AddHotKey' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class AddHotKey { @@ -400,9 +400,9 @@ Type File: 'AddOrRemoveNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class AddOrRemoveNodeProvider { @@ -424,7 +424,7 @@ Type File: 'Amount' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Amount { @@ -448,7 +448,7 @@ using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class ApproveGenesisKyc { @@ -470,7 +470,7 @@ Type File: 'Ballot' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Ballot { @@ -496,9 +496,9 @@ Type File: 'BallotInfo' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class BallotInfo { @@ -523,10 +523,10 @@ namespace Test.Models Type File: 'By' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ByTag))] public class By @@ -610,10 +610,10 @@ namespace Test.Models Type File: 'Change' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ChangeTag))] public class Change @@ -678,9 +678,9 @@ Type File: 'ClaimOrRefresh' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefresh { @@ -703,7 +703,7 @@ Type File: 'ClaimOrRefreshNeuronFromAccount' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class ClaimOrRefreshNeuronFromAccount { @@ -729,9 +729,9 @@ Type File: 'ClaimOrRefreshNeuronFromAccountResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefreshNeuronFromAccountResponse { @@ -753,9 +753,9 @@ Type File: 'ClaimOrRefreshResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefreshResponse { @@ -776,10 +776,10 @@ namespace Test.Models Type File: 'Command' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(CommandTag))] public class Command @@ -960,10 +960,10 @@ namespace Test.Models Type File: 'Command1' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Command1Tag))] public class Command1 @@ -1185,10 +1185,10 @@ namespace Test.Models Type File: 'Command2' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Command2Tag))] public class Command2 @@ -1331,9 +1331,9 @@ Type File: 'Configure' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Configure { @@ -1355,9 +1355,9 @@ Type File: 'Disburse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Disburse { @@ -1383,7 +1383,7 @@ Type File: 'DisburseResponse' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class DisburseResponse { @@ -1406,7 +1406,7 @@ Type File: 'DisburseToNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class DisburseToNeuron { @@ -1443,10 +1443,10 @@ namespace Test.Models Type File: 'DissolveState' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(DissolveStateTag))] public class DissolveState @@ -1512,7 +1512,7 @@ Type File: 'ExecuteNnsFunction' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ExecuteNnsFunction { @@ -1538,9 +1538,9 @@ Type File: 'Follow' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Follow { @@ -1566,9 +1566,9 @@ Type File: 'Followees' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Followees { @@ -1590,15 +1590,15 @@ Type File: 'Governance' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class Governance { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } [CandidName("wait_for_quiet_threshold_seconds")] public ulong WaitForQuietThresholdSeconds { get; set; } @@ -1622,18 +1622,18 @@ namespace Test.Models public ulong ShortVotingPeriodSeconds { get; set; } [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary Proposals { get; set; } [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary InFlightCommands { get; set; } [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary Neurons { get; set; } [CandidName("genesis_timestamp_seconds")] public ulong GenesisTimestampSeconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { this.DefaultFollowees = defaultFollowees; this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; @@ -1660,12 +1660,12 @@ Type File: 'GovernanceCachedMetrics' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class GovernanceCachedMetrics { [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary NotDissolvingNeuronsE8sBuckets { get; set; } [CandidName("garbage_collectable_neurons_count")] public ulong GarbageCollectableNeuronsCount { get; set; } @@ -1674,7 +1674,7 @@ namespace Test.Models public ulong NeuronsWithInvalidStakeCount { get; set; } [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary NotDissolvingNeuronsCountBuckets { get; set; } [CandidName("total_supply_icp")] public ulong TotalSupplyIcp { get; set; } @@ -1698,13 +1698,13 @@ namespace Test.Models public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary DissolvingNeuronsCountBuckets { get; set; } [CandidName("dissolving_neurons_count")] public ulong DissolvingNeuronsCount { get; set; } [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary DissolvingNeuronsE8sBuckets { get; set; } [CandidName("community_fund_total_staked_e8s")] public ulong CommunityFundTotalStakedE8s { get; set; } @@ -1712,7 +1712,7 @@ namespace Test.Models [CandidName("timestamp_seconds")] public ulong TimestampSeconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; @@ -1742,7 +1742,7 @@ Type File: 'GovernanceError' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class GovernanceError { @@ -1768,7 +1768,7 @@ Type File: 'IncreaseDissolveDelay' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class IncreaseDissolveDelay { @@ -1790,9 +1790,9 @@ Type File: 'KnownNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class KnownNeuron { @@ -1819,7 +1819,7 @@ Type File: 'KnownNeuronData' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class KnownNeuronData { @@ -1845,9 +1845,9 @@ Type File: 'ListKnownNeuronsResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListKnownNeuronsResponse { @@ -1870,7 +1870,7 @@ Type File: 'ListNeurons' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ListNeurons { @@ -1896,19 +1896,19 @@ Type File: 'ListNeuronsResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListNeuronsResponse { [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary NeuronInfos { get; set; } [CandidName("full_neurons")] public List FullNeurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { this.NeuronInfos = neuronInfos; this.FullNeurons = fullNeurons; @@ -1924,9 +1924,9 @@ Type File: 'ListNodeProvidersResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListNodeProvidersResponse { @@ -1949,9 +1949,9 @@ Type File: 'ListProposalInfo' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListProposalInfo { @@ -1989,9 +1989,9 @@ Type File: 'ListProposalInfoResponse' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListProposalInfoResponse { @@ -2013,9 +2013,9 @@ Type File: 'MakeProposalResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class MakeProposalResponse { @@ -2037,9 +2037,9 @@ Type File: 'ManageNeuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ManageNeuron { @@ -2069,9 +2069,9 @@ Type File: 'ManageNeuronResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ManageNeuronResponse { @@ -2093,9 +2093,9 @@ Type File: 'Merge' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Merge { @@ -2117,7 +2117,7 @@ Type File: 'MergeMaturity' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class MergeMaturity { @@ -2139,7 +2139,7 @@ Type File: 'MergeMaturityResponse' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class MergeMaturityResponse { @@ -2165,7 +2165,7 @@ Type File: 'Motion' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Motion { @@ -2187,7 +2187,7 @@ Type File: 'NetworkEconomics' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class NetworkEconomics { @@ -2237,10 +2237,10 @@ Type File: 'Neuron' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class Neuron { @@ -2284,7 +2284,7 @@ namespace Test.Models public OptionalValue DissolveState { get; set; } [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary Followees { get; set; } [CandidName("neuron_fees_e8s")] public ulong NeuronFeesE8s { get; set; } @@ -2295,7 +2295,7 @@ namespace Test.Models [CandidName("known_neuron_data")] public OptionalValue KnownNeuronData { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { this.Id = id; this.Controller = controller; @@ -2326,7 +2326,7 @@ Type File: 'NeuronId' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class NeuronId { @@ -2347,11 +2347,11 @@ namespace Test.Models Type File: 'NeuronIdOrSubaccount' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System.Collections.Generic; using System; -namespace Test.Models +namespace Test { [Variant(typeof(NeuronIdOrSubaccountTag))] public class NeuronIdOrSubaccount @@ -2416,9 +2416,9 @@ Type File: 'NeuronInFlightCommand' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class NeuronInFlightCommand { @@ -2444,10 +2444,10 @@ Type File: 'NeuronInfo' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class NeuronInfo { @@ -2507,7 +2507,7 @@ using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class NeuronStakeTransfer { @@ -2553,9 +2553,9 @@ Type File: 'NodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class NodeProvider { @@ -2580,10 +2580,10 @@ namespace Test.Models Type File: 'Operation' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(OperationTag))] public class Operation @@ -2734,9 +2734,9 @@ Type File: 'Proposal' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Proposal { @@ -2770,10 +2770,10 @@ Type File: 'ProposalData' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ProposalData { @@ -2784,7 +2784,7 @@ namespace Test.Models public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2816,7 +2816,7 @@ namespace Test.Models [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { this.Id = id; this.FailureReason = failureReason; @@ -2843,10 +2843,10 @@ Type File: 'ProposalInfo' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ProposalInfo { @@ -2863,7 +2863,7 @@ namespace Test.Models public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2898,7 +2898,7 @@ namespace Test.Models [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { this.Id = id; this.Status = status; @@ -2928,9 +2928,9 @@ Type File: 'RegisterVote' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RegisterVote { @@ -2957,7 +2957,7 @@ Type File: 'RemoveHotKey' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class RemoveHotKey { @@ -2978,10 +2978,10 @@ namespace Test.Models Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ResultTag))] public class Result @@ -3038,10 +3038,10 @@ namespace Test.Models Type File: 'Result1' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Result1Tag))] public class Result1 @@ -3105,10 +3105,10 @@ namespace Test.Models Type File: 'Result2' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Result2Tag))] public class Result2 @@ -3172,10 +3172,10 @@ namespace Test.Models Type File: 'Result3' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Result3Tag))] public class Result3 @@ -3239,10 +3239,10 @@ namespace Test.Models Type File: 'Result4' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Result4Tag))] public class Result4 @@ -3306,10 +3306,10 @@ namespace Test.Models Type File: 'Result5' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(Result5Tag))] public class Result5 @@ -3374,9 +3374,9 @@ Type File: 'RewardEvent' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardEvent { @@ -3409,10 +3409,10 @@ namespace Test.Models Type File: 'RewardMode' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(RewardModeTag))] public class RewardMode @@ -3477,9 +3477,9 @@ Type File: 'RewardNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardNodeProvider { @@ -3510,9 +3510,9 @@ Type File: 'RewardNodeProviders' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardNodeProviders { @@ -3538,9 +3538,9 @@ Type File: 'RewardToAccount' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardToAccount { @@ -3562,7 +3562,7 @@ Type File: 'RewardToNeuron' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class RewardToNeuron { @@ -3584,16 +3584,16 @@ Type File: 'SetDefaultFollowees' using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class SetDefaultFollowees { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { this.DefaultFollowees = defaultFollowees; } @@ -3608,7 +3608,7 @@ Type File: 'SetDissolveTimestamp' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class SetDissolveTimestamp { @@ -3631,7 +3631,7 @@ Type File: 'Spawn' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class Spawn { @@ -3661,9 +3661,9 @@ Type File: 'SpawnResponse' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class SpawnResponse { @@ -3685,7 +3685,7 @@ Type File: 'Split' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Split { @@ -3707,7 +3707,7 @@ Type File: 'Tally' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class Tally { @@ -3741,9 +3741,9 @@ Type File: 'UpdateNodeProvider' using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class UpdateNodeProvider { @@ -3765,7 +3765,7 @@ Type File: 'WaitForQuietState' using EdjCase.ICP.Candid.Mapping; -namespace Test.Models +namespace Test { public class WaitForQuietState { diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True.snap index 29c35245..2d7dbb65 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True.snap @@ -14,30 +14,30 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter? Converter { get; } + public CandidConverter Converter { get; } - public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) + public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) { this.Agent = agent; this.CanisterId = canisterId; this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task claim_gtc_neurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(Models.ClaimOrRefreshNeuronFromAccount arg0) + public async Task claim_or_refresh_neuron_from_account(ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetBuildMetadata() + public async Task _get_build_metadata() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_build_metadata", arg); @@ -45,38 +45,38 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task _get_full_neuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task _get_full_neuron_by_id_or_subaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task _get_monthly_node_provider_rewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task _get_network_economics_parameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetNeuronIds() + public async Task> _get_neuron_ids() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_ids", arg); @@ -84,116 +84,114 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task _get_neuron_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(Models.NeuronIdOrSubaccount arg0) + public async Task _get_neuron_info_by_id_or_subaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task _get_node_provider_by_caller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> _get_pending_proposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> _get_proposal_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); + return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task list_known_neurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNeurons(Models.ListNeurons arg0) + public async Task list_neurons(ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task list_node_providers() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ListProposals(Models.ListProposalInfo arg0) + public async Task list_proposals(ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(Models.ManageNeuron arg0) + public async Task manage_neuron(ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(Models.NeuronId arg0, Models.NeuronId arg1) + public async Task transfer_gtc_neuron(NeuronId arg0, NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(Models.UpdateNodeProvider arg0) + public async Task update_node_provider(UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } } } Type File: 'AccountIdentifier' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class AccountIdentifier { - [CandidName("hash")] - public List Hash { get; set; } + public List hash { get; set; } public AccountIdentifier(List hash) { - this.Hash = hash; + this.hash = hash; } public AccountIdentifier() @@ -205,10 +203,10 @@ namespace Test.Models Type File: 'Action' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ActionTag))] public class Action @@ -217,9 +215,9 @@ namespace Test.Models public ActionTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Action(ActionTag tag, object? value) + public Action(ActionTag tag, object value) { this.Tag = tag; this.Value = value; @@ -375,19 +373,17 @@ namespace Test.Models Type File: 'AddHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class AddHotKey { - [CandidName("new_hot_key")] - public OptionalValue NewHotKey { get; set; } + public OptionalValue new_hot_key { get; set; } public AddHotKey(OptionalValue newHotKey) { - this.NewHotKey = newHotKey; + this.new_hot_key = newHotKey; } public AddHotKey() @@ -398,20 +394,18 @@ namespace Test.Models Type File: 'AddOrRemoveNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class AddOrRemoveNodeProvider { - [CandidName("change")] - public OptionalValue Change { get; set; } + public OptionalValue change { get; set; } public AddOrRemoveNodeProvider(OptionalValue change) { - this.Change = change; + this.change = change; } public AddOrRemoveNodeProvider() @@ -422,18 +416,15 @@ namespace Test.Models Type File: 'Amount' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Amount { - [CandidName("e8s")] - public ulong E8s { get; set; } + public ulong e8s { get; set; } public Amount(ulong e8s) { - this.E8s = e8s; + this.e8s = e8s; } public Amount() @@ -444,20 +435,18 @@ namespace Test.Models Type File: 'ApproveGenesisKyc' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class ApproveGenesisKyc { - [CandidName("principals")] - public List Principals { get; set; } + public List principals { get; set; } public ApproveGenesisKyc(List principals) { - this.Principals = principals; + this.principals = principals; } public ApproveGenesisKyc() @@ -468,22 +457,18 @@ namespace Test.Models Type File: 'Ballot' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Ballot { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) { - this.Vote = vote; - this.VotingPower = votingPower; + this.vote = vote; + this.voting_power = votingPower; } public Ballot() @@ -494,24 +479,21 @@ namespace Test.Models Type File: 'BallotInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class BallotInfo { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) { - this.Vote = vote; - this.ProposalId = proposalId; + this.vote = vote; + this.proposal_id = proposalId; } public BallotInfo() @@ -523,10 +505,10 @@ namespace Test.Models Type File: 'By' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ByTag))] public class By @@ -535,9 +517,9 @@ namespace Test.Models public ByTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public By(ByTag tag, object? value) + public By(ByTag tag, object value) { this.Tag = tag; this.Value = value; @@ -610,10 +592,10 @@ namespace Test.Models Type File: 'Change' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ChangeTag))] public class Change @@ -622,9 +604,9 @@ namespace Test.Models public ChangeTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Change(ChangeTag tag, object? value) + public Change(ChangeTag tag, object value) { this.Tag = tag; this.Value = value; @@ -676,20 +658,18 @@ namespace Test.Models Type File: 'ClaimOrRefresh' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefresh { - [CandidName("by")] - public OptionalValue By { get; set; } + public OptionalValue by { get; set; } public ClaimOrRefresh(OptionalValue by) { - this.By = by; + this.by = by; } public ClaimOrRefresh() @@ -700,23 +680,20 @@ namespace Test.Models Type File: 'ClaimOrRefreshNeuronFromAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class ClaimOrRefreshNeuronFromAccount { - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) { - this.Controller = controller; - this.Memo = memo; + this.controller = controller; + this.memo = memo; } public ClaimOrRefreshNeuronFromAccount() @@ -727,20 +704,18 @@ namespace Test.Models Type File: 'ClaimOrRefreshNeuronFromAccountResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefreshNeuronFromAccountResponse { - [CandidName("result")] - public OptionalValue Result { get; set; } + public OptionalValue result { get; set; } - public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) + public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) { - this.Result = result; + this.result = result; } public ClaimOrRefreshNeuronFromAccountResponse() @@ -751,20 +726,18 @@ namespace Test.Models Type File: 'ClaimOrRefreshResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ClaimOrRefreshResponse { - [CandidName("refreshed_neuron_id")] - public OptionalValue RefreshedNeuronId { get; set; } + public OptionalValue refreshed_neuron_id { get; set; } public ClaimOrRefreshResponse(OptionalValue refreshedNeuronId) { - this.RefreshedNeuronId = refreshedNeuronId; + this.refreshed_neuron_id = refreshedNeuronId; } public ClaimOrRefreshResponse() @@ -776,10 +749,10 @@ namespace Test.Models Type File: 'Command' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(CommandTag))] public class Command @@ -788,9 +761,9 @@ namespace Test.Models public CommandTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command(CommandTag tag, object? value) + public Command(CommandTag tag, object value) { this.Tag = tag; this.Value = value; @@ -957,166 +930,166 @@ namespace Test.Models } } -Type File: 'Command1' +Type File: 'Command_1' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Command1Tag))] - public class Command1 + [Variant(typeof(Command_1Tag))] + public class Command_1 { [VariantTagProperty()] - public Command1Tag Tag { get; set; } + public Command_1Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command1(Command1Tag tag, object? value) + public Command_1(Command_1Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Command1() + protected Command_1() { } - public static Command1 Error(GovernanceError info) + public static Command_1 Error(GovernanceError info) { - return new Command1(Command1Tag.Error, info); + return new Command_1(Command_1Tag.Error, info); } - public static Command1 Spawn(SpawnResponse info) + public static Command_1 Spawn(SpawnResponse info) { - return new Command1(Command1Tag.Spawn, info); + return new Command_1(Command_1Tag.Spawn, info); } - public static Command1 Split(SpawnResponse info) + public static Command_1 Split(SpawnResponse info) { - return new Command1(Command1Tag.Split, info); + return new Command_1(Command_1Tag.Split, info); } - public static Command1 Follow(Command1.FollowInfo info) + public static Command_1 Follow(Command_1.FollowInfo info) { - return new Command1(Command1Tag.Follow, info); + return new Command_1(Command_1Tag.Follow, info); } - public static Command1 ClaimOrRefresh(ClaimOrRefreshResponse info) + public static Command_1 ClaimOrRefresh(ClaimOrRefreshResponse info) { - return new Command1(Command1Tag.ClaimOrRefresh, info); + return new Command_1(Command_1Tag.ClaimOrRefresh, info); } - public static Command1 Configure(Command1.ConfigureInfo info) + public static Command_1 Configure(Command_1.ConfigureInfo info) { - return new Command1(Command1Tag.Configure, info); + return new Command_1(Command_1Tag.Configure, info); } - public static Command1 RegisterVote(Command1.RegisterVoteInfo info) + public static Command_1 RegisterVote(Command_1.RegisterVoteInfo info) { - return new Command1(Command1Tag.RegisterVote, info); + return new Command_1(Command_1Tag.RegisterVote, info); } - public static Command1 Merge(Command1.MergeInfo info) + public static Command_1 Merge(Command_1.MergeInfo info) { - return new Command1(Command1Tag.Merge, info); + return new Command_1(Command_1Tag.Merge, info); } - public static Command1 DisburseToNeuron(SpawnResponse info) + public static Command_1 DisburseToNeuron(SpawnResponse info) { - return new Command1(Command1Tag.DisburseToNeuron, info); + return new Command_1(Command_1Tag.DisburseToNeuron, info); } - public static Command1 MakeProposal(MakeProposalResponse info) + public static Command_1 MakeProposal(MakeProposalResponse info) { - return new Command1(Command1Tag.MakeProposal, info); + return new Command_1(Command_1Tag.MakeProposal, info); } - public static Command1 MergeMaturity(MergeMaturityResponse info) + public static Command_1 MergeMaturity(MergeMaturityResponse info) { - return new Command1(Command1Tag.MergeMaturity, info); + return new Command_1(Command_1Tag.MergeMaturity, info); } - public static Command1 Disburse(DisburseResponse info) + public static Command_1 Disburse(DisburseResponse info) { - return new Command1(Command1Tag.Disburse, info); + return new Command_1(Command_1Tag.Disburse, info); } public GovernanceError AsError() { - this.ValidateTag(Command1Tag.Error); + this.ValidateTag(Command_1Tag.Error); return (GovernanceError)this.Value!; } public SpawnResponse AsSpawn() { - this.ValidateTag(Command1Tag.Spawn); + this.ValidateTag(Command_1Tag.Spawn); return (SpawnResponse)this.Value!; } public SpawnResponse AsSplit() { - this.ValidateTag(Command1Tag.Split); + this.ValidateTag(Command_1Tag.Split); return (SpawnResponse)this.Value!; } - public Command1.FollowInfo AsFollow() + public Command_1.FollowInfo AsFollow() { - this.ValidateTag(Command1Tag.Follow); - return (Command1.FollowInfo)this.Value!; + this.ValidateTag(Command_1Tag.Follow); + return (Command_1.FollowInfo)this.Value!; } public ClaimOrRefreshResponse AsClaimOrRefresh() { - this.ValidateTag(Command1Tag.ClaimOrRefresh); + this.ValidateTag(Command_1Tag.ClaimOrRefresh); return (ClaimOrRefreshResponse)this.Value!; } - public Command1.ConfigureInfo AsConfigure() + public Command_1.ConfigureInfo AsConfigure() { - this.ValidateTag(Command1Tag.Configure); - return (Command1.ConfigureInfo)this.Value!; + this.ValidateTag(Command_1Tag.Configure); + return (Command_1.ConfigureInfo)this.Value!; } - public Command1.RegisterVoteInfo AsRegisterVote() + public Command_1.RegisterVoteInfo AsRegisterVote() { - this.ValidateTag(Command1Tag.RegisterVote); - return (Command1.RegisterVoteInfo)this.Value!; + this.ValidateTag(Command_1Tag.RegisterVote); + return (Command_1.RegisterVoteInfo)this.Value!; } - public Command1.MergeInfo AsMerge() + public Command_1.MergeInfo AsMerge() { - this.ValidateTag(Command1Tag.Merge); - return (Command1.MergeInfo)this.Value!; + this.ValidateTag(Command_1Tag.Merge); + return (Command_1.MergeInfo)this.Value!; } public SpawnResponse AsDisburseToNeuron() { - this.ValidateTag(Command1Tag.DisburseToNeuron); + this.ValidateTag(Command_1Tag.DisburseToNeuron); return (SpawnResponse)this.Value!; } public MakeProposalResponse AsMakeProposal() { - this.ValidateTag(Command1Tag.MakeProposal); + this.ValidateTag(Command_1Tag.MakeProposal); return (MakeProposalResponse)this.Value!; } public MergeMaturityResponse AsMergeMaturity() { - this.ValidateTag(Command1Tag.MergeMaturity); + this.ValidateTag(Command_1Tag.MergeMaturity); return (MergeMaturityResponse)this.Value!; } public DisburseResponse AsDisburse() { - this.ValidateTag(Command1Tag.Disburse); + this.ValidateTag(Command_1Tag.Disburse); return (DisburseResponse)this.Value!; } - private void ValidateTag(Command1Tag tag) + private void ValidateTag(Command_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1153,7 +1126,7 @@ namespace Test.Models } } - public enum Command1Tag + public enum Command_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -1161,15 +1134,15 @@ namespace Test.Models Spawn, [VariantOptionType(typeof(SpawnResponse))] Split, - [VariantOptionType(typeof(Command1.FollowInfo))] + [VariantOptionType(typeof(Command_1.FollowInfo))] Follow, [VariantOptionType(typeof(ClaimOrRefreshResponse))] ClaimOrRefresh, - [VariantOptionType(typeof(Command1.ConfigureInfo))] + [VariantOptionType(typeof(Command_1.ConfigureInfo))] Configure, - [VariantOptionType(typeof(Command1.RegisterVoteInfo))] + [VariantOptionType(typeof(Command_1.RegisterVoteInfo))] RegisterVote, - [VariantOptionType(typeof(Command1.MergeInfo))] + [VariantOptionType(typeof(Command_1.MergeInfo))] Merge, [VariantOptionType(typeof(SpawnResponse))] DisburseToNeuron, @@ -1182,122 +1155,122 @@ namespace Test.Models } } -Type File: 'Command2' +Type File: 'Command_2' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Command2Tag))] - public class Command2 + [Variant(typeof(Command_2Tag))] + public class Command_2 { [VariantTagProperty()] - public Command2Tag Tag { get; set; } + public Command_2Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Command2(Command2Tag tag, object? value) + public Command_2(Command_2Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Command2() + protected Command_2() { } - public static Command2 Spawn(Spawn info) + public static Command_2 Spawn(Spawn info) { - return new Command2(Command2Tag.Spawn, info); + return new Command_2(Command_2Tag.Spawn, info); } - public static Command2 Split(Split info) + public static Command_2 Split(Split info) { - return new Command2(Command2Tag.Split, info); + return new Command_2(Command_2Tag.Split, info); } - public static Command2 Configure(Configure info) + public static Command_2 Configure(Configure info) { - return new Command2(Command2Tag.Configure, info); + return new Command_2(Command_2Tag.Configure, info); } - public static Command2 Merge(Merge info) + public static Command_2 Merge(Merge info) { - return new Command2(Command2Tag.Merge, info); + return new Command_2(Command_2Tag.Merge, info); } - public static Command2 DisburseToNeuron(DisburseToNeuron info) + public static Command_2 DisburseToNeuron(DisburseToNeuron info) { - return new Command2(Command2Tag.DisburseToNeuron, info); + return new Command_2(Command_2Tag.DisburseToNeuron, info); } - public static Command2 ClaimOrRefreshNeuron(ClaimOrRefresh info) + public static Command_2 ClaimOrRefreshNeuron(ClaimOrRefresh info) { - return new Command2(Command2Tag.ClaimOrRefreshNeuron, info); + return new Command_2(Command_2Tag.ClaimOrRefreshNeuron, info); } - public static Command2 MergeMaturity(MergeMaturity info) + public static Command_2 MergeMaturity(MergeMaturity info) { - return new Command2(Command2Tag.MergeMaturity, info); + return new Command_2(Command_2Tag.MergeMaturity, info); } - public static Command2 Disburse(Disburse info) + public static Command_2 Disburse(Disburse info) { - return new Command2(Command2Tag.Disburse, info); + return new Command_2(Command_2Tag.Disburse, info); } public Spawn AsSpawn() { - this.ValidateTag(Command2Tag.Spawn); + this.ValidateTag(Command_2Tag.Spawn); return (Spawn)this.Value!; } public Split AsSplit() { - this.ValidateTag(Command2Tag.Split); + this.ValidateTag(Command_2Tag.Split); return (Split)this.Value!; } public Configure AsConfigure() { - this.ValidateTag(Command2Tag.Configure); + this.ValidateTag(Command_2Tag.Configure); return (Configure)this.Value!; } public Merge AsMerge() { - this.ValidateTag(Command2Tag.Merge); + this.ValidateTag(Command_2Tag.Merge); return (Merge)this.Value!; } public DisburseToNeuron AsDisburseToNeuron() { - this.ValidateTag(Command2Tag.DisburseToNeuron); + this.ValidateTag(Command_2Tag.DisburseToNeuron); return (DisburseToNeuron)this.Value!; } public ClaimOrRefresh AsClaimOrRefreshNeuron() { - this.ValidateTag(Command2Tag.ClaimOrRefreshNeuron); + this.ValidateTag(Command_2Tag.ClaimOrRefreshNeuron); return (ClaimOrRefresh)this.Value!; } public MergeMaturity AsMergeMaturity() { - this.ValidateTag(Command2Tag.MergeMaturity); + this.ValidateTag(Command_2Tag.MergeMaturity); return (MergeMaturity)this.Value!; } public Disburse AsDisburse() { - this.ValidateTag(Command2Tag.Disburse); + this.ValidateTag(Command_2Tag.Disburse); return (Disburse)this.Value!; } - private void ValidateTag(Command2Tag tag) + private void ValidateTag(Command_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1306,7 +1279,7 @@ namespace Test.Models } } - public enum Command2Tag + public enum Command_2Tag { [VariantOptionType(typeof(Spawn))] Spawn, @@ -1329,20 +1302,18 @@ namespace Test.Models Type File: 'Configure' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Configure { - [CandidName("operation")] - public OptionalValue Operation { get; set; } + public OptionalValue operation { get; set; } public Configure(OptionalValue operation) { - this.Operation = operation; + this.operation = operation; } public Configure() @@ -1353,24 +1324,21 @@ namespace Test.Models Type File: 'Disburse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Disburse { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } - [CandidName("amount")] - public OptionalValue Amount { get; set; } + public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) { - this.ToAccount = toAccount; - this.Amount = amount; + this.to_account = toAccount; + this.amount = amount; } public Disburse() @@ -1381,18 +1349,15 @@ namespace Test.Models Type File: 'DisburseResponse' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class DisburseResponse { - [CandidName("transfer_block_height")] - public ulong TransferBlockHeight { get; set; } + public ulong transfer_block_height { get; set; } public DisburseResponse(ulong transferBlockHeight) { - this.TransferBlockHeight = transferBlockHeight; + this.transfer_block_height = transferBlockHeight; } public DisburseResponse() @@ -1403,35 +1368,29 @@ namespace Test.Models Type File: 'DisburseToNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class DisburseToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public ulong Nonce { get; set; } + public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.KycVerified = kycVerified; - this.AmountE8s = amountE8s; - this.NewController = newController; - this.Nonce = nonce; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.kyc_verified = kycVerified; + this.amount_e8s = amountE8s; + this.new_controller = newController; + this.nonce = nonce; } public DisburseToNeuron() @@ -1443,10 +1402,10 @@ namespace Test.Models Type File: 'DissolveState' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(DissolveStateTag))] public class DissolveState @@ -1455,9 +1414,9 @@ namespace Test.Models public DissolveStateTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public DissolveState(DissolveStateTag tag, object? value) + public DissolveState(DissolveStateTag tag, object value) { this.Tag = tag; this.Value = value; @@ -1509,23 +1468,20 @@ namespace Test.Models Type File: 'ExecuteNnsFunction' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ExecuteNnsFunction { - [CandidName("nns_function")] - public int NnsFunction { get; set; } + public int nns_function { get; set; } - [CandidName("payload")] - public List Payload { get; set; } + public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) { - this.NnsFunction = nnsFunction; - this.Payload = payload; + this.nns_function = nnsFunction; + this.payload = payload; } public ExecuteNnsFunction() @@ -1536,24 +1492,21 @@ namespace Test.Models Type File: 'Follow' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Follow { - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("followees")] - public List Followees { get; set; } + public List followees { get; set; } public Follow(int topic, List followees) { - this.Topic = topic; - this.Followees = followees; + this.topic = topic; + this.followees = followees; } public Follow() @@ -1564,20 +1517,18 @@ namespace Test.Models Type File: 'Followees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Followees { - [CandidName("followees")] - public List Followees_ { get; set; } + public List followees { get; set; } public Followees(List followees) { - this.Followees_ = followees; + this.followees = followees; } public Followees() @@ -1588,65 +1539,52 @@ namespace Test.Models Type File: 'Governance' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class Governance { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - [CandidName("wait_for_quiet_threshold_seconds")] - public ulong WaitForQuietThresholdSeconds { get; set; } + public ulong wait_for_quiet_threshold_seconds { get; set; } - [CandidName("metrics")] - public OptionalValue Metrics { get; set; } + public OptionalValue metrics { get; set; } - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } - [CandidName("economics")] - public OptionalValue Economics { get; set; } + public OptionalValue economics { get; set; } - [CandidName("latest_reward_event")] - public OptionalValue LatestRewardEvent { get; set; } + public OptionalValue latest_reward_event { get; set; } - [CandidName("to_claim_transfers")] - public List ToClaimTransfers { get; set; } + public List to_claim_transfers { get; set; } - [CandidName("short_voting_period_seconds")] - public ulong ShortVotingPeriodSeconds { get; set; } + public ulong short_voting_period_seconds { get; set; } - [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary proposals { get; set; } - [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary in_flight_commands { get; set; } - [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary neurons { get; set; } - [CandidName("genesis_timestamp_seconds")] - public ulong GenesisTimestampSeconds { get; set; } + public ulong genesis_timestamp_seconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { - this.DefaultFollowees = defaultFollowees; - this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; - this.Metrics = metrics; - this.NodeProviders = nodeProviders; - this.Economics = economics; - this.LatestRewardEvent = latestRewardEvent; - this.ToClaimTransfers = toClaimTransfers; - this.ShortVotingPeriodSeconds = shortVotingPeriodSeconds; - this.Proposals = proposals; - this.InFlightCommands = inFlightCommands; - this.Neurons = neurons; - this.GenesisTimestampSeconds = genesisTimestampSeconds; + this.default_followees = defaultFollowees; + this.wait_for_quiet_threshold_seconds = waitForQuietThresholdSeconds; + this.metrics = metrics; + this.node_providers = nodeProviders; + this.economics = economics; + this.latest_reward_event = latestRewardEvent; + this.to_claim_transfers = toClaimTransfers; + this.short_voting_period_seconds = shortVotingPeriodSeconds; + this.proposals = proposals; + this.in_flight_commands = inFlightCommands; + this.neurons = neurons; + this.genesis_timestamp_seconds = genesisTimestampSeconds; } public Governance() @@ -1657,79 +1595,62 @@ namespace Test.Models Type File: 'GovernanceCachedMetrics' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class GovernanceCachedMetrics { - [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - [CandidName("garbage_collectable_neurons_count")] - public ulong GarbageCollectableNeuronsCount { get; set; } + public ulong garbage_collectable_neurons_count { get; set; } - [CandidName("neurons_with_invalid_stake_count")] - public ulong NeuronsWithInvalidStakeCount { get; set; } + public ulong neurons_with_invalid_stake_count { get; set; } - [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary not_dissolving_neurons_count_buckets { get; set; } - [CandidName("total_supply_icp")] - public ulong TotalSupplyIcp { get; set; } + public ulong total_supply_icp { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_count")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayCount { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - [CandidName("dissolved_neurons_count")] - public ulong DissolvedNeuronsCount { get; set; } + public ulong dissolved_neurons_count { get; set; } - [CandidName("total_staked_e8s")] - public ulong TotalStakedE8s { get; set; } + public ulong total_staked_e8s { get; set; } - [CandidName("not_dissolving_neurons_count")] - public ulong NotDissolvingNeuronsCount { get; set; } + public ulong not_dissolving_neurons_count { get; set; } - [CandidName("dissolved_neurons_e8s")] - public ulong DissolvedNeuronsE8s { get; set; } + public ulong dissolved_neurons_e8s { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_e8s")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary dissolving_neurons_count_buckets { get; set; } - [CandidName("dissolving_neurons_count")] - public ulong DissolvingNeuronsCount { get; set; } + public ulong dissolving_neurons_count { get; set; } - [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary dissolving_neurons_e8s_buckets { get; set; } - [CandidName("community_fund_total_staked_e8s")] - public ulong CommunityFundTotalStakedE8s { get; set; } + public ulong community_fund_total_staked_e8s { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { - this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; - this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; - this.NeuronsWithInvalidStakeCount = neuronsWithInvalidStakeCount; - this.NotDissolvingNeuronsCountBuckets = notDissolvingNeuronsCountBuckets; - this.TotalSupplyIcp = totalSupplyIcp; - this.NeuronsWithLessThan6MonthsDissolveDelayCount = neuronsWithLessThan6MonthsDissolveDelayCount; - this.DissolvedNeuronsCount = dissolvedNeuronsCount; - this.TotalStakedE8s = totalStakedE8s; - this.NotDissolvingNeuronsCount = notDissolvingNeuronsCount; - this.DissolvedNeuronsE8s = dissolvedNeuronsE8s; - this.NeuronsWithLessThan6MonthsDissolveDelayE8s = neuronsWithLessThan6MonthsDissolveDelayE8s; - this.DissolvingNeuronsCountBuckets = dissolvingNeuronsCountBuckets; - this.DissolvingNeuronsCount = dissolvingNeuronsCount; - this.DissolvingNeuronsE8sBuckets = dissolvingNeuronsE8sBuckets; - this.CommunityFundTotalStakedE8s = communityFundTotalStakedE8s; - this.TimestampSeconds = timestampSeconds; + this.not_dissolving_neurons_e8s_buckets = notDissolvingNeuronsE8sBuckets; + this.garbage_collectable_neurons_count = garbageCollectableNeuronsCount; + this.neurons_with_invalid_stake_count = neuronsWithInvalidStakeCount; + this.not_dissolving_neurons_count_buckets = notDissolvingNeuronsCountBuckets; + this.total_supply_icp = totalSupplyIcp; + this.neurons_with_less_than_6_months_dissolve_delay_count = neuronsWithLessThan6MonthsDissolveDelayCount; + this.dissolved_neurons_count = dissolvedNeuronsCount; + this.total_staked_e8s = totalStakedE8s; + this.not_dissolving_neurons_count = notDissolvingNeuronsCount; + this.dissolved_neurons_e8s = dissolvedNeuronsE8s; + this.neurons_with_less_than_6_months_dissolve_delay_e8s = neuronsWithLessThan6MonthsDissolveDelayE8s; + this.dissolving_neurons_count_buckets = dissolvingNeuronsCountBuckets; + this.dissolving_neurons_count = dissolvingNeuronsCount; + this.dissolving_neurons_e8s_buckets = dissolvingNeuronsE8sBuckets; + this.community_fund_total_staked_e8s = communityFundTotalStakedE8s; + this.timestamp_seconds = timestampSeconds; } public GovernanceCachedMetrics() @@ -1740,22 +1661,18 @@ namespace Test.Models Type File: 'GovernanceError' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class GovernanceError { - [CandidName("error_message")] - public string ErrorMessage { get; set; } + public string error_message { get; set; } - [CandidName("error_type")] - public int ErrorType { get; set; } + public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) { - this.ErrorMessage = errorMessage; - this.ErrorType = errorType; + this.error_message = errorMessage; + this.error_type = errorType; } public GovernanceError() @@ -1766,18 +1683,15 @@ namespace Test.Models Type File: 'IncreaseDissolveDelay' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class IncreaseDissolveDelay { - [CandidName("additional_dissolve_delay_seconds")] - public uint AdditionalDissolveDelaySeconds { get; set; } + public uint additional_dissolve_delay_seconds { get; set; } public IncreaseDissolveDelay(uint additionalDissolveDelaySeconds) { - this.AdditionalDissolveDelaySeconds = additionalDissolveDelaySeconds; + this.additional_dissolve_delay_seconds = additionalDissolveDelaySeconds; } public IncreaseDissolveDelay() @@ -1788,24 +1702,21 @@ namespace Test.Models Type File: 'KnownNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class KnownNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) { - this.Id = id; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.known_neuron_data = knownNeuronData; } public KnownNeuron() @@ -1816,23 +1727,20 @@ namespace Test.Models Type File: 'KnownNeuronData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class KnownNeuronData { - [CandidName("name")] - public string Name { get; set; } + public string name { get; set; } - [CandidName("description")] - public OptionalValue Description { get; set; } + public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) { - this.Name = name; - this.Description = description; + this.name = name; + this.description = description; } public KnownNeuronData() @@ -1843,20 +1751,18 @@ namespace Test.Models Type File: 'ListKnownNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListKnownNeuronsResponse { - [CandidName("known_neurons")] - public List KnownNeurons { get; set; } + public List known_neurons { get; set; } public ListKnownNeuronsResponse(List knownNeurons) { - this.KnownNeurons = knownNeurons; + this.known_neurons = knownNeurons; } public ListKnownNeuronsResponse() @@ -1867,23 +1773,20 @@ namespace Test.Models Type File: 'ListNeurons' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ListNeurons { - [CandidName("neuron_ids")] - public List NeuronIds { get; set; } + public List neuron_ids { get; set; } - [CandidName("include_neurons_readable_by_caller")] - public bool IncludeNeuronsReadableByCaller { get; set; } + public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) { - this.NeuronIds = neuronIds; - this.IncludeNeuronsReadableByCaller = includeNeuronsReadableByCaller; + this.neuron_ids = neuronIds; + this.include_neurons_readable_by_caller = includeNeuronsReadableByCaller; } public ListNeurons() @@ -1894,24 +1797,21 @@ namespace Test.Models Type File: 'ListNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListNeuronsResponse { - [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary neuron_infos { get; set; } - [CandidName("full_neurons")] - public List FullNeurons { get; set; } + public List full_neurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { - this.NeuronInfos = neuronInfos; - this.FullNeurons = fullNeurons; + this.neuron_infos = neuronInfos; + this.full_neurons = fullNeurons; } public ListNeuronsResponse() @@ -1922,20 +1822,18 @@ namespace Test.Models Type File: 'ListNodeProvidersResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListNodeProvidersResponse { - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } public ListNodeProvidersResponse(List nodeProviders) { - this.NodeProviders = nodeProviders; + this.node_providers = nodeProviders; } public ListNodeProvidersResponse() @@ -1946,37 +1844,31 @@ namespace Test.Models Type File: 'ListProposalInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListProposalInfo { - [CandidName("include_reward_status")] - public List IncludeRewardStatus { get; set; } + public List include_reward_status { get; set; } - [CandidName("before_proposal")] - public OptionalValue BeforeProposal { get; set; } + public OptionalValue before_proposal { get; set; } - [CandidName("limit")] - public uint Limit { get; set; } + public uint limit { get; set; } - [CandidName("exclude_topic")] - public List ExcludeTopic { get; set; } + public List exclude_topic { get; set; } - [CandidName("include_status")] - public List IncludeStatus { get; set; } + public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) { - this.IncludeRewardStatus = includeRewardStatus; - this.BeforeProposal = beforeProposal; - this.Limit = limit; - this.ExcludeTopic = excludeTopic; - this.IncludeStatus = includeStatus; + this.include_reward_status = includeRewardStatus; + this.before_proposal = beforeProposal; + this.limit = limit; + this.exclude_topic = excludeTopic; + this.include_status = includeStatus; } public ListProposalInfo() @@ -1987,20 +1879,18 @@ namespace Test.Models Type File: 'ListProposalInfoResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ListProposalInfoResponse { - [CandidName("proposal_info")] - public List ProposalInfo { get; set; } + public List proposal_info { get; set; } public ListProposalInfoResponse(List proposalInfo) { - this.ProposalInfo = proposalInfo; + this.proposal_info = proposalInfo; } public ListProposalInfoResponse() @@ -2011,20 +1901,18 @@ namespace Test.Models Type File: 'MakeProposalResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class MakeProposalResponse { - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public MakeProposalResponse(OptionalValue proposalId) { - this.ProposalId = proposalId; + this.proposal_id = proposalId; } public MakeProposalResponse() @@ -2035,28 +1923,24 @@ namespace Test.Models Type File: 'ManageNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ManageNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("neuron_id_or_subaccount")] - public OptionalValue NeuronIdOrSubaccount { get; set; } + public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) { - this.Id = id; - this.Command = command; - this.NeuronIdOrSubaccount = neuronIdOrSubaccount; + this.id = id; + this.command = command; + this.neuron_id_or_subaccount = neuronIdOrSubaccount; } public ManageNeuron() @@ -2067,20 +1951,18 @@ namespace Test.Models Type File: 'ManageNeuronResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class ManageNeuronResponse { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - public ManageNeuronResponse(OptionalValue command) + public ManageNeuronResponse(OptionalValue command) { - this.Command = command; + this.command = command; } public ManageNeuronResponse() @@ -2091,20 +1973,18 @@ namespace Test.Models Type File: 'Merge' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Merge { - [CandidName("source_neuron_id")] - public OptionalValue SourceNeuronId { get; set; } + public OptionalValue source_neuron_id { get; set; } public Merge(OptionalValue sourceNeuronId) { - this.SourceNeuronId = sourceNeuronId; + this.source_neuron_id = sourceNeuronId; } public Merge() @@ -2115,18 +1995,15 @@ namespace Test.Models Type File: 'MergeMaturity' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class MergeMaturity { - [CandidName("percentage_to_merge")] - public uint PercentageToMerge { get; set; } + public uint percentage_to_merge { get; set; } public MergeMaturity(uint percentageToMerge) { - this.PercentageToMerge = percentageToMerge; + this.percentage_to_merge = percentageToMerge; } public MergeMaturity() @@ -2137,22 +2014,18 @@ namespace Test.Models Type File: 'MergeMaturityResponse' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class MergeMaturityResponse { - [CandidName("merged_maturity_e8s")] - public ulong MergedMaturityE8s { get; set; } + public ulong merged_maturity_e8s { get; set; } - [CandidName("new_stake_e8s")] - public ulong NewStakeE8s { get; set; } + public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) { - this.MergedMaturityE8s = mergedMaturityE8s; - this.NewStakeE8s = newStakeE8s; + this.merged_maturity_e8s = mergedMaturityE8s; + this.new_stake_e8s = newStakeE8s; } public MergeMaturityResponse() @@ -2163,18 +2036,15 @@ namespace Test.Models Type File: 'Motion' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Motion { - [CandidName("motion_text")] - public string MotionText { get; set; } + public string motion_text { get; set; } public Motion(string motionText) { - this.MotionText = motionText; + this.motion_text = motionText; } public Motion() @@ -2185,46 +2055,36 @@ namespace Test.Models Type File: 'NetworkEconomics' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class NetworkEconomics { - [CandidName("neuron_minimum_stake_e8s")] - public ulong NeuronMinimumStakeE8s { get; set; } + public ulong neuron_minimum_stake_e8s { get; set; } - [CandidName("max_proposals_to_keep_per_topic")] - public uint MaxProposalsToKeepPerTopic { get; set; } + public uint max_proposals_to_keep_per_topic { get; set; } - [CandidName("neuron_management_fee_per_proposal_e8s")] - public ulong NeuronManagementFeePerProposalE8s { get; set; } + public ulong neuron_management_fee_per_proposal_e8s { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("transaction_fee_e8s")] - public ulong TransactionFeeE8s { get; set; } + public ulong transaction_fee_e8s { get; set; } - [CandidName("neuron_spawn_dissolve_delay_seconds")] - public ulong NeuronSpawnDissolveDelaySeconds { get; set; } + public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - [CandidName("minimum_icp_xdr_rate")] - public ulong MinimumIcpXdrRate { get; set; } + public ulong minimum_icp_xdr_rate { get; set; } - [CandidName("maximum_node_provider_rewards_e8s")] - public ulong MaximumNodeProviderRewardsE8s { get; set; } + public ulong maximum_node_provider_rewards_e8s { get; set; } public NetworkEconomics(ulong neuronMinimumStakeE8s, uint maxProposalsToKeepPerTopic, ulong neuronManagementFeePerProposalE8s, ulong rejectCostE8s, ulong transactionFeeE8s, ulong neuronSpawnDissolveDelaySeconds, ulong minimumIcpXdrRate, ulong maximumNodeProviderRewardsE8s) { - this.NeuronMinimumStakeE8s = neuronMinimumStakeE8s; - this.MaxProposalsToKeepPerTopic = maxProposalsToKeepPerTopic; - this.NeuronManagementFeePerProposalE8s = neuronManagementFeePerProposalE8s; - this.RejectCostE8s = rejectCostE8s; - this.TransactionFeeE8s = transactionFeeE8s; - this.NeuronSpawnDissolveDelaySeconds = neuronSpawnDissolveDelaySeconds; - this.MinimumIcpXdrRate = minimumIcpXdrRate; - this.MaximumNodeProviderRewardsE8s = maximumNodeProviderRewardsE8s; + this.neuron_minimum_stake_e8s = neuronMinimumStakeE8s; + this.max_proposals_to_keep_per_topic = maxProposalsToKeepPerTopic; + this.neuron_management_fee_per_proposal_e8s = neuronManagementFeePerProposalE8s; + this.reject_cost_e8s = rejectCostE8s; + this.transaction_fee_e8s = transactionFeeE8s; + this.neuron_spawn_dissolve_delay_seconds = neuronSpawnDissolveDelaySeconds; + this.minimum_icp_xdr_rate = minimumIcpXdrRate; + this.maximum_node_provider_rewards_e8s = maximumNodeProviderRewardsE8s; } public NetworkEconomics() @@ -2235,85 +2095,67 @@ namespace Test.Models Type File: 'Neuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class Neuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("not_for_profit")] - public bool NotForProfit { get; set; } + public bool not_for_profit { get; set; } - [CandidName("maturity_e8s_equivalent")] - public ulong MaturityE8sEquivalent { get; set; } + public ulong maturity_e8s_equivalent { get; set; } - [CandidName("cached_neuron_stake_e8s")] - public ulong CachedNeuronStakeE8s { get; set; } + public ulong cached_neuron_stake_e8s { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("aging_since_timestamp_seconds")] - public ulong AgingSinceTimestampSeconds { get; set; } + public ulong aging_since_timestamp_seconds { get; set; } - [CandidName("hot_keys")] - public List HotKeys { get; set; } + public List hot_keys { get; set; } - [CandidName("account")] - public List Account { get; set; } + public List account { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("dissolve_state")] - public OptionalValue DissolveState { get; set; } + public OptionalValue dissolve_state { get; set; } - [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary followees { get; set; } - [CandidName("neuron_fees_e8s")] - public ulong NeuronFeesE8s { get; set; } + public ulong neuron_fees_e8s { get; set; } - [CandidName("transfer")] - public OptionalValue Transfer { get; set; } + public OptionalValue transfer { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { - this.Id = id; - this.Controller = controller; - this.RecentBallots = recentBallots; - this.KycVerified = kycVerified; - this.NotForProfit = notForProfit; - this.MaturityE8sEquivalent = maturityE8sEquivalent; - this.CachedNeuronStakeE8s = cachedNeuronStakeE8s; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.AgingSinceTimestampSeconds = agingSinceTimestampSeconds; - this.HotKeys = hotKeys; - this.Account = account; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.DissolveState = dissolveState; - this.Followees = followees; - this.NeuronFeesE8s = neuronFeesE8s; - this.Transfer = transfer; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.controller = controller; + this.recent_ballots = recentBallots; + this.kyc_verified = kycVerified; + this.not_for_profit = notForProfit; + this.maturity_e8s_equivalent = maturityE8sEquivalent; + this.cached_neuron_stake_e8s = cachedNeuronStakeE8s; + this.created_timestamp_seconds = createdTimestampSeconds; + this.aging_since_timestamp_seconds = agingSinceTimestampSeconds; + this.hot_keys = hotKeys; + this.account = account; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.dissolve_state = dissolveState; + this.followees = followees; + this.neuron_fees_e8s = neuronFeesE8s; + this.transfer = transfer; + this.known_neuron_data = knownNeuronData; } public Neuron() @@ -2324,18 +2166,15 @@ namespace Test.Models Type File: 'NeuronId' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class NeuronId { - [CandidName("id")] - public ulong Id { get; set; } + public ulong id { get; set; } public NeuronId(ulong id) { - this.Id = id; + this.id = id; } public NeuronId() @@ -2347,11 +2186,11 @@ namespace Test.Models Type File: 'NeuronIdOrSubaccount' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System.Collections.Generic; using System; -namespace Test.Models +namespace Test { [Variant(typeof(NeuronIdOrSubaccountTag))] public class NeuronIdOrSubaccount @@ -2360,9 +2199,9 @@ namespace Test.Models public NeuronIdOrSubaccountTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) + public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) { this.Tag = tag; this.Value = value; @@ -2414,24 +2253,21 @@ namespace Test.Models Type File: 'NeuronInFlightCommand' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class NeuronInFlightCommand { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("timestamp")] - public ulong Timestamp { get; set; } + public ulong timestamp { get; set; } - public NeuronInFlightCommand(OptionalValue command, ulong timestamp) + public NeuronInFlightCommand(OptionalValue command, ulong timestamp) { - this.Command = command; - this.Timestamp = timestamp; + this.command = command; + this.timestamp = timestamp; } public NeuronInFlightCommand() @@ -2442,57 +2278,46 @@ namespace Test.Models Type File: 'NeuronInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class NeuronInfo { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("state")] - public int State { get; set; } + public int state { get; set; } - [CandidName("stake_e8s")] - public ulong StakeE8s { get; set; } + public ulong stake_e8s { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("retrieved_at_timestamp_seconds")] - public ulong RetrievedAtTimestampSeconds { get; set; } + public ulong retrieved_at_timestamp_seconds { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } - [CandidName("age_seconds")] - public ulong AgeSeconds { get; set; } + public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, OptionalValue joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, OptionalValue knownNeuronData, ulong votingPower, ulong ageSeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.RecentBallots = recentBallots; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.State = state; - this.StakeE8s = stakeE8s; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.RetrievedAtTimestampSeconds = retrievedAtTimestampSeconds; - this.KnownNeuronData = knownNeuronData; - this.VotingPower = votingPower; - this.AgeSeconds = ageSeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.recent_ballots = recentBallots; + this.created_timestamp_seconds = createdTimestampSeconds; + this.state = state; + this.stake_e8s = stakeE8s; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.retrieved_at_timestamp_seconds = retrievedAtTimestampSeconds; + this.known_neuron_data = knownNeuronData; + this.voting_power = votingPower; + this.age_seconds = ageSeconds; } public NeuronInfo() @@ -2503,44 +2328,36 @@ namespace Test.Models Type File: 'NeuronStakeTransfer' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class NeuronStakeTransfer { - [CandidName("to_subaccount")] - public List ToSubaccount { get; set; } + public List to_subaccount { get; set; } - [CandidName("neuron_stake_e8s")] - public ulong NeuronStakeE8s { get; set; } + public ulong neuron_stake_e8s { get; set; } - [CandidName("from")] - public OptionalValue From { get; set; } + public OptionalValue from { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } - [CandidName("from_subaccount")] - public List FromSubaccount { get; set; } + public List from_subaccount { get; set; } - [CandidName("transfer_timestamp")] - public ulong TransferTimestamp { get; set; } + public ulong transfer_timestamp { get; set; } - [CandidName("block_height")] - public ulong BlockHeight { get; set; } + public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) { - this.ToSubaccount = toSubaccount; - this.NeuronStakeE8s = neuronStakeE8s; - this.From = from; - this.Memo = memo; - this.FromSubaccount = fromSubaccount; - this.TransferTimestamp = transferTimestamp; - this.BlockHeight = blockHeight; + this.to_subaccount = toSubaccount; + this.neuron_stake_e8s = neuronStakeE8s; + this.from = from; + this.memo = memo; + this.from_subaccount = fromSubaccount; + this.transfer_timestamp = transferTimestamp; + this.block_height = blockHeight; } public NeuronStakeTransfer() @@ -2551,24 +2368,21 @@ namespace Test.Models Type File: 'NodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class NodeProvider { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) { - this.Id = id; - this.RewardAccount = rewardAccount; + this.id = id; + this.reward_account = rewardAccount; } public NodeProvider() @@ -2580,10 +2394,10 @@ namespace Test.Models Type File: 'Operation' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(OperationTag))] public class Operation @@ -2592,9 +2406,9 @@ namespace Test.Models public OperationTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Operation(OperationTag tag, object? value) + public Operation(OperationTag tag, object value) { this.Tag = tag; this.Value = value; @@ -2732,32 +2546,27 @@ namespace Test.Models Type File: 'Proposal' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class Proposal { - [CandidName("url")] - public string Url { get; set; } + public string url { get; set; } - [CandidName("title")] - public OptionalValue Title { get; set; } + public OptionalValue title { get; set; } - [CandidName("action")] - public OptionalValue Action { get; set; } + public OptionalValue action { get; set; } - [CandidName("summary")] - public string Summary { get; set; } + public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) { - this.Url = url; - this.Title = title; - this.Action = action; - this.Summary = summary; + this.url = url; + this.title = title; + this.action = action; + this.summary = summary; } public Proposal() @@ -2768,69 +2577,55 @@ namespace Test.Models Type File: 'ProposalData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ProposalData { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("wait_for_quiet_state")] - public OptionalValue WaitForQuietState { get; set; } + public OptionalValue wait_for_quiet_state { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { - this.Id = id; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.WaitForQuietState = waitForQuietState; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.wait_for_quiet_state = waitForQuietState; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalData() @@ -2841,81 +2636,64 @@ namespace Test.Models Type File: 'ProposalInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; using System.Collections.Generic; -namespace Test.Models +namespace Test { public class ProposalInfo { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("status")] - public int Status { get; set; } + public int status { get; set; } - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("deadline_timestamp_seconds")] - public OptionalValue DeadlineTimestampSeconds { get; set; } + public OptionalValue deadline_timestamp_seconds { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("reward_status")] - public int RewardStatus { get; set; } + public int reward_status { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { - this.Id = id; - this.Status = status; - this.Topic = topic; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.DeadlineTimestampSeconds = deadlineTimestampSeconds; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.RewardStatus = rewardStatus; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.status = status; + this.topic = topic; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.deadline_timestamp_seconds = deadlineTimestampSeconds; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.reward_status = rewardStatus; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalInfo() @@ -2926,24 +2704,21 @@ namespace Test.Models Type File: 'RegisterVote' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RegisterVote { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) { - this.Vote = vote; - this.Proposal = proposal; + this.vote = vote; + this.proposal = proposal; } public RegisterVote() @@ -2954,19 +2729,17 @@ namespace Test.Models Type File: 'RemoveHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class RemoveHotKey { - [CandidName("hot_key_to_remove")] - public OptionalValue HotKeyToRemove { get; set; } + public OptionalValue hot_key_to_remove { get; set; } public RemoveHotKey(OptionalValue hotKeyToRemove) { - this.HotKeyToRemove = hotKeyToRemove; + this.hot_key_to_remove = hotKeyToRemove; } public RemoveHotKey() @@ -2978,10 +2751,10 @@ namespace Test.Models Type File: 'Result' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(ResultTag))] public class Result @@ -2990,9 +2763,9 @@ namespace Test.Models public ResultTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result(ResultTag tag, object? value) + public Result(ResultTag tag, object value) { this.Tag = tag; this.Value = value; @@ -3035,56 +2808,56 @@ namespace Test.Models } } -Type File: 'Result1' +Type File: 'Result_1' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Result1Tag))] - public class Result1 + [Variant(typeof(Result_1Tag))] + public class Result_1 { [VariantTagProperty()] - public Result1Tag Tag { get; set; } + public Result_1Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result1(Result1Tag tag, object? value) + public Result_1(Result_1Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result1() + protected Result_1() { } - public static Result1 Error(GovernanceError info) + public static Result_1 Error(GovernanceError info) { - return new Result1(Result1Tag.Error, info); + return new Result_1(Result_1Tag.Error, info); } - public static Result1 NeuronId(NeuronId info) + public static Result_1 NeuronId(NeuronId info) { - return new Result1(Result1Tag.NeuronId, info); + return new Result_1(Result_1Tag.NeuronId, info); } public GovernanceError AsError() { - this.ValidateTag(Result1Tag.Error); + this.ValidateTag(Result_1Tag.Error); return (GovernanceError)this.Value!; } public NeuronId AsNeuronId() { - this.ValidateTag(Result1Tag.NeuronId); + this.ValidateTag(Result_1Tag.NeuronId); return (NeuronId)this.Value!; } - private void ValidateTag(Result1Tag tag) + private void ValidateTag(Result_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3093,7 +2866,7 @@ namespace Test.Models } } - public enum Result1Tag + public enum Result_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -3102,56 +2875,56 @@ namespace Test.Models } } -Type File: 'Result2' +Type File: 'Result_2' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Result2Tag))] - public class Result2 + [Variant(typeof(Result_2Tag))] + public class Result_2 { [VariantTagProperty()] - public Result2Tag Tag { get; set; } + public Result_2Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result2(Result2Tag tag, object? value) + public Result_2(Result_2Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result2() + protected Result_2() { } - public static Result2 Ok(Neuron info) + public static Result_2 Ok(Neuron info) { - return new Result2(Result2Tag.Ok, info); + return new Result_2(Result_2Tag.Ok, info); } - public static Result2 Err(GovernanceError info) + public static Result_2 Err(GovernanceError info) { - return new Result2(Result2Tag.Err, info); + return new Result_2(Result_2Tag.Err, info); } public Neuron AsOk() { - this.ValidateTag(Result2Tag.Ok); + this.ValidateTag(Result_2Tag.Ok); return (Neuron)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result2Tag.Err); + this.ValidateTag(Result_2Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result2Tag tag) + private void ValidateTag(Result_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3160,7 +2933,7 @@ namespace Test.Models } } - public enum Result2Tag + public enum Result_2Tag { [VariantOptionType(typeof(Neuron))] Ok, @@ -3169,56 +2942,56 @@ namespace Test.Models } } -Type File: 'Result3' +Type File: 'Result_3' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Result3Tag))] - public class Result3 + [Variant(typeof(Result_3Tag))] + public class Result_3 { [VariantTagProperty()] - public Result3Tag Tag { get; set; } + public Result_3Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result3(Result3Tag tag, object? value) + public Result_3(Result_3Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result3() + protected Result_3() { } - public static Result3 Ok(RewardNodeProviders info) + public static Result_3 Ok(RewardNodeProviders info) { - return new Result3(Result3Tag.Ok, info); + return new Result_3(Result_3Tag.Ok, info); } - public static Result3 Err(GovernanceError info) + public static Result_3 Err(GovernanceError info) { - return new Result3(Result3Tag.Err, info); + return new Result_3(Result_3Tag.Err, info); } public RewardNodeProviders AsOk() { - this.ValidateTag(Result3Tag.Ok); + this.ValidateTag(Result_3Tag.Ok); return (RewardNodeProviders)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result3Tag.Err); + this.ValidateTag(Result_3Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result3Tag tag) + private void ValidateTag(Result_3Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3227,7 +3000,7 @@ namespace Test.Models } } - public enum Result3Tag + public enum Result_3Tag { [VariantOptionType(typeof(RewardNodeProviders))] Ok, @@ -3236,56 +3009,56 @@ namespace Test.Models } } -Type File: 'Result4' +Type File: 'Result_4' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Result4Tag))] - public class Result4 + [Variant(typeof(Result_4Tag))] + public class Result_4 { [VariantTagProperty()] - public Result4Tag Tag { get; set; } + public Result_4Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result4(Result4Tag tag, object? value) + public Result_4(Result_4Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result4() + protected Result_4() { } - public static Result4 Ok(NeuronInfo info) + public static Result_4 Ok(NeuronInfo info) { - return new Result4(Result4Tag.Ok, info); + return new Result_4(Result_4Tag.Ok, info); } - public static Result4 Err(GovernanceError info) + public static Result_4 Err(GovernanceError info) { - return new Result4(Result4Tag.Err, info); + return new Result_4(Result_4Tag.Err, info); } public NeuronInfo AsOk() { - this.ValidateTag(Result4Tag.Ok); + this.ValidateTag(Result_4Tag.Ok); return (NeuronInfo)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result4Tag.Err); + this.ValidateTag(Result_4Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result4Tag tag) + private void ValidateTag(Result_4Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3294,7 +3067,7 @@ namespace Test.Models } } - public enum Result4Tag + public enum Result_4Tag { [VariantOptionType(typeof(NeuronInfo))] Ok, @@ -3303,56 +3076,56 @@ namespace Test.Models } } -Type File: 'Result5' +Type File: 'Result_5' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { - [Variant(typeof(Result5Tag))] - public class Result5 + [Variant(typeof(Result_5Tag))] + public class Result_5 { [VariantTagProperty()] - public Result5Tag Tag { get; set; } + public Result_5Tag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public Result5(Result5Tag tag, object? value) + public Result_5(Result_5Tag tag, object value) { this.Tag = tag; this.Value = value; } - protected Result5() + protected Result_5() { } - public static Result5 Ok(NodeProvider info) + public static Result_5 Ok(NodeProvider info) { - return new Result5(Result5Tag.Ok, info); + return new Result_5(Result_5Tag.Ok, info); } - public static Result5 Err(GovernanceError info) + public static Result_5 Err(GovernanceError info) { - return new Result5(Result5Tag.Err, info); + return new Result_5(Result_5Tag.Err, info); } public NodeProvider AsOk() { - this.ValidateTag(Result5Tag.Ok); + this.ValidateTag(Result_5Tag.Ok); return (NodeProvider)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result5Tag.Err); + this.ValidateTag(Result_5Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result5Tag tag) + private void ValidateTag(Result_5Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3361,7 +3134,7 @@ namespace Test.Models } } - public enum Result5Tag + public enum Result_5Tag { [VariantOptionType(typeof(NodeProvider))] Ok, @@ -3372,32 +3145,27 @@ namespace Test.Models Type File: 'RewardEvent' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardEvent { - [CandidName("day_after_genesis")] - public ulong DayAfterGenesis { get; set; } + public ulong day_after_genesis { get; set; } - [CandidName("actual_timestamp_seconds")] - public ulong ActualTimestampSeconds { get; set; } + public ulong actual_timestamp_seconds { get; set; } - [CandidName("distributed_e8s_equivalent")] - public ulong DistributedE8sEquivalent { get; set; } + public ulong distributed_e8s_equivalent { get; set; } - [CandidName("settled_proposals")] - public List SettledProposals { get; set; } + public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) { - this.DayAfterGenesis = dayAfterGenesis; - this.ActualTimestampSeconds = actualTimestampSeconds; - this.DistributedE8sEquivalent = distributedE8sEquivalent; - this.SettledProposals = settledProposals; + this.day_after_genesis = dayAfterGenesis; + this.actual_timestamp_seconds = actualTimestampSeconds; + this.distributed_e8s_equivalent = distributedE8sEquivalent; + this.settled_proposals = settledProposals; } public RewardEvent() @@ -3409,10 +3177,10 @@ namespace Test.Models Type File: 'RewardMode' using EdjCase.ICP.Candid.Mapping; -using Test.Models; +using Test; using System; -namespace Test.Models +namespace Test { [Variant(typeof(RewardModeTag))] public class RewardMode @@ -3421,9 +3189,9 @@ namespace Test.Models public RewardModeTag Tag { get; set; } [VariantValueProperty()] - public object? Value { get; set; } + public object Value { get; set; } - public RewardMode(RewardModeTag tag, object? value) + public RewardMode(RewardModeTag tag, object value) { this.Tag = tag; this.Value = value; @@ -3475,28 +3243,24 @@ namespace Test.Models Type File: 'RewardNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardNodeProvider { - [CandidName("node_provider")] - public OptionalValue NodeProvider { get; set; } + public OptionalValue node_provider { get; set; } - [CandidName("reward_mode")] - public OptionalValue RewardMode { get; set; } + public OptionalValue reward_mode { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) { - this.NodeProvider = nodeProvider; - this.RewardMode = rewardMode; - this.AmountE8s = amountE8s; + this.node_provider = nodeProvider; + this.reward_mode = rewardMode; + this.amount_e8s = amountE8s; } public RewardNodeProvider() @@ -3507,25 +3271,22 @@ namespace Test.Models Type File: 'RewardNodeProviders' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardNodeProviders { - [CandidName("use_registry_derived_rewards")] - public OptionalValue UseRegistryDerivedRewards { get; set; } + public OptionalValue use_registry_derived_rewards { get; set; } - [CandidName("rewards")] - public List Rewards { get; set; } + public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) { - this.UseRegistryDerivedRewards = useRegistryDerivedRewards; - this.Rewards = rewards; + this.use_registry_derived_rewards = useRegistryDerivedRewards; + this.rewards = rewards; } public RewardNodeProviders() @@ -3536,20 +3297,18 @@ namespace Test.Models Type File: 'RewardToAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class RewardToAccount { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } public RewardToAccount(OptionalValue toAccount) { - this.ToAccount = toAccount; + this.to_account = toAccount; } public RewardToAccount() @@ -3560,18 +3319,15 @@ namespace Test.Models Type File: 'RewardToNeuron' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class RewardToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } public RewardToNeuron(ulong dissolveDelaySeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; } public RewardToNeuron() @@ -3582,20 +3338,18 @@ namespace Test.Models Type File: 'SetDefaultFollowees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class SetDefaultFollowees { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { - this.DefaultFollowees = defaultFollowees; + this.default_followees = defaultFollowees; } public SetDefaultFollowees() @@ -3606,18 +3360,15 @@ namespace Test.Models Type File: 'SetDissolveTimestamp' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class SetDissolveTimestamp { - [CandidName("dissolve_timestamp_seconds")] - public ulong DissolveTimestampSeconds { get; set; } + public ulong dissolve_timestamp_seconds { get; set; } public SetDissolveTimestamp(ulong dissolveTimestampSeconds) { - this.DissolveTimestampSeconds = dissolveTimestampSeconds; + this.dissolve_timestamp_seconds = dissolveTimestampSeconds; } public SetDissolveTimestamp() @@ -3628,27 +3379,23 @@ namespace Test.Models Type File: 'Spawn' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -namespace Test.Models +namespace Test { public class Spawn { - [CandidName("percentage_to_spawn")] - public OptionalValue PercentageToSpawn { get; set; } + public OptionalValue percentage_to_spawn { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public OptionalValue Nonce { get; set; } + public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) { - this.PercentageToSpawn = percentageToSpawn; - this.NewController = newController; - this.Nonce = nonce; + this.percentage_to_spawn = percentageToSpawn; + this.new_controller = newController; + this.nonce = nonce; } public Spawn() @@ -3659,20 +3406,18 @@ namespace Test.Models Type File: 'SpawnResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class SpawnResponse { - [CandidName("created_neuron_id")] - public OptionalValue CreatedNeuronId { get; set; } + public OptionalValue created_neuron_id { get; set; } public SpawnResponse(OptionalValue createdNeuronId) { - this.CreatedNeuronId = createdNeuronId; + this.created_neuron_id = createdNeuronId; } public SpawnResponse() @@ -3683,18 +3428,15 @@ namespace Test.Models Type File: 'Split' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Split { - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public Split(ulong amountE8s) { - this.AmountE8s = amountE8s; + this.amount_e8s = amountE8s; } public Split() @@ -3705,30 +3447,24 @@ namespace Test.Models Type File: 'Tally' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class Tally { - [CandidName("no")] - public ulong No { get; set; } + public ulong no { get; set; } - [CandidName("yes")] - public ulong Yes { get; set; } + public ulong yes { get; set; } - [CandidName("total")] - public ulong Total { get; set; } + public ulong total { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) { - this.No = no; - this.Yes = yes; - this.Total = total; - this.TimestampSeconds = timestampSeconds; + this.no = no; + this.yes = yes; + this.total = total; + this.timestamp_seconds = timestampSeconds; } public Tally() @@ -3739,20 +3475,18 @@ namespace Test.Models Type File: 'UpdateNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; -using Test.Models; +using Test; -namespace Test.Models +namespace Test { public class UpdateNodeProvider { - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public UpdateNodeProvider(OptionalValue rewardAccount) { - this.RewardAccount = rewardAccount; + this.reward_account = rewardAccount; } public UpdateNodeProvider() @@ -3763,18 +3497,15 @@ namespace Test.Models Type File: 'WaitForQuietState' -using EdjCase.ICP.Candid.Mapping; - -namespace Test.Models +namespace Test { public class WaitForQuietState { - [CandidName("current_deadline_timestamp_seconds")] - public ulong CurrentDeadlineTimestampSeconds { get; set; } + public ulong current_deadline_timestamp_seconds { get; set; } public WaitForQuietState(ulong currentDeadlineTimestampSeconds) { - this.CurrentDeadlineTimestampSeconds = currentDeadlineTimestampSeconds; + this.current_deadline_timestamp_seconds = currentDeadlineTimestampSeconds; } public WaitForQuietState() diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False.snap index 83d720e9..db622c42 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False.snap @@ -14,9 +14,9 @@ namespace Test public Principal CanisterId { get; } - public CandidConverter Converter { get; } + public CandidConverter? Converter { get; } - public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) + public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) { this.Agent = agent; this.CanisterId = canisterId; @@ -217,9 +217,9 @@ namespace Test public ActionTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Action(ActionTag tag, object value) + public Action(ActionTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -535,9 +535,9 @@ namespace Test public ByTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public By(ByTag tag, object value) + public By(ByTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -622,9 +622,9 @@ namespace Test public ChangeTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Change(ChangeTag tag, object value) + public Change(ChangeTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -788,9 +788,9 @@ namespace Test public CommandTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command(CommandTag tag, object value) + public Command(CommandTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -972,9 +972,9 @@ namespace Test public Command1Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command1(Command1Tag tag, object value) + public Command1(Command1Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1197,9 +1197,9 @@ namespace Test public Command2Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Command2(Command2Tag tag, object value) + public Command2(Command2Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1455,9 +1455,9 @@ namespace Test public DissolveStateTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public DissolveState(DissolveStateTag tag, object value) + public DissolveState(DissolveStateTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -1598,7 +1598,7 @@ namespace Test public class Governance { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } [CandidName("wait_for_quiet_threshold_seconds")] public ulong WaitForQuietThresholdSeconds { get; set; } @@ -1622,18 +1622,18 @@ namespace Test public ulong ShortVotingPeriodSeconds { get; set; } [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary Proposals { get; set; } [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary InFlightCommands { get; set; } [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary Neurons { get; set; } [CandidName("genesis_timestamp_seconds")] public ulong GenesisTimestampSeconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { this.DefaultFollowees = defaultFollowees; this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; @@ -1665,7 +1665,7 @@ namespace Test public class GovernanceCachedMetrics { [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary NotDissolvingNeuronsE8sBuckets { get; set; } [CandidName("garbage_collectable_neurons_count")] public ulong GarbageCollectableNeuronsCount { get; set; } @@ -1674,7 +1674,7 @@ namespace Test public ulong NeuronsWithInvalidStakeCount { get; set; } [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary NotDissolvingNeuronsCountBuckets { get; set; } [CandidName("total_supply_icp")] public ulong TotalSupplyIcp { get; set; } @@ -1698,13 +1698,13 @@ namespace Test public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary DissolvingNeuronsCountBuckets { get; set; } [CandidName("dissolving_neurons_count")] public ulong DissolvingNeuronsCount { get; set; } [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary DissolvingNeuronsE8sBuckets { get; set; } [CandidName("community_fund_total_staked_e8s")] public ulong CommunityFundTotalStakedE8s { get; set; } @@ -1712,7 +1712,7 @@ namespace Test [CandidName("timestamp_seconds")] public ulong TimestampSeconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; @@ -1903,12 +1903,12 @@ namespace Test public class ListNeuronsResponse { [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary NeuronInfos { get; set; } [CandidName("full_neurons")] public List FullNeurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { this.NeuronInfos = neuronInfos; this.FullNeurons = fullNeurons; @@ -2284,7 +2284,7 @@ namespace Test public OptionalValue DissolveState { get; set; } [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary Followees { get; set; } [CandidName("neuron_fees_e8s")] public ulong NeuronFeesE8s { get; set; } @@ -2295,7 +2295,7 @@ namespace Test [CandidName("known_neuron_data")] public OptionalValue KnownNeuronData { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { this.Id = id; this.Controller = controller; @@ -2360,9 +2360,9 @@ namespace Test public NeuronIdOrSubaccountTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) + public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -2592,9 +2592,9 @@ namespace Test public OperationTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Operation(OperationTag tag, object value) + public Operation(OperationTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -2784,7 +2784,7 @@ namespace Test public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2816,7 +2816,7 @@ namespace Test [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { this.Id = id; this.FailureReason = failureReason; @@ -2863,7 +2863,7 @@ namespace Test public OptionalValue FailureReason { get; set; } [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary Ballots { get; set; } [CandidName("proposal_timestamp_seconds")] public ulong ProposalTimestampSeconds { get; set; } @@ -2898,7 +2898,7 @@ namespace Test [CandidName("executed_timestamp_seconds")] public ulong ExecutedTimestampSeconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { this.Id = id; this.Status = status; @@ -2990,9 +2990,9 @@ namespace Test public ResultTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result(ResultTag tag, object value) + public Result(ResultTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3050,9 +3050,9 @@ namespace Test public Result1Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result1(Result1Tag tag, object value) + public Result1(Result1Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3117,9 +3117,9 @@ namespace Test public Result2Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result2(Result2Tag tag, object value) + public Result2(Result2Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3184,9 +3184,9 @@ namespace Test public Result3Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result3(Result3Tag tag, object value) + public Result3(Result3Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3251,9 +3251,9 @@ namespace Test public Result4Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result4(Result4Tag tag, object value) + public Result4(Result4Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3318,9 +3318,9 @@ namespace Test public Result5Tag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public Result5(Result5Tag tag, object value) + public Result5(Result5Tag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3421,9 +3421,9 @@ namespace Test public RewardModeTag Tag { get; set; } [VariantValueProperty()] - public object Value { get; set; } + public object? Value { get; set; } - public RewardMode(RewardModeTag tag, object value) + public RewardMode(RewardModeTag tag, object? value) { this.Tag = tag; this.Value = value; @@ -3591,9 +3591,9 @@ namespace Test public class SetDefaultFollowees { [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary DefaultFollowees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { this.DefaultFollowees = defaultFollowees; } diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True.snap index f30bf14a..046b9314 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True.snap @@ -23,21 +23,21 @@ namespace Test this.Converter = converter; } - public async Task ClaimGtcNeurons(Principal arg0, List arg1) + public async Task claim_gtc_neurons(Principal arg0, List arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); return reply.ToObjects(this.Converter); } - public async Task ClaimOrRefreshNeuronFromAccount(ClaimOrRefreshNeuronFromAccount arg0) + public async Task claim_or_refresh_neuron_from_account(ClaimOrRefreshNeuronFromAccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); return reply.ToObjects(this.Converter); } - public async Task GetBuildMetadata() + public async Task _get_build_metadata() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_build_metadata", arg); @@ -45,30 +45,30 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task GetFullNeuron(ulong arg0) + public async Task _get_full_neuron(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetFullNeuronByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task _get_full_neuron_by_id_or_subaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetMonthlyNodeProviderRewards() + public async Task _get_monthly_node_provider_rewards() { CandidArg arg = CandidArg.FromCandid(); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "get_monthly_node_provider_rewards", arg); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNetworkEconomicsParameters() + public async Task _get_network_economics_parameters() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_network_economics_parameters", arg); @@ -76,7 +76,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task> GetNeuronIds() + public async Task> _get_neuron_ids() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_ids", arg); @@ -84,31 +84,31 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task GetNeuronInfo(ulong arg0) + public async Task _get_neuron_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNeuronInfoByIdOrSubaccount(NeuronIdOrSubaccount arg0) + public async Task _get_neuron_info_by_id_or_subaccount(NeuronIdOrSubaccount arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info_by_id_or_subaccount", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task GetNodeProviderByCaller(NullValue arg0) + public async Task _get_node_provider_by_caller(NullValue arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); + return reply.ToObjects(this.Converter); } - public async Task> GetPendingProposals() + public async Task> _get_pending_proposals() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_pending_proposals", arg); @@ -116,7 +116,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task> GetProposalInfo(ulong arg0) + public async Task> _get_proposal_info(ulong arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); @@ -124,7 +124,7 @@ namespace Test return reply.ToObjects>(this.Converter); } - public async Task ListKnownNeurons() + public async Task list_known_neurons() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_known_neurons", arg); @@ -132,7 +132,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListNeurons(ListNeurons arg0) + public async Task list_neurons(ListNeurons arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); @@ -140,7 +140,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListNodeProviders() + public async Task list_node_providers() { CandidArg arg = CandidArg.FromCandid(); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_node_providers", arg); @@ -148,7 +148,7 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ListProposals(ListProposalInfo arg0) + public async Task list_proposals(ListProposalInfo arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); @@ -156,21 +156,21 @@ namespace Test return reply.ToObjects(this.Converter); } - public async Task ManageNeuron(ManageNeuron arg0) + public async Task manage_neuron(ManageNeuron arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); return reply.ToObjects(this.Converter); } - public async Task TransferGtcNeuron(NeuronId arg0, NeuronId arg1) + public async Task transfer_gtc_neuron(NeuronId arg0, NeuronId arg1) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0), CandidTypedValue.FromObject(arg1)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); return reply.ToObjects(this.Converter); } - public async Task UpdateNodeProvider(UpdateNodeProvider arg0) + public async Task update_node_provider(UpdateNodeProvider arg0) { CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0)); CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); @@ -181,19 +181,17 @@ namespace Test Type File: 'AccountIdentifier' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test { public class AccountIdentifier { - [CandidName("hash")] - public List Hash { get; set; } + public List hash { get; set; } public AccountIdentifier(List hash) { - this.Hash = hash; + this.hash = hash; } public AccountIdentifier() @@ -375,19 +373,17 @@ namespace Test Type File: 'AddHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class AddHotKey { - [CandidName("new_hot_key")] - public OptionalValue NewHotKey { get; set; } + public OptionalValue new_hot_key { get; set; } public AddHotKey(OptionalValue newHotKey) { - this.NewHotKey = newHotKey; + this.new_hot_key = newHotKey; } public AddHotKey() @@ -398,7 +394,6 @@ namespace Test Type File: 'AddOrRemoveNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -406,12 +401,11 @@ namespace Test { public class AddOrRemoveNodeProvider { - [CandidName("change")] - public OptionalValue Change { get; set; } + public OptionalValue change { get; set; } public AddOrRemoveNodeProvider(OptionalValue change) { - this.Change = change; + this.change = change; } public AddOrRemoveNodeProvider() @@ -422,18 +416,15 @@ namespace Test Type File: 'Amount' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Amount { - [CandidName("e8s")] - public ulong E8s { get; set; } + public ulong e8s { get; set; } public Amount(ulong e8s) { - this.E8s = e8s; + this.e8s = e8s; } public Amount() @@ -444,7 +435,6 @@ namespace Test Type File: 'ApproveGenesisKyc' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; @@ -452,12 +442,11 @@ namespace Test { public class ApproveGenesisKyc { - [CandidName("principals")] - public List Principals { get; set; } + public List principals { get; set; } public ApproveGenesisKyc(List principals) { - this.Principals = principals; + this.principals = principals; } public ApproveGenesisKyc() @@ -468,22 +457,18 @@ namespace Test Type File: 'Ballot' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Ballot { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) { - this.Vote = vote; - this.VotingPower = votingPower; + this.vote = vote; + this.voting_power = votingPower; } public Ballot() @@ -494,7 +479,6 @@ namespace Test Type File: 'BallotInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -502,16 +486,14 @@ namespace Test { public class BallotInfo { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) { - this.Vote = vote; - this.ProposalId = proposalId; + this.vote = vote; + this.proposal_id = proposalId; } public BallotInfo() @@ -676,7 +658,6 @@ namespace Test Type File: 'ClaimOrRefresh' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -684,12 +665,11 @@ namespace Test { public class ClaimOrRefresh { - [CandidName("by")] - public OptionalValue By { get; set; } + public OptionalValue by { get; set; } public ClaimOrRefresh(OptionalValue by) { - this.By = by; + this.by = by; } public ClaimOrRefresh() @@ -700,23 +680,20 @@ namespace Test Type File: 'ClaimOrRefreshNeuronFromAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class ClaimOrRefreshNeuronFromAccount { - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) { - this.Controller = controller; - this.Memo = memo; + this.controller = controller; + this.memo = memo; } public ClaimOrRefreshNeuronFromAccount() @@ -727,7 +704,6 @@ namespace Test Type File: 'ClaimOrRefreshNeuronFromAccountResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -735,12 +711,11 @@ namespace Test { public class ClaimOrRefreshNeuronFromAccountResponse { - [CandidName("result")] - public OptionalValue Result { get; set; } + public OptionalValue result { get; set; } - public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) + public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) { - this.Result = result; + this.result = result; } public ClaimOrRefreshNeuronFromAccountResponse() @@ -751,7 +726,6 @@ namespace Test Type File: 'ClaimOrRefreshResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -759,12 +733,11 @@ namespace Test { public class ClaimOrRefreshResponse { - [CandidName("refreshed_neuron_id")] - public OptionalValue RefreshedNeuronId { get; set; } + public OptionalValue refreshed_neuron_id { get; set; } public ClaimOrRefreshResponse(OptionalValue refreshedNeuronId) { - this.RefreshedNeuronId = refreshedNeuronId; + this.refreshed_neuron_id = refreshedNeuronId; } public ClaimOrRefreshResponse() @@ -957,7 +930,7 @@ namespace Test } } -Type File: 'Command1' +Type File: 'Command_1' using EdjCase.ICP.Candid.Mapping; using Test; @@ -965,158 +938,158 @@ using System; namespace Test { - [Variant(typeof(Command1Tag))] - public class Command1 + [Variant(typeof(Command_1Tag))] + public class Command_1 { [VariantTagProperty()] - public Command1Tag Tag { get; set; } + public Command_1Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Command1(Command1Tag tag, object? value) + public Command_1(Command_1Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Command1() + protected Command_1() { } - public static Command1 Error(GovernanceError info) + public static Command_1 Error(GovernanceError info) { - return new Command1(Command1Tag.Error, info); + return new Command_1(Command_1Tag.Error, info); } - public static Command1 Spawn(SpawnResponse info) + public static Command_1 Spawn(SpawnResponse info) { - return new Command1(Command1Tag.Spawn, info); + return new Command_1(Command_1Tag.Spawn, info); } - public static Command1 Split(SpawnResponse info) + public static Command_1 Split(SpawnResponse info) { - return new Command1(Command1Tag.Split, info); + return new Command_1(Command_1Tag.Split, info); } - public static Command1 Follow(Command1.FollowInfo info) + public static Command_1 Follow(Command_1.FollowInfo info) { - return new Command1(Command1Tag.Follow, info); + return new Command_1(Command_1Tag.Follow, info); } - public static Command1 ClaimOrRefresh(ClaimOrRefreshResponse info) + public static Command_1 ClaimOrRefresh(ClaimOrRefreshResponse info) { - return new Command1(Command1Tag.ClaimOrRefresh, info); + return new Command_1(Command_1Tag.ClaimOrRefresh, info); } - public static Command1 Configure(Command1.ConfigureInfo info) + public static Command_1 Configure(Command_1.ConfigureInfo info) { - return new Command1(Command1Tag.Configure, info); + return new Command_1(Command_1Tag.Configure, info); } - public static Command1 RegisterVote(Command1.RegisterVoteInfo info) + public static Command_1 RegisterVote(Command_1.RegisterVoteInfo info) { - return new Command1(Command1Tag.RegisterVote, info); + return new Command_1(Command_1Tag.RegisterVote, info); } - public static Command1 Merge(Command1.MergeInfo info) + public static Command_1 Merge(Command_1.MergeInfo info) { - return new Command1(Command1Tag.Merge, info); + return new Command_1(Command_1Tag.Merge, info); } - public static Command1 DisburseToNeuron(SpawnResponse info) + public static Command_1 DisburseToNeuron(SpawnResponse info) { - return new Command1(Command1Tag.DisburseToNeuron, info); + return new Command_1(Command_1Tag.DisburseToNeuron, info); } - public static Command1 MakeProposal(MakeProposalResponse info) + public static Command_1 MakeProposal(MakeProposalResponse info) { - return new Command1(Command1Tag.MakeProposal, info); + return new Command_1(Command_1Tag.MakeProposal, info); } - public static Command1 MergeMaturity(MergeMaturityResponse info) + public static Command_1 MergeMaturity(MergeMaturityResponse info) { - return new Command1(Command1Tag.MergeMaturity, info); + return new Command_1(Command_1Tag.MergeMaturity, info); } - public static Command1 Disburse(DisburseResponse info) + public static Command_1 Disburse(DisburseResponse info) { - return new Command1(Command1Tag.Disburse, info); + return new Command_1(Command_1Tag.Disburse, info); } public GovernanceError AsError() { - this.ValidateTag(Command1Tag.Error); + this.ValidateTag(Command_1Tag.Error); return (GovernanceError)this.Value!; } public SpawnResponse AsSpawn() { - this.ValidateTag(Command1Tag.Spawn); + this.ValidateTag(Command_1Tag.Spawn); return (SpawnResponse)this.Value!; } public SpawnResponse AsSplit() { - this.ValidateTag(Command1Tag.Split); + this.ValidateTag(Command_1Tag.Split); return (SpawnResponse)this.Value!; } - public Command1.FollowInfo AsFollow() + public Command_1.FollowInfo AsFollow() { - this.ValidateTag(Command1Tag.Follow); - return (Command1.FollowInfo)this.Value!; + this.ValidateTag(Command_1Tag.Follow); + return (Command_1.FollowInfo)this.Value!; } public ClaimOrRefreshResponse AsClaimOrRefresh() { - this.ValidateTag(Command1Tag.ClaimOrRefresh); + this.ValidateTag(Command_1Tag.ClaimOrRefresh); return (ClaimOrRefreshResponse)this.Value!; } - public Command1.ConfigureInfo AsConfigure() + public Command_1.ConfigureInfo AsConfigure() { - this.ValidateTag(Command1Tag.Configure); - return (Command1.ConfigureInfo)this.Value!; + this.ValidateTag(Command_1Tag.Configure); + return (Command_1.ConfigureInfo)this.Value!; } - public Command1.RegisterVoteInfo AsRegisterVote() + public Command_1.RegisterVoteInfo AsRegisterVote() { - this.ValidateTag(Command1Tag.RegisterVote); - return (Command1.RegisterVoteInfo)this.Value!; + this.ValidateTag(Command_1Tag.RegisterVote); + return (Command_1.RegisterVoteInfo)this.Value!; } - public Command1.MergeInfo AsMerge() + public Command_1.MergeInfo AsMerge() { - this.ValidateTag(Command1Tag.Merge); - return (Command1.MergeInfo)this.Value!; + this.ValidateTag(Command_1Tag.Merge); + return (Command_1.MergeInfo)this.Value!; } public SpawnResponse AsDisburseToNeuron() { - this.ValidateTag(Command1Tag.DisburseToNeuron); + this.ValidateTag(Command_1Tag.DisburseToNeuron); return (SpawnResponse)this.Value!; } public MakeProposalResponse AsMakeProposal() { - this.ValidateTag(Command1Tag.MakeProposal); + this.ValidateTag(Command_1Tag.MakeProposal); return (MakeProposalResponse)this.Value!; } public MergeMaturityResponse AsMergeMaturity() { - this.ValidateTag(Command1Tag.MergeMaturity); + this.ValidateTag(Command_1Tag.MergeMaturity); return (MergeMaturityResponse)this.Value!; } public DisburseResponse AsDisburse() { - this.ValidateTag(Command1Tag.Disburse); + this.ValidateTag(Command_1Tag.Disburse); return (DisburseResponse)this.Value!; } - private void ValidateTag(Command1Tag tag) + private void ValidateTag(Command_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1153,7 +1126,7 @@ namespace Test } } - public enum Command1Tag + public enum Command_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -1161,15 +1134,15 @@ namespace Test Spawn, [VariantOptionType(typeof(SpawnResponse))] Split, - [VariantOptionType(typeof(Command1.FollowInfo))] + [VariantOptionType(typeof(Command_1.FollowInfo))] Follow, [VariantOptionType(typeof(ClaimOrRefreshResponse))] ClaimOrRefresh, - [VariantOptionType(typeof(Command1.ConfigureInfo))] + [VariantOptionType(typeof(Command_1.ConfigureInfo))] Configure, - [VariantOptionType(typeof(Command1.RegisterVoteInfo))] + [VariantOptionType(typeof(Command_1.RegisterVoteInfo))] RegisterVote, - [VariantOptionType(typeof(Command1.MergeInfo))] + [VariantOptionType(typeof(Command_1.MergeInfo))] Merge, [VariantOptionType(typeof(SpawnResponse))] DisburseToNeuron, @@ -1182,7 +1155,7 @@ namespace Test } } -Type File: 'Command2' +Type File: 'Command_2' using EdjCase.ICP.Candid.Mapping; using Test; @@ -1190,114 +1163,114 @@ using System; namespace Test { - [Variant(typeof(Command2Tag))] - public class Command2 + [Variant(typeof(Command_2Tag))] + public class Command_2 { [VariantTagProperty()] - public Command2Tag Tag { get; set; } + public Command_2Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Command2(Command2Tag tag, object? value) + public Command_2(Command_2Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Command2() + protected Command_2() { } - public static Command2 Spawn(Spawn info) + public static Command_2 Spawn(Spawn info) { - return new Command2(Command2Tag.Spawn, info); + return new Command_2(Command_2Tag.Spawn, info); } - public static Command2 Split(Split info) + public static Command_2 Split(Split info) { - return new Command2(Command2Tag.Split, info); + return new Command_2(Command_2Tag.Split, info); } - public static Command2 Configure(Configure info) + public static Command_2 Configure(Configure info) { - return new Command2(Command2Tag.Configure, info); + return new Command_2(Command_2Tag.Configure, info); } - public static Command2 Merge(Merge info) + public static Command_2 Merge(Merge info) { - return new Command2(Command2Tag.Merge, info); + return new Command_2(Command_2Tag.Merge, info); } - public static Command2 DisburseToNeuron(DisburseToNeuron info) + public static Command_2 DisburseToNeuron(DisburseToNeuron info) { - return new Command2(Command2Tag.DisburseToNeuron, info); + return new Command_2(Command_2Tag.DisburseToNeuron, info); } - public static Command2 ClaimOrRefreshNeuron(ClaimOrRefresh info) + public static Command_2 ClaimOrRefreshNeuron(ClaimOrRefresh info) { - return new Command2(Command2Tag.ClaimOrRefreshNeuron, info); + return new Command_2(Command_2Tag.ClaimOrRefreshNeuron, info); } - public static Command2 MergeMaturity(MergeMaturity info) + public static Command_2 MergeMaturity(MergeMaturity info) { - return new Command2(Command2Tag.MergeMaturity, info); + return new Command_2(Command_2Tag.MergeMaturity, info); } - public static Command2 Disburse(Disburse info) + public static Command_2 Disburse(Disburse info) { - return new Command2(Command2Tag.Disburse, info); + return new Command_2(Command_2Tag.Disburse, info); } public Spawn AsSpawn() { - this.ValidateTag(Command2Tag.Spawn); + this.ValidateTag(Command_2Tag.Spawn); return (Spawn)this.Value!; } public Split AsSplit() { - this.ValidateTag(Command2Tag.Split); + this.ValidateTag(Command_2Tag.Split); return (Split)this.Value!; } public Configure AsConfigure() { - this.ValidateTag(Command2Tag.Configure); + this.ValidateTag(Command_2Tag.Configure); return (Configure)this.Value!; } public Merge AsMerge() { - this.ValidateTag(Command2Tag.Merge); + this.ValidateTag(Command_2Tag.Merge); return (Merge)this.Value!; } public DisburseToNeuron AsDisburseToNeuron() { - this.ValidateTag(Command2Tag.DisburseToNeuron); + this.ValidateTag(Command_2Tag.DisburseToNeuron); return (DisburseToNeuron)this.Value!; } public ClaimOrRefresh AsClaimOrRefreshNeuron() { - this.ValidateTag(Command2Tag.ClaimOrRefreshNeuron); + this.ValidateTag(Command_2Tag.ClaimOrRefreshNeuron); return (ClaimOrRefresh)this.Value!; } public MergeMaturity AsMergeMaturity() { - this.ValidateTag(Command2Tag.MergeMaturity); + this.ValidateTag(Command_2Tag.MergeMaturity); return (MergeMaturity)this.Value!; } public Disburse AsDisburse() { - this.ValidateTag(Command2Tag.Disburse); + this.ValidateTag(Command_2Tag.Disburse); return (Disburse)this.Value!; } - private void ValidateTag(Command2Tag tag) + private void ValidateTag(Command_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -1306,7 +1279,7 @@ namespace Test } } - public enum Command2Tag + public enum Command_2Tag { [VariantOptionType(typeof(Spawn))] Spawn, @@ -1329,7 +1302,6 @@ namespace Test Type File: 'Configure' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -1337,12 +1309,11 @@ namespace Test { public class Configure { - [CandidName("operation")] - public OptionalValue Operation { get; set; } + public OptionalValue operation { get; set; } public Configure(OptionalValue operation) { - this.Operation = operation; + this.operation = operation; } public Configure() @@ -1353,7 +1324,6 @@ namespace Test Type File: 'Disburse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -1361,16 +1331,14 @@ namespace Test { public class Disburse { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } - [CandidName("amount")] - public OptionalValue Amount { get; set; } + public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) { - this.ToAccount = toAccount; - this.Amount = amount; + this.to_account = toAccount; + this.amount = amount; } public Disburse() @@ -1381,18 +1349,15 @@ namespace Test Type File: 'DisburseResponse' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class DisburseResponse { - [CandidName("transfer_block_height")] - public ulong TransferBlockHeight { get; set; } + public ulong transfer_block_height { get; set; } public DisburseResponse(ulong transferBlockHeight) { - this.TransferBlockHeight = transferBlockHeight; + this.transfer_block_height = transferBlockHeight; } public DisburseResponse() @@ -1403,35 +1368,29 @@ namespace Test Type File: 'DisburseToNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class DisburseToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public ulong Nonce { get; set; } + public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.KycVerified = kycVerified; - this.AmountE8s = amountE8s; - this.NewController = newController; - this.Nonce = nonce; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.kyc_verified = kycVerified; + this.amount_e8s = amountE8s; + this.new_controller = newController; + this.nonce = nonce; } public DisburseToNeuron() @@ -1509,23 +1468,20 @@ namespace Test Type File: 'ExecuteNnsFunction' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test { public class ExecuteNnsFunction { - [CandidName("nns_function")] - public int NnsFunction { get; set; } + public int nns_function { get; set; } - [CandidName("payload")] - public List Payload { get; set; } + public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) { - this.NnsFunction = nnsFunction; - this.Payload = payload; + this.nns_function = nnsFunction; + this.payload = payload; } public ExecuteNnsFunction() @@ -1536,7 +1492,6 @@ namespace Test Type File: 'Follow' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1544,16 +1499,14 @@ namespace Test { public class Follow { - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("followees")] - public List Followees { get; set; } + public List followees { get; set; } public Follow(int topic, List followees) { - this.Topic = topic; - this.Followees = followees; + this.topic = topic; + this.followees = followees; } public Follow() @@ -1564,7 +1517,6 @@ namespace Test Type File: 'Followees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1572,12 +1524,11 @@ namespace Test { public class Followees { - [CandidName("followees")] - public List Followees_ { get; set; } + public List followees { get; set; } public Followees(List followees) { - this.Followees_ = followees; + this.followees = followees; } public Followees() @@ -1588,7 +1539,6 @@ namespace Test Type File: 'Governance' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; using EdjCase.ICP.Candid.Models; @@ -1597,56 +1547,44 @@ namespace Test { public class Governance { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - [CandidName("wait_for_quiet_threshold_seconds")] - public ulong WaitForQuietThresholdSeconds { get; set; } + public ulong wait_for_quiet_threshold_seconds { get; set; } - [CandidName("metrics")] - public OptionalValue Metrics { get; set; } + public OptionalValue metrics { get; set; } - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } - [CandidName("economics")] - public OptionalValue Economics { get; set; } + public OptionalValue economics { get; set; } - [CandidName("latest_reward_event")] - public OptionalValue LatestRewardEvent { get; set; } + public OptionalValue latest_reward_event { get; set; } - [CandidName("to_claim_transfers")] - public List ToClaimTransfers { get; set; } + public List to_claim_transfers { get; set; } - [CandidName("short_voting_period_seconds")] - public ulong ShortVotingPeriodSeconds { get; set; } + public ulong short_voting_period_seconds { get; set; } - [CandidName("proposals")] - public List<(ulong, ProposalData)> Proposals { get; set; } + public Dictionary proposals { get; set; } - [CandidName("in_flight_commands")] - public List<(ulong, NeuronInFlightCommand)> InFlightCommands { get; set; } + public Dictionary in_flight_commands { get; set; } - [CandidName("neurons")] - public List<(ulong, Neuron)> Neurons { get; set; } + public Dictionary neurons { get; set; } - [CandidName("genesis_timestamp_seconds")] - public ulong GenesisTimestampSeconds { get; set; } + public ulong genesis_timestamp_seconds { get; set; } - public Governance(List<(int, Followees)> defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, List<(ulong, ProposalData)> proposals, List<(ulong, NeuronInFlightCommand)> inFlightCommands, List<(ulong, Neuron)> neurons, ulong genesisTimestampSeconds) + public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, OptionalValue metrics, List nodeProviders, OptionalValue economics, OptionalValue latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) { - this.DefaultFollowees = defaultFollowees; - this.WaitForQuietThresholdSeconds = waitForQuietThresholdSeconds; - this.Metrics = metrics; - this.NodeProviders = nodeProviders; - this.Economics = economics; - this.LatestRewardEvent = latestRewardEvent; - this.ToClaimTransfers = toClaimTransfers; - this.ShortVotingPeriodSeconds = shortVotingPeriodSeconds; - this.Proposals = proposals; - this.InFlightCommands = inFlightCommands; - this.Neurons = neurons; - this.GenesisTimestampSeconds = genesisTimestampSeconds; + this.default_followees = defaultFollowees; + this.wait_for_quiet_threshold_seconds = waitForQuietThresholdSeconds; + this.metrics = metrics; + this.node_providers = nodeProviders; + this.economics = economics; + this.latest_reward_event = latestRewardEvent; + this.to_claim_transfers = toClaimTransfers; + this.short_voting_period_seconds = shortVotingPeriodSeconds; + this.proposals = proposals; + this.in_flight_commands = inFlightCommands; + this.neurons = neurons; + this.genesis_timestamp_seconds = genesisTimestampSeconds; } public Governance() @@ -1657,79 +1595,62 @@ namespace Test Type File: 'GovernanceCachedMetrics' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test { public class GovernanceCachedMetrics { - [CandidName("not_dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> NotDissolvingNeuronsE8sBuckets { get; set; } + public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - [CandidName("garbage_collectable_neurons_count")] - public ulong GarbageCollectableNeuronsCount { get; set; } + public ulong garbage_collectable_neurons_count { get; set; } - [CandidName("neurons_with_invalid_stake_count")] - public ulong NeuronsWithInvalidStakeCount { get; set; } + public ulong neurons_with_invalid_stake_count { get; set; } - [CandidName("not_dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> NotDissolvingNeuronsCountBuckets { get; set; } + public Dictionary not_dissolving_neurons_count_buckets { get; set; } - [CandidName("total_supply_icp")] - public ulong TotalSupplyIcp { get; set; } + public ulong total_supply_icp { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_count")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayCount { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - [CandidName("dissolved_neurons_count")] - public ulong DissolvedNeuronsCount { get; set; } + public ulong dissolved_neurons_count { get; set; } - [CandidName("total_staked_e8s")] - public ulong TotalStakedE8s { get; set; } + public ulong total_staked_e8s { get; set; } - [CandidName("not_dissolving_neurons_count")] - public ulong NotDissolvingNeuronsCount { get; set; } + public ulong not_dissolving_neurons_count { get; set; } - [CandidName("dissolved_neurons_e8s")] - public ulong DissolvedNeuronsE8s { get; set; } + public ulong dissolved_neurons_e8s { get; set; } - [CandidName("neurons_with_less_than_6_months_dissolve_delay_e8s")] - public ulong NeuronsWithLessThan6MonthsDissolveDelayE8s { get; set; } + public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - [CandidName("dissolving_neurons_count_buckets")] - public List<(ulong, ulong)> DissolvingNeuronsCountBuckets { get; set; } + public Dictionary dissolving_neurons_count_buckets { get; set; } - [CandidName("dissolving_neurons_count")] - public ulong DissolvingNeuronsCount { get; set; } + public ulong dissolving_neurons_count { get; set; } - [CandidName("dissolving_neurons_e8s_buckets")] - public List<(ulong, double)> DissolvingNeuronsE8sBuckets { get; set; } + public Dictionary dissolving_neurons_e8s_buckets { get; set; } - [CandidName("community_fund_total_staked_e8s")] - public ulong CommunityFundTotalStakedE8s { get; set; } + public ulong community_fund_total_staked_e8s { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } - public GovernanceCachedMetrics(List<(ulong, double)> notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, List<(ulong, ulong)> notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, List<(ulong, ulong)> dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, List<(ulong, double)> dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) + public GovernanceCachedMetrics(Dictionary notDissolvingNeuronsE8sBuckets, ulong garbageCollectableNeuronsCount, ulong neuronsWithInvalidStakeCount, Dictionary notDissolvingNeuronsCountBuckets, ulong totalSupplyIcp, ulong neuronsWithLessThan6MonthsDissolveDelayCount, ulong dissolvedNeuronsCount, ulong totalStakedE8s, ulong notDissolvingNeuronsCount, ulong dissolvedNeuronsE8s, ulong neuronsWithLessThan6MonthsDissolveDelayE8s, Dictionary dissolvingNeuronsCountBuckets, ulong dissolvingNeuronsCount, Dictionary dissolvingNeuronsE8sBuckets, ulong communityFundTotalStakedE8s, ulong timestampSeconds) { - this.NotDissolvingNeuronsE8sBuckets = notDissolvingNeuronsE8sBuckets; - this.GarbageCollectableNeuronsCount = garbageCollectableNeuronsCount; - this.NeuronsWithInvalidStakeCount = neuronsWithInvalidStakeCount; - this.NotDissolvingNeuronsCountBuckets = notDissolvingNeuronsCountBuckets; - this.TotalSupplyIcp = totalSupplyIcp; - this.NeuronsWithLessThan6MonthsDissolveDelayCount = neuronsWithLessThan6MonthsDissolveDelayCount; - this.DissolvedNeuronsCount = dissolvedNeuronsCount; - this.TotalStakedE8s = totalStakedE8s; - this.NotDissolvingNeuronsCount = notDissolvingNeuronsCount; - this.DissolvedNeuronsE8s = dissolvedNeuronsE8s; - this.NeuronsWithLessThan6MonthsDissolveDelayE8s = neuronsWithLessThan6MonthsDissolveDelayE8s; - this.DissolvingNeuronsCountBuckets = dissolvingNeuronsCountBuckets; - this.DissolvingNeuronsCount = dissolvingNeuronsCount; - this.DissolvingNeuronsE8sBuckets = dissolvingNeuronsE8sBuckets; - this.CommunityFundTotalStakedE8s = communityFundTotalStakedE8s; - this.TimestampSeconds = timestampSeconds; + this.not_dissolving_neurons_e8s_buckets = notDissolvingNeuronsE8sBuckets; + this.garbage_collectable_neurons_count = garbageCollectableNeuronsCount; + this.neurons_with_invalid_stake_count = neuronsWithInvalidStakeCount; + this.not_dissolving_neurons_count_buckets = notDissolvingNeuronsCountBuckets; + this.total_supply_icp = totalSupplyIcp; + this.neurons_with_less_than_6_months_dissolve_delay_count = neuronsWithLessThan6MonthsDissolveDelayCount; + this.dissolved_neurons_count = dissolvedNeuronsCount; + this.total_staked_e8s = totalStakedE8s; + this.not_dissolving_neurons_count = notDissolvingNeuronsCount; + this.dissolved_neurons_e8s = dissolvedNeuronsE8s; + this.neurons_with_less_than_6_months_dissolve_delay_e8s = neuronsWithLessThan6MonthsDissolveDelayE8s; + this.dissolving_neurons_count_buckets = dissolvingNeuronsCountBuckets; + this.dissolving_neurons_count = dissolvingNeuronsCount; + this.dissolving_neurons_e8s_buckets = dissolvingNeuronsE8sBuckets; + this.community_fund_total_staked_e8s = communityFundTotalStakedE8s; + this.timestamp_seconds = timestampSeconds; } public GovernanceCachedMetrics() @@ -1740,22 +1661,18 @@ namespace Test Type File: 'GovernanceError' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class GovernanceError { - [CandidName("error_message")] - public string ErrorMessage { get; set; } + public string error_message { get; set; } - [CandidName("error_type")] - public int ErrorType { get; set; } + public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) { - this.ErrorMessage = errorMessage; - this.ErrorType = errorType; + this.error_message = errorMessage; + this.error_type = errorType; } public GovernanceError() @@ -1766,18 +1683,15 @@ namespace Test Type File: 'IncreaseDissolveDelay' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class IncreaseDissolveDelay { - [CandidName("additional_dissolve_delay_seconds")] - public uint AdditionalDissolveDelaySeconds { get; set; } + public uint additional_dissolve_delay_seconds { get; set; } public IncreaseDissolveDelay(uint additionalDissolveDelaySeconds) { - this.AdditionalDissolveDelaySeconds = additionalDissolveDelaySeconds; + this.additional_dissolve_delay_seconds = additionalDissolveDelaySeconds; } public IncreaseDissolveDelay() @@ -1788,7 +1702,6 @@ namespace Test Type File: 'KnownNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -1796,16 +1709,14 @@ namespace Test { public class KnownNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) { - this.Id = id; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.known_neuron_data = knownNeuronData; } public KnownNeuron() @@ -1816,23 +1727,20 @@ namespace Test Type File: 'KnownNeuronData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class KnownNeuronData { - [CandidName("name")] - public string Name { get; set; } + public string name { get; set; } - [CandidName("description")] - public OptionalValue Description { get; set; } + public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) { - this.Name = name; - this.Description = description; + this.name = name; + this.description = description; } public KnownNeuronData() @@ -1843,7 +1751,6 @@ namespace Test Type File: 'ListKnownNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1851,12 +1758,11 @@ namespace Test { public class ListKnownNeuronsResponse { - [CandidName("known_neurons")] - public List KnownNeurons { get; set; } + public List known_neurons { get; set; } public ListKnownNeuronsResponse(List knownNeurons) { - this.KnownNeurons = knownNeurons; + this.known_neurons = knownNeurons; } public ListKnownNeuronsResponse() @@ -1867,23 +1773,20 @@ namespace Test Type File: 'ListNeurons' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; namespace Test { public class ListNeurons { - [CandidName("neuron_ids")] - public List NeuronIds { get; set; } + public List neuron_ids { get; set; } - [CandidName("include_neurons_readable_by_caller")] - public bool IncludeNeuronsReadableByCaller { get; set; } + public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) { - this.NeuronIds = neuronIds; - this.IncludeNeuronsReadableByCaller = includeNeuronsReadableByCaller; + this.neuron_ids = neuronIds; + this.include_neurons_readable_by_caller = includeNeuronsReadableByCaller; } public ListNeurons() @@ -1894,7 +1797,6 @@ namespace Test Type File: 'ListNeuronsResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1902,16 +1804,14 @@ namespace Test { public class ListNeuronsResponse { - [CandidName("neuron_infos")] - public List<(ulong, NeuronInfo)> NeuronInfos { get; set; } + public Dictionary neuron_infos { get; set; } - [CandidName("full_neurons")] - public List FullNeurons { get; set; } + public List full_neurons { get; set; } - public ListNeuronsResponse(List<(ulong, NeuronInfo)> neuronInfos, List fullNeurons) + public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) { - this.NeuronInfos = neuronInfos; - this.FullNeurons = fullNeurons; + this.neuron_infos = neuronInfos; + this.full_neurons = fullNeurons; } public ListNeuronsResponse() @@ -1922,7 +1822,6 @@ namespace Test Type File: 'ListNodeProvidersResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1930,12 +1829,11 @@ namespace Test { public class ListNodeProvidersResponse { - [CandidName("node_providers")] - public List NodeProviders { get; set; } + public List node_providers { get; set; } public ListNodeProvidersResponse(List nodeProviders) { - this.NodeProviders = nodeProviders; + this.node_providers = nodeProviders; } public ListNodeProvidersResponse() @@ -1946,7 +1844,6 @@ namespace Test Type File: 'ListProposalInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; using Test; @@ -1955,28 +1852,23 @@ namespace Test { public class ListProposalInfo { - [CandidName("include_reward_status")] - public List IncludeRewardStatus { get; set; } + public List include_reward_status { get; set; } - [CandidName("before_proposal")] - public OptionalValue BeforeProposal { get; set; } + public OptionalValue before_proposal { get; set; } - [CandidName("limit")] - public uint Limit { get; set; } + public uint limit { get; set; } - [CandidName("exclude_topic")] - public List ExcludeTopic { get; set; } + public List exclude_topic { get; set; } - [CandidName("include_status")] - public List IncludeStatus { get; set; } + public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) { - this.IncludeRewardStatus = includeRewardStatus; - this.BeforeProposal = beforeProposal; - this.Limit = limit; - this.ExcludeTopic = excludeTopic; - this.IncludeStatus = includeStatus; + this.include_reward_status = includeRewardStatus; + this.before_proposal = beforeProposal; + this.limit = limit; + this.exclude_topic = excludeTopic; + this.include_status = includeStatus; } public ListProposalInfo() @@ -1987,7 +1879,6 @@ namespace Test Type File: 'ListProposalInfoResponse' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -1995,12 +1886,11 @@ namespace Test { public class ListProposalInfoResponse { - [CandidName("proposal_info")] - public List ProposalInfo { get; set; } + public List proposal_info { get; set; } public ListProposalInfoResponse(List proposalInfo) { - this.ProposalInfo = proposalInfo; + this.proposal_info = proposalInfo; } public ListProposalInfoResponse() @@ -2011,7 +1901,6 @@ namespace Test Type File: 'MakeProposalResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2019,12 +1908,11 @@ namespace Test { public class MakeProposalResponse { - [CandidName("proposal_id")] - public OptionalValue ProposalId { get; set; } + public OptionalValue proposal_id { get; set; } public MakeProposalResponse(OptionalValue proposalId) { - this.ProposalId = proposalId; + this.proposal_id = proposalId; } public MakeProposalResponse() @@ -2035,7 +1923,6 @@ namespace Test Type File: 'ManageNeuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2043,20 +1930,17 @@ namespace Test { public class ManageNeuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("neuron_id_or_subaccount")] - public OptionalValue NeuronIdOrSubaccount { get; set; } + public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) { - this.Id = id; - this.Command = command; - this.NeuronIdOrSubaccount = neuronIdOrSubaccount; + this.id = id; + this.command = command; + this.neuron_id_or_subaccount = neuronIdOrSubaccount; } public ManageNeuron() @@ -2067,7 +1951,6 @@ namespace Test Type File: 'ManageNeuronResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2075,12 +1958,11 @@ namespace Test { public class ManageNeuronResponse { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - public ManageNeuronResponse(OptionalValue command) + public ManageNeuronResponse(OptionalValue command) { - this.Command = command; + this.command = command; } public ManageNeuronResponse() @@ -2091,7 +1973,6 @@ namespace Test Type File: 'Merge' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2099,12 +1980,11 @@ namespace Test { public class Merge { - [CandidName("source_neuron_id")] - public OptionalValue SourceNeuronId { get; set; } + public OptionalValue source_neuron_id { get; set; } public Merge(OptionalValue sourceNeuronId) { - this.SourceNeuronId = sourceNeuronId; + this.source_neuron_id = sourceNeuronId; } public Merge() @@ -2115,18 +1995,15 @@ namespace Test Type File: 'MergeMaturity' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class MergeMaturity { - [CandidName("percentage_to_merge")] - public uint PercentageToMerge { get; set; } + public uint percentage_to_merge { get; set; } public MergeMaturity(uint percentageToMerge) { - this.PercentageToMerge = percentageToMerge; + this.percentage_to_merge = percentageToMerge; } public MergeMaturity() @@ -2137,22 +2014,18 @@ namespace Test Type File: 'MergeMaturityResponse' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class MergeMaturityResponse { - [CandidName("merged_maturity_e8s")] - public ulong MergedMaturityE8s { get; set; } + public ulong merged_maturity_e8s { get; set; } - [CandidName("new_stake_e8s")] - public ulong NewStakeE8s { get; set; } + public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) { - this.MergedMaturityE8s = mergedMaturityE8s; - this.NewStakeE8s = newStakeE8s; + this.merged_maturity_e8s = mergedMaturityE8s; + this.new_stake_e8s = newStakeE8s; } public MergeMaturityResponse() @@ -2163,18 +2036,15 @@ namespace Test Type File: 'Motion' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Motion { - [CandidName("motion_text")] - public string MotionText { get; set; } + public string motion_text { get; set; } public Motion(string motionText) { - this.MotionText = motionText; + this.motion_text = motionText; } public Motion() @@ -2185,46 +2055,36 @@ namespace Test Type File: 'NetworkEconomics' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class NetworkEconomics { - [CandidName("neuron_minimum_stake_e8s")] - public ulong NeuronMinimumStakeE8s { get; set; } + public ulong neuron_minimum_stake_e8s { get; set; } - [CandidName("max_proposals_to_keep_per_topic")] - public uint MaxProposalsToKeepPerTopic { get; set; } + public uint max_proposals_to_keep_per_topic { get; set; } - [CandidName("neuron_management_fee_per_proposal_e8s")] - public ulong NeuronManagementFeePerProposalE8s { get; set; } + public ulong neuron_management_fee_per_proposal_e8s { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("transaction_fee_e8s")] - public ulong TransactionFeeE8s { get; set; } + public ulong transaction_fee_e8s { get; set; } - [CandidName("neuron_spawn_dissolve_delay_seconds")] - public ulong NeuronSpawnDissolveDelaySeconds { get; set; } + public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - [CandidName("minimum_icp_xdr_rate")] - public ulong MinimumIcpXdrRate { get; set; } + public ulong minimum_icp_xdr_rate { get; set; } - [CandidName("maximum_node_provider_rewards_e8s")] - public ulong MaximumNodeProviderRewardsE8s { get; set; } + public ulong maximum_node_provider_rewards_e8s { get; set; } public NetworkEconomics(ulong neuronMinimumStakeE8s, uint maxProposalsToKeepPerTopic, ulong neuronManagementFeePerProposalE8s, ulong rejectCostE8s, ulong transactionFeeE8s, ulong neuronSpawnDissolveDelaySeconds, ulong minimumIcpXdrRate, ulong maximumNodeProviderRewardsE8s) { - this.NeuronMinimumStakeE8s = neuronMinimumStakeE8s; - this.MaxProposalsToKeepPerTopic = maxProposalsToKeepPerTopic; - this.NeuronManagementFeePerProposalE8s = neuronManagementFeePerProposalE8s; - this.RejectCostE8s = rejectCostE8s; - this.TransactionFeeE8s = transactionFeeE8s; - this.NeuronSpawnDissolveDelaySeconds = neuronSpawnDissolveDelaySeconds; - this.MinimumIcpXdrRate = minimumIcpXdrRate; - this.MaximumNodeProviderRewardsE8s = maximumNodeProviderRewardsE8s; + this.neuron_minimum_stake_e8s = neuronMinimumStakeE8s; + this.max_proposals_to_keep_per_topic = maxProposalsToKeepPerTopic; + this.neuron_management_fee_per_proposal_e8s = neuronManagementFeePerProposalE8s; + this.reject_cost_e8s = rejectCostE8s; + this.transaction_fee_e8s = transactionFeeE8s; + this.neuron_spawn_dissolve_delay_seconds = neuronSpawnDissolveDelaySeconds; + this.minimum_icp_xdr_rate = minimumIcpXdrRate; + this.maximum_node_provider_rewards_e8s = maximumNodeProviderRewardsE8s; } public NetworkEconomics() @@ -2235,7 +2095,6 @@ namespace Test Type File: 'Neuron' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; using System.Collections.Generic; @@ -2244,76 +2103,59 @@ namespace Test { public class Neuron { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("controller")] - public OptionalValue Controller { get; set; } + public OptionalValue controller { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("kyc_verified")] - public bool KycVerified { get; set; } + public bool kyc_verified { get; set; } - [CandidName("not_for_profit")] - public bool NotForProfit { get; set; } + public bool not_for_profit { get; set; } - [CandidName("maturity_e8s_equivalent")] - public ulong MaturityE8sEquivalent { get; set; } + public ulong maturity_e8s_equivalent { get; set; } - [CandidName("cached_neuron_stake_e8s")] - public ulong CachedNeuronStakeE8s { get; set; } + public ulong cached_neuron_stake_e8s { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("aging_since_timestamp_seconds")] - public ulong AgingSinceTimestampSeconds { get; set; } + public ulong aging_since_timestamp_seconds { get; set; } - [CandidName("hot_keys")] - public List HotKeys { get; set; } + public List hot_keys { get; set; } - [CandidName("account")] - public List Account { get; set; } + public List account { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("dissolve_state")] - public OptionalValue DissolveState { get; set; } + public OptionalValue dissolve_state { get; set; } - [CandidName("followees")] - public List<(int, Followees)> Followees { get; set; } + public Dictionary followees { get; set; } - [CandidName("neuron_fees_e8s")] - public ulong NeuronFeesE8s { get; set; } + public ulong neuron_fees_e8s { get; set; } - [CandidName("transfer")] - public OptionalValue Transfer { get; set; } + public OptionalValue transfer { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, List<(int, Followees)> followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) + public Neuron(OptionalValue id, OptionalValue controller, List recentBallots, bool kycVerified, bool notForProfit, ulong maturityE8sEquivalent, ulong cachedNeuronStakeE8s, ulong createdTimestampSeconds, ulong agingSinceTimestampSeconds, List hotKeys, List account, OptionalValue joinedCommunityFundTimestampSeconds, OptionalValue dissolveState, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) { - this.Id = id; - this.Controller = controller; - this.RecentBallots = recentBallots; - this.KycVerified = kycVerified; - this.NotForProfit = notForProfit; - this.MaturityE8sEquivalent = maturityE8sEquivalent; - this.CachedNeuronStakeE8s = cachedNeuronStakeE8s; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.AgingSinceTimestampSeconds = agingSinceTimestampSeconds; - this.HotKeys = hotKeys; - this.Account = account; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.DissolveState = dissolveState; - this.Followees = followees; - this.NeuronFeesE8s = neuronFeesE8s; - this.Transfer = transfer; - this.KnownNeuronData = knownNeuronData; + this.id = id; + this.controller = controller; + this.recent_ballots = recentBallots; + this.kyc_verified = kycVerified; + this.not_for_profit = notForProfit; + this.maturity_e8s_equivalent = maturityE8sEquivalent; + this.cached_neuron_stake_e8s = cachedNeuronStakeE8s; + this.created_timestamp_seconds = createdTimestampSeconds; + this.aging_since_timestamp_seconds = agingSinceTimestampSeconds; + this.hot_keys = hotKeys; + this.account = account; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.dissolve_state = dissolveState; + this.followees = followees; + this.neuron_fees_e8s = neuronFeesE8s; + this.transfer = transfer; + this.known_neuron_data = knownNeuronData; } public Neuron() @@ -2324,18 +2166,15 @@ namespace Test Type File: 'NeuronId' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class NeuronId { - [CandidName("id")] - public ulong Id { get; set; } + public ulong id { get; set; } public NeuronId(ulong id) { - this.Id = id; + this.id = id; } public NeuronId() @@ -2414,7 +2253,6 @@ namespace Test Type File: 'NeuronInFlightCommand' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2422,16 +2260,14 @@ namespace Test { public class NeuronInFlightCommand { - [CandidName("command")] - public OptionalValue Command { get; set; } + public OptionalValue command { get; set; } - [CandidName("timestamp")] - public ulong Timestamp { get; set; } + public ulong timestamp { get; set; } - public NeuronInFlightCommand(OptionalValue command, ulong timestamp) + public NeuronInFlightCommand(OptionalValue command, ulong timestamp) { - this.Command = command; - this.Timestamp = timestamp; + this.command = command; + this.timestamp = timestamp; } public NeuronInFlightCommand() @@ -2442,7 +2278,6 @@ namespace Test Type File: 'NeuronInfo' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; using EdjCase.ICP.Candid.Models; @@ -2451,48 +2286,38 @@ namespace Test { public class NeuronInfo { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } - [CandidName("recent_ballots")] - public List RecentBallots { get; set; } + public List recent_ballots { get; set; } - [CandidName("created_timestamp_seconds")] - public ulong CreatedTimestampSeconds { get; set; } + public ulong created_timestamp_seconds { get; set; } - [CandidName("state")] - public int State { get; set; } + public int state { get; set; } - [CandidName("stake_e8s")] - public ulong StakeE8s { get; set; } + public ulong stake_e8s { get; set; } - [CandidName("joined_community_fund_timestamp_seconds")] - public OptionalValue JoinedCommunityFundTimestampSeconds { get; set; } + public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - [CandidName("retrieved_at_timestamp_seconds")] - public ulong RetrievedAtTimestampSeconds { get; set; } + public ulong retrieved_at_timestamp_seconds { get; set; } - [CandidName("known_neuron_data")] - public OptionalValue KnownNeuronData { get; set; } + public OptionalValue known_neuron_data { get; set; } - [CandidName("voting_power")] - public ulong VotingPower { get; set; } + public ulong voting_power { get; set; } - [CandidName("age_seconds")] - public ulong AgeSeconds { get; set; } + public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, OptionalValue joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, OptionalValue knownNeuronData, ulong votingPower, ulong ageSeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; - this.RecentBallots = recentBallots; - this.CreatedTimestampSeconds = createdTimestampSeconds; - this.State = state; - this.StakeE8s = stakeE8s; - this.JoinedCommunityFundTimestampSeconds = joinedCommunityFundTimestampSeconds; - this.RetrievedAtTimestampSeconds = retrievedAtTimestampSeconds; - this.KnownNeuronData = knownNeuronData; - this.VotingPower = votingPower; - this.AgeSeconds = ageSeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; + this.recent_ballots = recentBallots; + this.created_timestamp_seconds = createdTimestampSeconds; + this.state = state; + this.stake_e8s = stakeE8s; + this.joined_community_fund_timestamp_seconds = joinedCommunityFundTimestampSeconds; + this.retrieved_at_timestamp_seconds = retrievedAtTimestampSeconds; + this.known_neuron_data = knownNeuronData; + this.voting_power = votingPower; + this.age_seconds = ageSeconds; } public NeuronInfo() @@ -2503,7 +2328,6 @@ namespace Test Type File: 'NeuronStakeTransfer' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using EdjCase.ICP.Candid.Models; @@ -2511,36 +2335,29 @@ namespace Test { public class NeuronStakeTransfer { - [CandidName("to_subaccount")] - public List ToSubaccount { get; set; } + public List to_subaccount { get; set; } - [CandidName("neuron_stake_e8s")] - public ulong NeuronStakeE8s { get; set; } + public ulong neuron_stake_e8s { get; set; } - [CandidName("from")] - public OptionalValue From { get; set; } + public OptionalValue from { get; set; } - [CandidName("memo")] - public ulong Memo { get; set; } + public ulong memo { get; set; } - [CandidName("from_subaccount")] - public List FromSubaccount { get; set; } + public List from_subaccount { get; set; } - [CandidName("transfer_timestamp")] - public ulong TransferTimestamp { get; set; } + public ulong transfer_timestamp { get; set; } - [CandidName("block_height")] - public ulong BlockHeight { get; set; } + public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) { - this.ToSubaccount = toSubaccount; - this.NeuronStakeE8s = neuronStakeE8s; - this.From = from; - this.Memo = memo; - this.FromSubaccount = fromSubaccount; - this.TransferTimestamp = transferTimestamp; - this.BlockHeight = blockHeight; + this.to_subaccount = toSubaccount; + this.neuron_stake_e8s = neuronStakeE8s; + this.from = from; + this.memo = memo; + this.from_subaccount = fromSubaccount; + this.transfer_timestamp = transferTimestamp; + this.block_height = blockHeight; } public NeuronStakeTransfer() @@ -2551,7 +2368,6 @@ namespace Test Type File: 'NodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2559,16 +2375,14 @@ namespace Test { public class NodeProvider { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) { - this.Id = id; - this.RewardAccount = rewardAccount; + this.id = id; + this.reward_account = rewardAccount; } public NodeProvider() @@ -2732,7 +2546,6 @@ namespace Test Type File: 'Proposal' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2740,24 +2553,20 @@ namespace Test { public class Proposal { - [CandidName("url")] - public string Url { get; set; } + public string url { get; set; } - [CandidName("title")] - public OptionalValue Title { get; set; } + public OptionalValue title { get; set; } - [CandidName("action")] - public OptionalValue Action { get; set; } + public OptionalValue action { get; set; } - [CandidName("summary")] - public string Summary { get; set; } + public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) { - this.Url = url; - this.Title = title; - this.Action = action; - this.Summary = summary; + this.url = url; + this.title = title; + this.action = action; + this.summary = summary; } public Proposal() @@ -2768,7 +2577,6 @@ namespace Test Type File: 'ProposalData' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; using System.Collections.Generic; @@ -2777,60 +2585,47 @@ namespace Test { public class ProposalData { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("wait_for_quiet_state")] - public OptionalValue WaitForQuietState { get; set; } + public OptionalValue wait_for_quiet_state { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalData(OptionalValue id, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) + public ProposalData(OptionalValue id, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, OptionalValue waitForQuietState, ulong executedTimestampSeconds) { - this.Id = id; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.WaitForQuietState = waitForQuietState; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.wait_for_quiet_state = waitForQuietState; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalData() @@ -2841,7 +2636,6 @@ namespace Test Type File: 'ProposalInfo' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; using System.Collections.Generic; @@ -2850,72 +2644,56 @@ namespace Test { public class ProposalInfo { - [CandidName("id")] - public OptionalValue Id { get; set; } + public OptionalValue id { get; set; } - [CandidName("status")] - public int Status { get; set; } + public int status { get; set; } - [CandidName("topic")] - public int Topic { get; set; } + public int topic { get; set; } - [CandidName("failure_reason")] - public OptionalValue FailureReason { get; set; } + public OptionalValue failure_reason { get; set; } - [CandidName("ballots")] - public List<(ulong, Ballot)> Ballots { get; set; } + public Dictionary ballots { get; set; } - [CandidName("proposal_timestamp_seconds")] - public ulong ProposalTimestampSeconds { get; set; } + public ulong proposal_timestamp_seconds { get; set; } - [CandidName("reward_event_round")] - public ulong RewardEventRound { get; set; } + public ulong reward_event_round { get; set; } - [CandidName("deadline_timestamp_seconds")] - public OptionalValue DeadlineTimestampSeconds { get; set; } + public OptionalValue deadline_timestamp_seconds { get; set; } - [CandidName("failed_timestamp_seconds")] - public ulong FailedTimestampSeconds { get; set; } + public ulong failed_timestamp_seconds { get; set; } - [CandidName("reject_cost_e8s")] - public ulong RejectCostE8s { get; set; } + public ulong reject_cost_e8s { get; set; } - [CandidName("latest_tally")] - public OptionalValue LatestTally { get; set; } + public OptionalValue latest_tally { get; set; } - [CandidName("reward_status")] - public int RewardStatus { get; set; } + public int reward_status { get; set; } - [CandidName("decided_timestamp_seconds")] - public ulong DecidedTimestampSeconds { get; set; } + public ulong decided_timestamp_seconds { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } - [CandidName("proposer")] - public OptionalValue Proposer { get; set; } + public OptionalValue proposer { get; set; } - [CandidName("executed_timestamp_seconds")] - public ulong ExecutedTimestampSeconds { get; set; } + public ulong executed_timestamp_seconds { get; set; } - public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, List<(ulong, Ballot)> ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) + public ProposalInfo(OptionalValue id, int status, int topic, OptionalValue failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, OptionalValue deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, OptionalValue latestTally, int rewardStatus, ulong decidedTimestampSeconds, OptionalValue proposal, OptionalValue proposer, ulong executedTimestampSeconds) { - this.Id = id; - this.Status = status; - this.Topic = topic; - this.FailureReason = failureReason; - this.Ballots = ballots; - this.ProposalTimestampSeconds = proposalTimestampSeconds; - this.RewardEventRound = rewardEventRound; - this.DeadlineTimestampSeconds = deadlineTimestampSeconds; - this.FailedTimestampSeconds = failedTimestampSeconds; - this.RejectCostE8s = rejectCostE8s; - this.LatestTally = latestTally; - this.RewardStatus = rewardStatus; - this.DecidedTimestampSeconds = decidedTimestampSeconds; - this.Proposal = proposal; - this.Proposer = proposer; - this.ExecutedTimestampSeconds = executedTimestampSeconds; + this.id = id; + this.status = status; + this.topic = topic; + this.failure_reason = failureReason; + this.ballots = ballots; + this.proposal_timestamp_seconds = proposalTimestampSeconds; + this.reward_event_round = rewardEventRound; + this.deadline_timestamp_seconds = deadlineTimestampSeconds; + this.failed_timestamp_seconds = failedTimestampSeconds; + this.reject_cost_e8s = rejectCostE8s; + this.latest_tally = latestTally; + this.reward_status = rewardStatus; + this.decided_timestamp_seconds = decidedTimestampSeconds; + this.proposal = proposal; + this.proposer = proposer; + this.executed_timestamp_seconds = executedTimestampSeconds; } public ProposalInfo() @@ -2926,7 +2704,6 @@ namespace Test Type File: 'RegisterVote' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -2934,16 +2711,14 @@ namespace Test { public class RegisterVote { - [CandidName("vote")] - public int Vote { get; set; } + public int vote { get; set; } - [CandidName("proposal")] - public OptionalValue Proposal { get; set; } + public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) { - this.Vote = vote; - this.Proposal = proposal; + this.vote = vote; + this.proposal = proposal; } public RegisterVote() @@ -2954,19 +2729,17 @@ namespace Test Type File: 'RemoveHotKey' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class RemoveHotKey { - [CandidName("hot_key_to_remove")] - public OptionalValue HotKeyToRemove { get; set; } + public OptionalValue hot_key_to_remove { get; set; } public RemoveHotKey(OptionalValue hotKeyToRemove) { - this.HotKeyToRemove = hotKeyToRemove; + this.hot_key_to_remove = hotKeyToRemove; } public RemoveHotKey() @@ -3035,7 +2808,7 @@ namespace Test } } -Type File: 'Result1' +Type File: 'Result_1' using EdjCase.ICP.Candid.Mapping; using Test; @@ -3043,48 +2816,48 @@ using System; namespace Test { - [Variant(typeof(Result1Tag))] - public class Result1 + [Variant(typeof(Result_1Tag))] + public class Result_1 { [VariantTagProperty()] - public Result1Tag Tag { get; set; } + public Result_1Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result1(Result1Tag tag, object? value) + public Result_1(Result_1Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result1() + protected Result_1() { } - public static Result1 Error(GovernanceError info) + public static Result_1 Error(GovernanceError info) { - return new Result1(Result1Tag.Error, info); + return new Result_1(Result_1Tag.Error, info); } - public static Result1 NeuronId(NeuronId info) + public static Result_1 NeuronId(NeuronId info) { - return new Result1(Result1Tag.NeuronId, info); + return new Result_1(Result_1Tag.NeuronId, info); } public GovernanceError AsError() { - this.ValidateTag(Result1Tag.Error); + this.ValidateTag(Result_1Tag.Error); return (GovernanceError)this.Value!; } public NeuronId AsNeuronId() { - this.ValidateTag(Result1Tag.NeuronId); + this.ValidateTag(Result_1Tag.NeuronId); return (NeuronId)this.Value!; } - private void ValidateTag(Result1Tag tag) + private void ValidateTag(Result_1Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3093,7 +2866,7 @@ namespace Test } } - public enum Result1Tag + public enum Result_1Tag { [VariantOptionType(typeof(GovernanceError))] Error, @@ -3102,7 +2875,7 @@ namespace Test } } -Type File: 'Result2' +Type File: 'Result_2' using EdjCase.ICP.Candid.Mapping; using Test; @@ -3110,48 +2883,48 @@ using System; namespace Test { - [Variant(typeof(Result2Tag))] - public class Result2 + [Variant(typeof(Result_2Tag))] + public class Result_2 { [VariantTagProperty()] - public Result2Tag Tag { get; set; } + public Result_2Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result2(Result2Tag tag, object? value) + public Result_2(Result_2Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result2() + protected Result_2() { } - public static Result2 Ok(Neuron info) + public static Result_2 Ok(Neuron info) { - return new Result2(Result2Tag.Ok, info); + return new Result_2(Result_2Tag.Ok, info); } - public static Result2 Err(GovernanceError info) + public static Result_2 Err(GovernanceError info) { - return new Result2(Result2Tag.Err, info); + return new Result_2(Result_2Tag.Err, info); } public Neuron AsOk() { - this.ValidateTag(Result2Tag.Ok); + this.ValidateTag(Result_2Tag.Ok); return (Neuron)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result2Tag.Err); + this.ValidateTag(Result_2Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result2Tag tag) + private void ValidateTag(Result_2Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3160,7 +2933,7 @@ namespace Test } } - public enum Result2Tag + public enum Result_2Tag { [VariantOptionType(typeof(Neuron))] Ok, @@ -3169,7 +2942,7 @@ namespace Test } } -Type File: 'Result3' +Type File: 'Result_3' using EdjCase.ICP.Candid.Mapping; using Test; @@ -3177,48 +2950,48 @@ using System; namespace Test { - [Variant(typeof(Result3Tag))] - public class Result3 + [Variant(typeof(Result_3Tag))] + public class Result_3 { [VariantTagProperty()] - public Result3Tag Tag { get; set; } + public Result_3Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result3(Result3Tag tag, object? value) + public Result_3(Result_3Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result3() + protected Result_3() { } - public static Result3 Ok(RewardNodeProviders info) + public static Result_3 Ok(RewardNodeProviders info) { - return new Result3(Result3Tag.Ok, info); + return new Result_3(Result_3Tag.Ok, info); } - public static Result3 Err(GovernanceError info) + public static Result_3 Err(GovernanceError info) { - return new Result3(Result3Tag.Err, info); + return new Result_3(Result_3Tag.Err, info); } public RewardNodeProviders AsOk() { - this.ValidateTag(Result3Tag.Ok); + this.ValidateTag(Result_3Tag.Ok); return (RewardNodeProviders)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result3Tag.Err); + this.ValidateTag(Result_3Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result3Tag tag) + private void ValidateTag(Result_3Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3227,7 +3000,7 @@ namespace Test } } - public enum Result3Tag + public enum Result_3Tag { [VariantOptionType(typeof(RewardNodeProviders))] Ok, @@ -3236,7 +3009,7 @@ namespace Test } } -Type File: 'Result4' +Type File: 'Result_4' using EdjCase.ICP.Candid.Mapping; using Test; @@ -3244,48 +3017,48 @@ using System; namespace Test { - [Variant(typeof(Result4Tag))] - public class Result4 + [Variant(typeof(Result_4Tag))] + public class Result_4 { [VariantTagProperty()] - public Result4Tag Tag { get; set; } + public Result_4Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result4(Result4Tag tag, object? value) + public Result_4(Result_4Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result4() + protected Result_4() { } - public static Result4 Ok(NeuronInfo info) + public static Result_4 Ok(NeuronInfo info) { - return new Result4(Result4Tag.Ok, info); + return new Result_4(Result_4Tag.Ok, info); } - public static Result4 Err(GovernanceError info) + public static Result_4 Err(GovernanceError info) { - return new Result4(Result4Tag.Err, info); + return new Result_4(Result_4Tag.Err, info); } public NeuronInfo AsOk() { - this.ValidateTag(Result4Tag.Ok); + this.ValidateTag(Result_4Tag.Ok); return (NeuronInfo)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result4Tag.Err); + this.ValidateTag(Result_4Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result4Tag tag) + private void ValidateTag(Result_4Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3294,7 +3067,7 @@ namespace Test } } - public enum Result4Tag + public enum Result_4Tag { [VariantOptionType(typeof(NeuronInfo))] Ok, @@ -3303,7 +3076,7 @@ namespace Test } } -Type File: 'Result5' +Type File: 'Result_5' using EdjCase.ICP.Candid.Mapping; using Test; @@ -3311,48 +3084,48 @@ using System; namespace Test { - [Variant(typeof(Result5Tag))] - public class Result5 + [Variant(typeof(Result_5Tag))] + public class Result_5 { [VariantTagProperty()] - public Result5Tag Tag { get; set; } + public Result_5Tag Tag { get; set; } [VariantValueProperty()] public object? Value { get; set; } - public Result5(Result5Tag tag, object? value) + public Result_5(Result_5Tag tag, object? value) { this.Tag = tag; this.Value = value; } - protected Result5() + protected Result_5() { } - public static Result5 Ok(NodeProvider info) + public static Result_5 Ok(NodeProvider info) { - return new Result5(Result5Tag.Ok, info); + return new Result_5(Result_5Tag.Ok, info); } - public static Result5 Err(GovernanceError info) + public static Result_5 Err(GovernanceError info) { - return new Result5(Result5Tag.Err, info); + return new Result_5(Result_5Tag.Err, info); } public NodeProvider AsOk() { - this.ValidateTag(Result5Tag.Ok); + this.ValidateTag(Result_5Tag.Ok); return (NodeProvider)this.Value!; } public GovernanceError AsErr() { - this.ValidateTag(Result5Tag.Err); + this.ValidateTag(Result_5Tag.Err); return (GovernanceError)this.Value!; } - private void ValidateTag(Result5Tag tag) + private void ValidateTag(Result_5Tag tag) { if (!this.Tag.Equals(tag)) { @@ -3361,7 +3134,7 @@ namespace Test } } - public enum Result5Tag + public enum Result_5Tag { [VariantOptionType(typeof(NodeProvider))] Ok, @@ -3372,7 +3145,6 @@ namespace Test Type File: 'RewardEvent' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -3380,24 +3152,20 @@ namespace Test { public class RewardEvent { - [CandidName("day_after_genesis")] - public ulong DayAfterGenesis { get; set; } + public ulong day_after_genesis { get; set; } - [CandidName("actual_timestamp_seconds")] - public ulong ActualTimestampSeconds { get; set; } + public ulong actual_timestamp_seconds { get; set; } - [CandidName("distributed_e8s_equivalent")] - public ulong DistributedE8sEquivalent { get; set; } + public ulong distributed_e8s_equivalent { get; set; } - [CandidName("settled_proposals")] - public List SettledProposals { get; set; } + public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) { - this.DayAfterGenesis = dayAfterGenesis; - this.ActualTimestampSeconds = actualTimestampSeconds; - this.DistributedE8sEquivalent = distributedE8sEquivalent; - this.SettledProposals = settledProposals; + this.day_after_genesis = dayAfterGenesis; + this.actual_timestamp_seconds = actualTimestampSeconds; + this.distributed_e8s_equivalent = distributedE8sEquivalent; + this.settled_proposals = settledProposals; } public RewardEvent() @@ -3475,7 +3243,6 @@ namespace Test Type File: 'RewardNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -3483,20 +3250,17 @@ namespace Test { public class RewardNodeProvider { - [CandidName("node_provider")] - public OptionalValue NodeProvider { get; set; } + public OptionalValue node_provider { get; set; } - [CandidName("reward_mode")] - public OptionalValue RewardMode { get; set; } + public OptionalValue reward_mode { get; set; } - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) { - this.NodeProvider = nodeProvider; - this.RewardMode = rewardMode; - this.AmountE8s = amountE8s; + this.node_provider = nodeProvider; + this.reward_mode = rewardMode; + this.amount_e8s = amountE8s; } public RewardNodeProvider() @@ -3507,7 +3271,6 @@ namespace Test Type File: 'RewardNodeProviders' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using System.Collections.Generic; using Test; @@ -3516,16 +3279,14 @@ namespace Test { public class RewardNodeProviders { - [CandidName("use_registry_derived_rewards")] - public OptionalValue UseRegistryDerivedRewards { get; set; } + public OptionalValue use_registry_derived_rewards { get; set; } - [CandidName("rewards")] - public List Rewards { get; set; } + public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) { - this.UseRegistryDerivedRewards = useRegistryDerivedRewards; - this.Rewards = rewards; + this.use_registry_derived_rewards = useRegistryDerivedRewards; + this.rewards = rewards; } public RewardNodeProviders() @@ -3536,7 +3297,6 @@ namespace Test Type File: 'RewardToAccount' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -3544,12 +3304,11 @@ namespace Test { public class RewardToAccount { - [CandidName("to_account")] - public OptionalValue ToAccount { get; set; } + public OptionalValue to_account { get; set; } public RewardToAccount(OptionalValue toAccount) { - this.ToAccount = toAccount; + this.to_account = toAccount; } public RewardToAccount() @@ -3560,18 +3319,15 @@ namespace Test Type File: 'RewardToNeuron' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class RewardToNeuron { - [CandidName("dissolve_delay_seconds")] - public ulong DissolveDelaySeconds { get; set; } + public ulong dissolve_delay_seconds { get; set; } public RewardToNeuron(ulong dissolveDelaySeconds) { - this.DissolveDelaySeconds = dissolveDelaySeconds; + this.dissolve_delay_seconds = dissolveDelaySeconds; } public RewardToNeuron() @@ -3582,7 +3338,6 @@ namespace Test Type File: 'SetDefaultFollowees' -using EdjCase.ICP.Candid.Mapping; using System.Collections.Generic; using Test; @@ -3590,12 +3345,11 @@ namespace Test { public class SetDefaultFollowees { - [CandidName("default_followees")] - public List<(int, Followees)> DefaultFollowees { get; set; } + public Dictionary default_followees { get; set; } - public SetDefaultFollowees(List<(int, Followees)> defaultFollowees) + public SetDefaultFollowees(Dictionary defaultFollowees) { - this.DefaultFollowees = defaultFollowees; + this.default_followees = defaultFollowees; } public SetDefaultFollowees() @@ -3606,18 +3360,15 @@ namespace Test Type File: 'SetDissolveTimestamp' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class SetDissolveTimestamp { - [CandidName("dissolve_timestamp_seconds")] - public ulong DissolveTimestampSeconds { get; set; } + public ulong dissolve_timestamp_seconds { get; set; } public SetDissolveTimestamp(ulong dissolveTimestampSeconds) { - this.DissolveTimestampSeconds = dissolveTimestampSeconds; + this.dissolve_timestamp_seconds = dissolveTimestampSeconds; } public SetDissolveTimestamp() @@ -3628,27 +3379,23 @@ namespace Test Type File: 'Spawn' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; namespace Test { public class Spawn { - [CandidName("percentage_to_spawn")] - public OptionalValue PercentageToSpawn { get; set; } + public OptionalValue percentage_to_spawn { get; set; } - [CandidName("new_controller")] - public OptionalValue NewController { get; set; } + public OptionalValue new_controller { get; set; } - [CandidName("nonce")] - public OptionalValue Nonce { get; set; } + public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) { - this.PercentageToSpawn = percentageToSpawn; - this.NewController = newController; - this.Nonce = nonce; + this.percentage_to_spawn = percentageToSpawn; + this.new_controller = newController; + this.nonce = nonce; } public Spawn() @@ -3659,7 +3406,6 @@ namespace Test Type File: 'SpawnResponse' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -3667,12 +3413,11 @@ namespace Test { public class SpawnResponse { - [CandidName("created_neuron_id")] - public OptionalValue CreatedNeuronId { get; set; } + public OptionalValue created_neuron_id { get; set; } public SpawnResponse(OptionalValue createdNeuronId) { - this.CreatedNeuronId = createdNeuronId; + this.created_neuron_id = createdNeuronId; } public SpawnResponse() @@ -3683,18 +3428,15 @@ namespace Test Type File: 'Split' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Split { - [CandidName("amount_e8s")] - public ulong AmountE8s { get; set; } + public ulong amount_e8s { get; set; } public Split(ulong amountE8s) { - this.AmountE8s = amountE8s; + this.amount_e8s = amountE8s; } public Split() @@ -3705,30 +3447,24 @@ namespace Test Type File: 'Tally' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class Tally { - [CandidName("no")] - public ulong No { get; set; } + public ulong no { get; set; } - [CandidName("yes")] - public ulong Yes { get; set; } + public ulong yes { get; set; } - [CandidName("total")] - public ulong Total { get; set; } + public ulong total { get; set; } - [CandidName("timestamp_seconds")] - public ulong TimestampSeconds { get; set; } + public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) { - this.No = no; - this.Yes = yes; - this.Total = total; - this.TimestampSeconds = timestampSeconds; + this.no = no; + this.yes = yes; + this.total = total; + this.timestamp_seconds = timestampSeconds; } public Tally() @@ -3739,7 +3475,6 @@ namespace Test Type File: 'UpdateNodeProvider' -using EdjCase.ICP.Candid.Mapping; using EdjCase.ICP.Candid.Models; using Test; @@ -3747,12 +3482,11 @@ namespace Test { public class UpdateNodeProvider { - [CandidName("reward_account")] - public OptionalValue RewardAccount { get; set; } + public OptionalValue reward_account { get; set; } public UpdateNodeProvider(OptionalValue rewardAccount) { - this.RewardAccount = rewardAccount; + this.reward_account = rewardAccount; } public UpdateNodeProvider() @@ -3763,18 +3497,15 @@ namespace Test Type File: 'WaitForQuietState' -using EdjCase.ICP.Candid.Mapping; - namespace Test { public class WaitForQuietState { - [CandidName("current_deadline_timestamp_seconds")] - public ulong CurrentDeadlineTimestampSeconds { get; set; } + public ulong current_deadline_timestamp_seconds { get; set; } public WaitForQuietState(ulong currentDeadlineTimestampSeconds) { - this.CurrentDeadlineTimestampSeconds = currentDeadlineTimestampSeconds; + this.current_deadline_timestamp_seconds = currentDeadlineTimestampSeconds; } public WaitForQuietState()