diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3ae75c0d..45d454ad 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -27,7 +27,7 @@ jobs: run: dotnet publish ./src/WebSockets --no-restore -c Release -o ./publish-agent - name: Upload Agent Binaries Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: binaries-agent path: publish-agent diff --git a/src/Agent/API.xml b/src/Agent/API.xml index 52c70ba1..8de8b54a 100644 --- a/src/Agent/API.xml +++ b/src/Agent/API.xml @@ -4,45 +4,6 @@ EdjCase.ICP.Agent - - - An `IAgent` implementation using HTTP to make requests to the IC - - - - - The identity that will be used on each request unless overriden - This identity can be anonymous - - - - Optional. Identity to use for each request. If unspecified, will use anonymous identity - Optional. Bls crypto implementation to validate signatures. If unspecified, will use default implementation - Optional. Sets the http client to use, otherwise will use the default http client - - - Optional. Identity to use for each request. If unspecified, will use anonymous identity - Optional. Bls crypto implementation to validate signatures. If unspecified, will use default implementation - Url to the boundry node to connect to. Defaults to `https://ic0.app/` - - - - - - - - - - - - - - - - - - - The default http client to use with the built in `HttpClient` @@ -111,6 +72,45 @@ + + + An `IAgent` implementation using HTTP to make requests to the IC + + + + + The identity that will be used on each request unless overriden + This identity can be anonymous + + + + Optional. Identity to use for each request. If unspecified, will use anonymous identity + Optional. Bls crypto implementation to validate signatures. If unspecified, will use default implementation + Optional. Sets the http client to use, otherwise will use the default http client + + + Optional. Identity to use for each request. If unspecified, will use anonymous identity + Optional. Bls crypto implementation to validate signatures. If unspecified, will use default implementation + Url to the boundry node to connect to. Defaults to `https://ic0.app/` + + + + + + + + + + + + + + + + + + + An agent is used to communicate with the Internet Computer with certain protocols that diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 9b9e2d89..c80d574a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index c214dad0..080588ce 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index d331df95..2a36ca3f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 2fd21dd7..507a3bb9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class AnonymousTuplesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index ab3414e0..ac6645af 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index eed97b2e..e9e79484 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 8e7cba4a..ccee9c67 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -193,9 +189,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) @@ -288,9 +282,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -338,9 +330,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index c13f9365..1bf8808f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -192,7 +188,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -288,9 +283,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -338,9 +331,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index b1f130f4..b79cd3f3 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -292,15 +290,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index cf0d05c6..16209e66 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -292,15 +290,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index d00c00cc..8461cda7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -193,9 +189,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) @@ -238,15 +232,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +270,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -331,9 +318,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) @@ -375,9 +360,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 525bc407..fc2591a6 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -192,7 +188,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -238,15 +233,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +271,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -331,9 +319,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) @@ -375,9 +361,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 5db770f9..ecf404d0 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 0f0e3073..d4840710 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index ad041378..530fef6b 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -193,9 +189,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue? Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) @@ -288,9 +282,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -338,9 +330,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 4375d07b..10c6f64f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -192,7 +188,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -288,9 +283,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -338,9 +331,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index ef17188e..b0619611 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -292,15 +290,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 70d42e42..d2dab1d0 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -292,15 +290,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 67fe2228..a42a834b 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -193,9 +189,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue? Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) @@ -238,15 +232,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +270,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -331,9 +318,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) @@ -375,9 +360,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 998d6749..1e396b8f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -192,7 +188,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -238,15 +233,10 @@ namespace Test.Models public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +271,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -331,9 +319,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) @@ -375,9 +361,7 @@ namespace Test.Models public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index b19fe332..9390231d 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 43336b41..49fa0edf 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index b67ef8a6..b587b06b 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -193,9 +189,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) @@ -288,9 +282,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -338,9 +330,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 522d987d..a04e39cf 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -192,7 +188,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -288,9 +283,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -338,9 +331,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 201b8524..e4f8a817 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -292,15 +290,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 6991f7f6..f6f940c7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -292,15 +290,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 24acd877..03c2c143 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -193,9 +189,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object value) @@ -238,15 +232,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +270,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -331,9 +318,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) @@ -375,9 +360,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 40e89e23..35e78050 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public WithdrawErr Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object value) @@ -192,7 +188,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public OrderPlacementErr Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -238,15 +233,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +271,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public DepositErr Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object value) @@ -331,9 +319,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public CancelOrderErr Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object value) @@ -375,9 +361,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 5bbf3d0a..c2953812 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index cac7fa36..b4107f3b 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 75153efe..56497f79 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -193,9 +189,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue? Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) @@ -288,9 +282,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -338,9 +330,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index edb7a00a..cedf905f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -192,7 +188,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -288,9 +283,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -338,9 +331,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index af76707d..da45b930 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -292,15 +290,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 28e98278..9d23bac7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -292,15 +290,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -483,9 +476,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index c9648696..dbaeac95 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -193,9 +189,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue? Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) @@ -238,15 +232,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +270,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -331,9 +318,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) @@ -375,9 +360,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 95c248f6..fab489a1 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -13,9 +13,7 @@ namespace Test public class DexApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -143,9 +141,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } public WithdrawReceipt(WithdrawReceiptTag tag, object? value) @@ -192,7 +188,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } [CandidOptional] @@ -238,15 +233,10 @@ namespace Test public class Order { public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { get; set; } - public UnboundedUInt toAmount { get; set; } public Order(Token from, UnboundedUInt fromAmount, OrderId id, Principal owner, Token to, UnboundedUInt toAmount) @@ -281,9 +271,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } public DepositReceipt(DepositReceiptTag tag, object? value) @@ -331,9 +319,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) @@ -375,9 +361,7 @@ namespace Test public class Balance { public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } public Balance(UnboundedUInt amount, Principal owner, Token token) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 6ada7655..c62edfb7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 6ada7655..c62edfb7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 6ada7655..c62edfb7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 6ada7655..c62edfb7 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 1312f3a3..088aedad 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 1312f3a3..088aedad 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 1312f3a3..088aedad 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 1312f3a3..088aedad 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 6015c723..4808cb55 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 6015c723..4808cb55 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 6015c723..4808cb55 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 6015c723..4808cb55 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 0b6a4542..4d42ec0e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 0b6a4542..4d42ec0e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 0b6a4542..4d42ec0e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 0b6a4542..4d42ec0e 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test.Models public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 8feb8a4e..31884c7f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 8feb8a4e..31884c7f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 8feb8a4e..31884c7f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 8feb8a4e..31884c7f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 4492d533..e5c86da4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 4492d533..e5c86da4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 4492d533..e5c86da4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 4492d533..e5c86da4 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 6f5995fd..2fcbbc30 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 6f5995fd..2fcbbc30 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 6f5995fd..2fcbbc30 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 6f5995fd..2fcbbc30 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index be72442a..3c3cc579 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index be72442a..3c3cc579 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index be72442a..3c3cc579 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index be72442a..3c3cc579 100644 --- a/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -10,9 +10,7 @@ namespace Test public class DuplicatePropertyNamesApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -39,7 +37,6 @@ namespace Test public class Result { public ulong a { get; set; } - public ulong _a { get; set; } public Result(ulong a, ulong _a) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 36d1815c..769aa6ef 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 5fbb1643..de7ddfc5 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 015f2d31..80994a90 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -217,25 +215,15 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -426,11 +414,8 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -474,9 +459,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -611,27 +594,16 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -676,29 +648,17 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object value) @@ -772,21 +732,13 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object value) @@ -941,9 +893,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -1817,9 +1767,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -2020,19 +1968,12 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -2339,7 +2280,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2375,9 +2315,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object value) @@ -2413,9 +2351,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object value) @@ -2451,9 +2387,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object value) @@ -2489,9 +2423,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object value) @@ -2527,9 +2459,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object value) @@ -2601,9 +2531,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index b18e673f..71ae76ba 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -217,25 +215,15 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -427,11 +415,8 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -475,9 +460,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -613,27 +596,16 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -678,29 +650,17 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object value) @@ -774,21 +734,13 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object value) @@ -945,9 +897,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -1832,9 +1782,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -2039,19 +1987,12 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -2370,7 +2311,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2406,9 +2346,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object value) @@ -2444,9 +2382,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object value) @@ -2482,9 +2418,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object value) @@ -2520,9 +2454,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object value) @@ -2558,9 +2490,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object value) @@ -2632,9 +2562,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 2b557446..84f2410d 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -452,7 +450,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -477,7 +474,6 @@ namespace Test.Models public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -672,7 +668,6 @@ namespace Test.Models public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -1286,7 +1281,6 @@ namespace Test.Models public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -1329,13 +1323,9 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -1427,7 +1417,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1452,7 +1441,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1500,27 +1488,16 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1554,35 +1531,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1618,7 +1580,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1662,7 +1623,6 @@ namespace Test.Models public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1686,7 +1646,6 @@ namespace Test.Models public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1732,7 +1691,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1757,7 +1715,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1805,13 +1762,9 @@ namespace Test.Models public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1883,9 +1836,7 @@ namespace Test.Models public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1971,7 +1922,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2012,19 +1962,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2056,37 +1999,21 @@ namespace Test.Models public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -2211,7 +2138,6 @@ namespace Test.Models public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -2237,23 +2163,14 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -2286,17 +2203,11 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2326,7 +2237,6 @@ namespace Test.Models public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -2497,11 +2407,8 @@ namespace Test.Models public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -2529,29 +2436,17 @@ namespace Test.Models public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2588,35 +2483,20 @@ namespace Test.Models public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2655,7 +2535,6 @@ namespace Test.Models public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -3085,11 +2964,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3181,9 +3057,7 @@ namespace Test.Models public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -3210,7 +3084,6 @@ namespace Test.Models public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -3316,9 +3189,7 @@ namespace Test.Models public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -3382,11 +3253,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 08051cdc..741ed416 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -455,7 +453,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -679,7 +676,6 @@ namespace Test.Models { [CandidOptional] public Principal controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal controller, ulong memo) @@ -1342,14 +1338,11 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal newController, ulong nonce) @@ -1441,7 +1434,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1466,7 +1458,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1514,12 +1505,10 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1527,17 +1516,11 @@ namespace Test.Models [CandidOptional] public RewardEvent latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics metrics, List nodeProviders, NetworkEconomics economics, RewardEvent latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1571,35 +1554,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1635,7 +1603,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1752,7 +1719,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1777,7 +1743,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1828,11 +1793,8 @@ namespace Test.Models [CandidOptional] public NeuronId before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1998,7 +1960,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2039,19 +2000,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2088,23 +2042,14 @@ namespace Test.Models [CandidOptional] public Principal controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -2112,9 +2057,7 @@ namespace Test.Models [CandidOptional] public DissolveState dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -2246,7 +2189,6 @@ namespace Test.Models { [CandidOptional] public Command_2 command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2 command, ulong timestamp) @@ -2272,25 +2214,18 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -2324,18 +2259,13 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2545,7 +2475,6 @@ namespace Test.Models [CandidOptional] public Action action { get; set; } - public string summary { get; set; } public Proposal(string url, string title, Action action, string summary) @@ -2577,20 +2506,14 @@ namespace Test.Models [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2601,7 +2524,6 @@ namespace Test.Models [CandidOptional] public WaitForQuietState wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId id, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, WaitForQuietState waitForQuietState, ulong executedTimestampSeconds) @@ -2639,32 +2561,23 @@ namespace Test.Models { [CandidOptional] public NeuronId id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2672,7 +2585,6 @@ namespace Test.Models [CandidOptional] public NeuronId proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId id, int status, int topic, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, ulong executedTimestampSeconds) @@ -3144,11 +3056,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3244,7 +3153,6 @@ namespace Test.Models [CandidOptional] public RewardMode reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider nodeProvider, RewardMode rewardMode, ulong amountE8s) @@ -3272,7 +3180,6 @@ namespace Test.Models { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -3450,11 +3357,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 1b33fd8c..71f70840 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -215,25 +213,15 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -353,7 +341,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -378,7 +365,6 @@ namespace Test.Models public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -408,11 +394,8 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -456,9 +439,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -510,7 +491,6 @@ namespace Test.Models public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -584,27 +564,16 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -649,29 +618,17 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object value) @@ -745,21 +702,13 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object value) @@ -818,7 +767,6 @@ namespace Test.Models public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -861,13 +809,9 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -900,9 +844,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -932,7 +874,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -957,7 +898,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1005,27 +945,16 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1059,35 +988,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1123,7 +1037,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1167,7 +1080,6 @@ namespace Test.Models public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1191,7 +1103,6 @@ namespace Test.Models public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1237,7 +1148,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1262,7 +1172,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1310,13 +1219,9 @@ namespace Test.Models public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1388,9 +1293,7 @@ namespace Test.Models public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1476,7 +1379,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1517,19 +1419,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1561,37 +1456,21 @@ namespace Test.Models public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -1656,9 +1535,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -1689,7 +1566,6 @@ namespace Test.Models public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -1715,23 +1591,14 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -1764,17 +1631,11 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1804,7 +1665,6 @@ namespace Test.Models public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -1834,19 +1694,12 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -1903,11 +1756,8 @@ namespace Test.Models public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -1935,29 +1785,17 @@ namespace Test.Models public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -1994,35 +1832,20 @@ namespace Test.Models public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2061,7 +1884,6 @@ namespace Test.Models public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -2112,7 +1934,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2148,9 +1969,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object value) @@ -2186,9 +2005,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object value) @@ -2224,9 +2041,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object value) @@ -2262,9 +2077,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object value) @@ -2300,9 +2113,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object value) @@ -2333,11 +2144,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2369,9 +2177,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) @@ -2402,9 +2208,7 @@ namespace Test.Models public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -2431,7 +2235,6 @@ namespace Test.Models public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -2537,9 +2340,7 @@ namespace Test.Models public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -2603,11 +2404,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 0551420a..b7472079 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -215,25 +213,15 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -356,7 +344,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -412,11 +399,8 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -460,9 +444,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -517,7 +499,6 @@ namespace Test.Models { [CandidOptional] public Principal controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal controller, ulong memo) @@ -593,27 +574,16 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -658,29 +628,17 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object value) @@ -754,21 +712,13 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object value) @@ -874,14 +824,11 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal newController, ulong nonce) @@ -914,9 +861,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -946,7 +891,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -971,7 +915,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1019,12 +962,10 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1032,17 +973,11 @@ namespace Test.Models [CandidOptional] public RewardEvent latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics metrics, List nodeProviders, NetworkEconomics economics, RewardEvent latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1076,35 +1011,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1140,7 +1060,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1257,7 +1176,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1282,7 +1200,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1333,11 +1250,8 @@ namespace Test.Models [CandidOptional] public NeuronId before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1503,7 +1417,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1544,19 +1457,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1593,23 +1499,14 @@ namespace Test.Models [CandidOptional] public Principal controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -1617,9 +1514,7 @@ namespace Test.Models [CandidOptional] public DissolveState dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -1690,9 +1585,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -1724,7 +1617,6 @@ namespace Test.Models { [CandidOptional] public Command_2 command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2 command, ulong timestamp) @@ -1750,25 +1642,18 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -1802,18 +1687,13 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1876,19 +1756,12 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -1951,7 +1824,6 @@ namespace Test.Models [CandidOptional] public Action action { get; set; } - public string summary { get; set; } public Proposal(string url, string title, Action action, string summary) @@ -1983,20 +1855,14 @@ namespace Test.Models [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2007,7 +1873,6 @@ namespace Test.Models [CandidOptional] public WaitForQuietState wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId id, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, WaitForQuietState waitForQuietState, ulong executedTimestampSeconds) @@ -2045,32 +1910,23 @@ namespace Test.Models { [CandidOptional] public NeuronId id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2078,7 +1934,6 @@ namespace Test.Models [CandidOptional] public NeuronId proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId id, int status, int topic, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, ulong executedTimestampSeconds) @@ -2171,7 +2026,6 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2207,9 +2061,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object value) @@ -2245,9 +2097,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object value) @@ -2283,9 +2133,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object value) @@ -2321,9 +2169,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object value) @@ -2359,9 +2205,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object value) @@ -2392,11 +2236,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2428,9 +2269,7 @@ namespace Test.Models [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) @@ -2465,7 +2304,6 @@ namespace Test.Models [CandidOptional] public RewardMode reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider nodeProvider, RewardMode rewardMode, ulong amountE8s) @@ -2493,7 +2331,6 @@ namespace Test.Models { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -2671,11 +2508,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index ffaed0b1..9ba1d660 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 095b43b9..b63db9d5 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 4175eab5..9289d77c 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -217,25 +215,15 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -426,11 +414,8 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -474,9 +459,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -611,27 +594,16 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -676,29 +648,17 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo? Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo? Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo? Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object? value) @@ -772,21 +732,13 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object? value) @@ -941,9 +893,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -1817,9 +1767,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -2020,19 +1968,12 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -2339,7 +2280,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2375,9 +2315,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object? value) @@ -2413,9 +2351,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object? value) @@ -2451,9 +2387,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object? value) @@ -2489,9 +2423,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object? value) @@ -2527,9 +2459,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object? value) @@ -2601,9 +2531,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 456302ce..a311a88f 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -217,25 +215,15 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -427,11 +415,8 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -475,9 +460,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -613,27 +596,16 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -678,29 +650,17 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo? Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo? Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo? Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object? value) @@ -774,21 +734,13 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object? value) @@ -945,9 +897,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -1832,9 +1782,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -2039,19 +1987,12 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -2370,7 +2311,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2406,9 +2346,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object? value) @@ -2444,9 +2382,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object? value) @@ -2482,9 +2418,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object? value) @@ -2520,9 +2454,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object? value) @@ -2558,9 +2490,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object? value) @@ -2632,9 +2562,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 88bcabfc..3c13c5d6 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -452,7 +450,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -477,7 +474,6 @@ namespace Test.Models public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -672,7 +668,6 @@ namespace Test.Models public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -1286,7 +1281,6 @@ namespace Test.Models public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -1329,13 +1323,9 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -1427,7 +1417,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1452,7 +1441,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1500,27 +1488,16 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1554,35 +1531,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1618,7 +1580,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1662,7 +1623,6 @@ namespace Test.Models public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1686,7 +1646,6 @@ namespace Test.Models public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1732,7 +1691,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1757,7 +1715,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1805,13 +1762,9 @@ namespace Test.Models public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1883,9 +1836,7 @@ namespace Test.Models public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1971,7 +1922,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2012,19 +1962,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2056,37 +1999,21 @@ namespace Test.Models public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -2211,7 +2138,6 @@ namespace Test.Models public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -2237,23 +2163,14 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -2286,17 +2203,11 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2326,7 +2237,6 @@ namespace Test.Models public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -2497,11 +2407,8 @@ namespace Test.Models public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -2529,29 +2436,17 @@ namespace Test.Models public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2588,35 +2483,20 @@ namespace Test.Models public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2655,7 +2535,6 @@ namespace Test.Models public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -3085,11 +2964,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3181,9 +3057,7 @@ namespace Test.Models public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -3210,7 +3084,6 @@ namespace Test.Models public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -3316,9 +3189,7 @@ namespace Test.Models public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -3382,11 +3253,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 113f8fb9..ac2090c3 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -455,7 +453,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -679,7 +676,6 @@ namespace Test.Models { [CandidOptional] public Principal? controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal? controller, ulong memo) @@ -1342,14 +1338,11 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal? new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal? newController, ulong nonce) @@ -1441,7 +1434,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1466,7 +1458,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1514,12 +1505,10 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics? metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1527,17 +1516,11 @@ namespace Test.Models [CandidOptional] public RewardEvent? latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics? metrics, List nodeProviders, NetworkEconomics? economics, RewardEvent? latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1571,35 +1554,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1635,7 +1603,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1752,7 +1719,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1777,7 +1743,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1828,11 +1793,8 @@ namespace Test.Models [CandidOptional] public NeuronId? before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId? beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1998,7 +1960,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2039,19 +2000,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2088,23 +2042,14 @@ namespace Test.Models [CandidOptional] public Principal? controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -2112,9 +2057,7 @@ namespace Test.Models [CandidOptional] public DissolveState? dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -2246,7 +2189,6 @@ namespace Test.Models { [CandidOptional] public Command_2? command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2? command, ulong timestamp) @@ -2272,25 +2214,18 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData? known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData? knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -2324,18 +2259,13 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal? from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal? from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2545,7 +2475,6 @@ namespace Test.Models [CandidOptional] public Action? action { get; set; } - public string summary { get; set; } public Proposal(string url, string? title, Action? action, string summary) @@ -2577,20 +2506,14 @@ namespace Test.Models [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2601,7 +2524,6 @@ namespace Test.Models [CandidOptional] public WaitForQuietState? wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId? id, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, WaitForQuietState? waitForQuietState, ulong executedTimestampSeconds) @@ -2639,32 +2561,23 @@ namespace Test.Models { [CandidOptional] public NeuronId? id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2672,7 +2585,6 @@ namespace Test.Models [CandidOptional] public NeuronId? proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId? id, int status, int topic, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, ulong executedTimestampSeconds) @@ -3144,11 +3056,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3244,7 +3153,6 @@ namespace Test.Models [CandidOptional] public RewardMode? reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider? nodeProvider, RewardMode? rewardMode, ulong amountE8s) @@ -3272,7 +3180,6 @@ namespace Test.Models { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -3450,11 +3357,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 816bf7c5..462fcc5a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -215,25 +213,15 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -353,7 +341,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -378,7 +365,6 @@ namespace Test.Models public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -408,11 +394,8 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -456,9 +439,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -510,7 +491,6 @@ namespace Test.Models public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -584,27 +564,16 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -649,29 +618,17 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo? Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo? Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo? Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object? value) @@ -745,21 +702,13 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object? value) @@ -818,7 +767,6 @@ namespace Test.Models public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -861,13 +809,9 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -900,9 +844,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -932,7 +874,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -957,7 +898,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1005,27 +945,16 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1059,35 +988,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1123,7 +1037,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1167,7 +1080,6 @@ namespace Test.Models public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1191,7 +1103,6 @@ namespace Test.Models public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1237,7 +1148,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1262,7 +1172,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1310,13 +1219,9 @@ namespace Test.Models public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1388,9 +1293,7 @@ namespace Test.Models public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1476,7 +1379,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1517,19 +1419,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1561,37 +1456,21 @@ namespace Test.Models public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -1656,9 +1535,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -1689,7 +1566,6 @@ namespace Test.Models public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -1715,23 +1591,14 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -1764,17 +1631,11 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1804,7 +1665,6 @@ namespace Test.Models public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -1834,19 +1694,12 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -1903,11 +1756,8 @@ namespace Test.Models public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -1935,29 +1785,17 @@ namespace Test.Models public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -1994,35 +1832,20 @@ namespace Test.Models public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2061,7 +1884,6 @@ namespace Test.Models public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -2112,7 +1934,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2148,9 +1969,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object? value) @@ -2186,9 +2005,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object? value) @@ -2224,9 +2041,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object? value) @@ -2262,9 +2077,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object? value) @@ -2300,9 +2113,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object? value) @@ -2333,11 +2144,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2369,9 +2177,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) @@ -2402,9 +2208,7 @@ namespace Test.Models public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -2431,7 +2235,6 @@ namespace Test.Models public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -2537,9 +2340,7 @@ namespace Test.Models public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -2603,11 +2404,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index b84f77c3..67a69da1 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_False_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -215,25 +213,15 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -356,7 +344,6 @@ namespace Test.Models public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -412,11 +399,8 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -460,9 +444,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -517,7 +499,6 @@ namespace Test.Models { [CandidOptional] public Principal? controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal? controller, ulong memo) @@ -593,27 +574,16 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -658,29 +628,17 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo? Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo? Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo? Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object? value) @@ -754,21 +712,13 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object? value) @@ -874,14 +824,11 @@ namespace Test.Models public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal? new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal? newController, ulong nonce) @@ -914,9 +861,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -946,7 +891,6 @@ namespace Test.Models public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -971,7 +915,6 @@ namespace Test.Models public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1019,12 +962,10 @@ namespace Test.Models public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics? metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1032,17 +973,11 @@ namespace Test.Models [CandidOptional] public RewardEvent? latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics? metrics, List nodeProviders, NetworkEconomics? economics, RewardEvent? latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1076,35 +1011,20 @@ namespace Test.Models public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1140,7 +1060,6 @@ namespace Test.Models public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1257,7 +1176,6 @@ namespace Test.Models public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1282,7 +1200,6 @@ namespace Test.Models public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1333,11 +1250,8 @@ namespace Test.Models [CandidOptional] public NeuronId? before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId? beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1503,7 +1417,6 @@ namespace Test.Models public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1544,19 +1457,12 @@ namespace Test.Models public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1593,23 +1499,14 @@ namespace Test.Models [CandidOptional] public Principal? controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -1617,9 +1514,7 @@ namespace Test.Models [CandidOptional] public DissolveState? dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -1690,9 +1585,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -1724,7 +1617,6 @@ namespace Test.Models { [CandidOptional] public Command_2? command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2? command, ulong timestamp) @@ -1750,25 +1642,18 @@ namespace Test.Models public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData? known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData? knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -1802,18 +1687,13 @@ namespace Test.Models public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal? from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal? from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1876,19 +1756,12 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -1951,7 +1824,6 @@ namespace Test.Models [CandidOptional] public Action? action { get; set; } - public string summary { get; set; } public Proposal(string url, string? title, Action? action, string summary) @@ -1983,20 +1855,14 @@ namespace Test.Models [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2007,7 +1873,6 @@ namespace Test.Models [CandidOptional] public WaitForQuietState? wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId? id, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, WaitForQuietState? waitForQuietState, ulong executedTimestampSeconds) @@ -2045,32 +1910,23 @@ namespace Test.Models { [CandidOptional] public NeuronId? id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2078,7 +1934,6 @@ namespace Test.Models [CandidOptional] public NeuronId? proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId? id, int status, int topic, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, ulong executedTimestampSeconds) @@ -2171,7 +2026,6 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2207,9 +2061,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object? value) @@ -2245,9 +2097,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object? value) @@ -2283,9 +2133,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object? value) @@ -2321,9 +2169,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object? value) @@ -2359,9 +2205,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object? value) @@ -2392,11 +2236,8 @@ namespace Test.Models public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2428,9 +2269,7 @@ namespace Test.Models [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) @@ -2465,7 +2304,6 @@ namespace Test.Models [CandidOptional] public RewardMode? reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider? nodeProvider, RewardMode? rewardMode, ulong amountE8s) @@ -2493,7 +2331,6 @@ namespace Test.Models { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -2671,11 +2508,8 @@ namespace Test.Models public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 36cf2155..2ad8d0ad 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 332cd297..b1010ff9 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 619fc063..598331cf 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -217,25 +215,15 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -426,11 +414,8 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -474,9 +459,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -611,27 +594,16 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -676,29 +648,17 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object value) @@ -772,21 +732,13 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object value) @@ -941,9 +893,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -1817,9 +1767,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -2020,19 +1968,12 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -2339,7 +2280,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2375,9 +2315,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object value) @@ -2413,9 +2351,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object value) @@ -2451,9 +2387,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object value) @@ -2489,9 +2423,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object value) @@ -2527,9 +2459,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object value) @@ -2601,9 +2531,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 611fdde2..e5002252 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -217,25 +215,15 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -427,11 +415,8 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -475,9 +460,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -613,27 +596,16 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -678,29 +650,17 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object value) @@ -774,21 +734,13 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object value) @@ -945,9 +897,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -1832,9 +1782,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -2039,19 +1987,12 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -2370,7 +2311,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2406,9 +2346,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object value) @@ -2444,9 +2382,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object value) @@ -2482,9 +2418,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object value) @@ -2520,9 +2454,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object value) @@ -2558,9 +2490,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object value) @@ -2632,9 +2562,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 130d326e..c188efe3 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -452,7 +450,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -477,7 +474,6 @@ namespace Test public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -672,7 +668,6 @@ namespace Test public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -1286,7 +1281,6 @@ namespace Test public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -1329,13 +1323,9 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -1427,7 +1417,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1452,7 +1441,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1500,27 +1488,16 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1554,35 +1531,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1618,7 +1580,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1662,7 +1623,6 @@ namespace Test public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1686,7 +1646,6 @@ namespace Test public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1732,7 +1691,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1757,7 +1715,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1805,13 +1762,9 @@ namespace Test public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1883,9 +1836,7 @@ namespace Test public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1971,7 +1922,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2012,19 +1962,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2056,37 +1999,21 @@ namespace Test public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -2211,7 +2138,6 @@ namespace Test public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -2237,23 +2163,14 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -2286,17 +2203,11 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2326,7 +2237,6 @@ namespace Test public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -2497,11 +2407,8 @@ namespace Test public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -2529,29 +2436,17 @@ namespace Test public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2588,35 +2483,20 @@ namespace Test public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2655,7 +2535,6 @@ namespace Test public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -3085,11 +2964,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3181,9 +3057,7 @@ namespace Test public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -3210,7 +3084,6 @@ namespace Test public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -3316,9 +3189,7 @@ namespace Test public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -3382,11 +3253,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 7bb9d885..b2acc811 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -455,7 +453,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -679,7 +676,6 @@ namespace Test { [CandidOptional] public Principal controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal controller, ulong memo) @@ -1342,14 +1338,11 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal newController, ulong nonce) @@ -1441,7 +1434,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1466,7 +1458,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1514,12 +1505,10 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1527,17 +1516,11 @@ namespace Test [CandidOptional] public RewardEvent latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics metrics, List nodeProviders, NetworkEconomics economics, RewardEvent latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1571,35 +1554,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1635,7 +1603,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1752,7 +1719,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1777,7 +1743,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1828,11 +1793,8 @@ namespace Test [CandidOptional] public NeuronId before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1998,7 +1960,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2039,19 +2000,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2088,23 +2042,14 @@ namespace Test [CandidOptional] public Principal controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -2112,9 +2057,7 @@ namespace Test [CandidOptional] public DissolveState dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -2246,7 +2189,6 @@ namespace Test { [CandidOptional] public Command_2 command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2 command, ulong timestamp) @@ -2272,25 +2214,18 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -2324,18 +2259,13 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2545,7 +2475,6 @@ namespace Test [CandidOptional] public Action action { get; set; } - public string summary { get; set; } public Proposal(string url, string title, Action action, string summary) @@ -2577,20 +2506,14 @@ namespace Test [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2601,7 +2524,6 @@ namespace Test [CandidOptional] public WaitForQuietState wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId id, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, WaitForQuietState waitForQuietState, ulong executedTimestampSeconds) @@ -2639,32 +2561,23 @@ namespace Test { [CandidOptional] public NeuronId id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2672,7 +2585,6 @@ namespace Test [CandidOptional] public NeuronId proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId id, int status, int topic, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, ulong executedTimestampSeconds) @@ -3144,11 +3056,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3244,7 +3153,6 @@ namespace Test [CandidOptional] public RewardMode reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider nodeProvider, RewardMode rewardMode, ulong amountE8s) @@ -3272,7 +3180,6 @@ namespace Test { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -3450,11 +3357,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index fa963bcd..3b1c4a28 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -215,25 +213,15 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -353,7 +341,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -378,7 +365,6 @@ namespace Test public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -408,11 +394,8 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -456,9 +439,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -510,7 +491,6 @@ namespace Test public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -584,27 +564,16 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -649,29 +618,17 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object value) @@ -745,21 +702,13 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object value) @@ -818,7 +767,6 @@ namespace Test public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -861,13 +809,9 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -900,9 +844,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -932,7 +874,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -957,7 +898,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1005,27 +945,16 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1059,35 +988,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1123,7 +1037,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1167,7 +1080,6 @@ namespace Test public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1191,7 +1103,6 @@ namespace Test public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1237,7 +1148,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1262,7 +1172,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1310,13 +1219,9 @@ namespace Test public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1388,9 +1293,7 @@ namespace Test public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1476,7 +1379,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1517,19 +1419,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1561,37 +1456,21 @@ namespace Test public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -1656,9 +1535,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -1689,7 +1566,6 @@ namespace Test public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -1715,23 +1591,14 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -1764,17 +1631,11 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1804,7 +1665,6 @@ namespace Test public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -1834,19 +1694,12 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -1903,11 +1756,8 @@ namespace Test public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -1935,29 +1785,17 @@ namespace Test public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -1994,35 +1832,20 @@ namespace Test public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2061,7 +1884,6 @@ namespace Test public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -2112,7 +1934,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2148,9 +1969,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object value) @@ -2186,9 +2005,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object value) @@ -2224,9 +2041,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object value) @@ -2262,9 +2077,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object value) @@ -2300,9 +2113,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object value) @@ -2333,11 +2144,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2369,9 +2177,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) @@ -2402,9 +2208,7 @@ namespace Test public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -2431,7 +2235,6 @@ namespace Test public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -2537,9 +2340,7 @@ namespace Test public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -2603,11 +2404,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index 54dd94d4..7ba1ecc5 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_False_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter converter = default) @@ -215,25 +213,15 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public KnownNeuron RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object value) @@ -356,7 +344,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -412,11 +399,8 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public By.NeuronIdOrSubaccountInfo NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object value) @@ -460,9 +444,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object value) @@ -517,7 +499,6 @@ namespace Test { [CandidOptional] public Principal controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal controller, ulong memo) @@ -593,27 +574,16 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object value) @@ -658,29 +628,17 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object value) @@ -754,21 +712,13 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Spawn Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object value) @@ -874,14 +824,11 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal newController, ulong nonce) @@ -914,9 +861,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object value) @@ -946,7 +891,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -971,7 +915,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1019,12 +962,10 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1032,17 +973,11 @@ namespace Test [CandidOptional] public RewardEvent latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics metrics, List nodeProviders, NetworkEconomics economics, RewardEvent latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1076,35 +1011,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1140,7 +1060,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1257,7 +1176,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1282,7 +1200,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1333,11 +1250,8 @@ namespace Test [CandidOptional] public NeuronId before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1503,7 +1417,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1544,19 +1457,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1593,23 +1499,14 @@ namespace Test [CandidOptional] public Principal controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -1617,9 +1514,7 @@ namespace Test [CandidOptional] public DissolveState dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -1690,9 +1585,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public List Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object value) @@ -1724,7 +1617,6 @@ namespace Test { [CandidOptional] public Command_2 command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2 command, ulong timestamp) @@ -1750,25 +1642,18 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -1802,18 +1687,13 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1876,19 +1756,12 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RemoveHotKey RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object value) @@ -1951,7 +1824,6 @@ namespace Test [CandidOptional] public Action action { get; set; } - public string summary { get; set; } public Proposal(string url, string title, Action action, string summary) @@ -1983,20 +1855,14 @@ namespace Test [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2007,7 +1873,6 @@ namespace Test [CandidOptional] public WaitForQuietState wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId id, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, WaitForQuietState waitForQuietState, ulong executedTimestampSeconds) @@ -2045,32 +1910,23 @@ namespace Test { [CandidOptional] public NeuronId id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2078,7 +1934,6 @@ namespace Test [CandidOptional] public NeuronId proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId id, int status, int topic, GovernanceError failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal proposal, NeuronId proposer, ulong executedTimestampSeconds) @@ -2171,7 +2026,6 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object value) @@ -2207,9 +2061,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public GovernanceError Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object value) @@ -2245,9 +2097,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public Neuron Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object value) @@ -2283,9 +2133,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardNodeProviders Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object value) @@ -2321,9 +2169,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NeuronInfo Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object value) @@ -2359,9 +2205,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public NodeProvider Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object value) @@ -2392,11 +2236,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2428,9 +2269,7 @@ namespace Test [VariantValueProperty] public object Value { get; set; } - public RewardToNeuron RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object value) @@ -2465,7 +2304,6 @@ namespace Test [CandidOptional] public RewardMode reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider nodeProvider, RewardMode rewardMode, ulong amountE8s) @@ -2493,7 +2331,6 @@ namespace Test { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -2671,11 +2508,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap index ab7e23d5..37de99fe 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap index ca9e9f52..d952ebfc 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 46c9643a..4cc66f44 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -217,25 +215,15 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -426,11 +414,8 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -474,9 +459,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -611,27 +594,16 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -676,29 +648,17 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo? Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo? Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo? Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object? value) @@ -772,21 +732,13 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object? value) @@ -941,9 +893,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -1817,9 +1767,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -2020,19 +1968,12 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -2339,7 +2280,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2375,9 +2315,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object? value) @@ -2413,9 +2351,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object? value) @@ -2451,9 +2387,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object? value) @@ -2489,9 +2423,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object? value) @@ -2527,9 +2459,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object? value) @@ -2601,9 +2531,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap index f03eb218..d22a5509 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_False_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -217,25 +215,15 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -427,11 +415,8 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -475,9 +460,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -613,27 +596,16 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -678,29 +650,17 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Split, value); } - public Command1.FollowInfo? Follow { get => this.Tag == Command1Tag.Follow ? (Command1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.ClaimOrRefresh, value); } - public Command1.ConfigureInfo? Configure { get => this.Tag == Command1Tag.Configure ? (Command1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Configure, value); } - public Command1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command1Tag.RegisterVote ? (Command1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.RegisterVote, value); } - public Command1.MergeInfo? Merge { get => this.Tag == Command1Tag.Merge ? (Command1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command1Tag.Disburse, value); } public Command1(Command1Tag tag, object? value) @@ -774,21 +734,13 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command2Tag.Disburse, value); } public Command2(Command2Tag tag, object? value) @@ -945,9 +897,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -1832,9 +1782,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -2039,19 +1987,12 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -2370,7 +2311,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2406,9 +2346,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result1Tag.NeuronId, value); } public Result1(Result1Tag tag, object? value) @@ -2444,9 +2382,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result2Tag.Err, value); } public Result2(Result2Tag tag, object? value) @@ -2482,9 +2418,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result3Tag.Err, value); } public Result3(Result3Tag tag, object? value) @@ -2520,9 +2454,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result4Tag.Err, value); } public Result4(Result4Tag tag, object? value) @@ -2558,9 +2490,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result5Tag.Err, value); } public Result5(Result5Tag tag, object? value) @@ -2632,9 +2562,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap index 2c306839..d134f01c 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -452,7 +450,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -477,7 +474,6 @@ namespace Test public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -672,7 +668,6 @@ namespace Test public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -1286,7 +1281,6 @@ namespace Test public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -1329,13 +1323,9 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -1427,7 +1417,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1452,7 +1441,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1500,27 +1488,16 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1554,35 +1531,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1618,7 +1580,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1662,7 +1623,6 @@ namespace Test public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1686,7 +1646,6 @@ namespace Test public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1732,7 +1691,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1757,7 +1715,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1805,13 +1762,9 @@ namespace Test public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1883,9 +1836,7 @@ namespace Test public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1971,7 +1922,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2012,19 +1962,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2056,37 +1999,21 @@ namespace Test public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -2211,7 +2138,6 @@ namespace Test public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -2237,23 +2163,14 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -2286,17 +2203,11 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2326,7 +2237,6 @@ namespace Test public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -2497,11 +2407,8 @@ namespace Test public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -2529,29 +2436,17 @@ namespace Test public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2588,35 +2483,20 @@ namespace Test public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2655,7 +2535,6 @@ namespace Test public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -3085,11 +2964,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3181,9 +3057,7 @@ namespace Test public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -3210,7 +3084,6 @@ namespace Test public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -3316,9 +3189,7 @@ namespace Test public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -3382,11 +3253,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap index 9b018161..4e1ee14a 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_False_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -455,7 +453,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -679,7 +676,6 @@ namespace Test { [CandidOptional] public Principal? controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal? controller, ulong memo) @@ -1342,14 +1338,11 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal? new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal? newController, ulong nonce) @@ -1441,7 +1434,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -1466,7 +1458,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1514,12 +1505,10 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics? metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1527,17 +1516,11 @@ namespace Test [CandidOptional] public RewardEvent? latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics? metrics, List nodeProviders, NetworkEconomics? economics, RewardEvent? latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1571,35 +1554,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1635,7 +1603,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1752,7 +1719,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1777,7 +1743,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1828,11 +1793,8 @@ namespace Test [CandidOptional] public NeuronId? before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId? beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1998,7 +1960,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -2039,19 +2000,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -2088,23 +2042,14 @@ namespace Test [CandidOptional] public Principal? controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -2112,9 +2057,7 @@ namespace Test [CandidOptional] public DissolveState? dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -2246,7 +2189,6 @@ namespace Test { [CandidOptional] public Command_2? command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2? command, ulong timestamp) @@ -2272,25 +2214,18 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData? known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData? knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -2324,18 +2259,13 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal? from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal? from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -2545,7 +2475,6 @@ namespace Test [CandidOptional] public Action? action { get; set; } - public string summary { get; set; } public Proposal(string url, string? title, Action? action, string summary) @@ -2577,20 +2506,14 @@ namespace Test [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2601,7 +2524,6 @@ namespace Test [CandidOptional] public WaitForQuietState? wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId? id, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, WaitForQuietState? waitForQuietState, ulong executedTimestampSeconds) @@ -2639,32 +2561,23 @@ namespace Test { [CandidOptional] public NeuronId? id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2672,7 +2585,6 @@ namespace Test [CandidOptional] public NeuronId? proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId? id, int status, int topic, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, ulong executedTimestampSeconds) @@ -3144,11 +3056,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -3244,7 +3153,6 @@ namespace Test [CandidOptional] public RewardMode? reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider? nodeProvider, RewardMode? rewardMode, ulong amountE8s) @@ -3272,7 +3180,6 @@ namespace Test { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -3450,11 +3357,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap index 0db677bf..441061bc 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -215,25 +213,15 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -353,7 +341,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -378,7 +365,6 @@ namespace Test public class BallotInfo { public int vote { get; set; } - public OptionalValue proposal_id { get; set; } public BallotInfo(int vote, OptionalValue proposalId) @@ -408,11 +394,8 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -456,9 +439,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -510,7 +491,6 @@ namespace Test public class ClaimOrRefreshNeuronFromAccount { public OptionalValue controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) @@ -584,27 +564,16 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -649,29 +618,17 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo? Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo? Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo? Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object? value) @@ -745,21 +702,13 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object? value) @@ -818,7 +767,6 @@ namespace Test public class Disburse { public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } public Disburse(OptionalValue toAccount, OptionalValue amount) @@ -861,13 +809,9 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) @@ -900,9 +844,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -932,7 +874,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -957,7 +898,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1005,27 +945,16 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } 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) @@ -1059,35 +988,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1123,7 +1037,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1167,7 +1080,6 @@ namespace Test public class KnownNeuron { public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) @@ -1191,7 +1103,6 @@ namespace Test public class KnownNeuronData { public string name { get; set; } - public OptionalValue description { get; set; } public KnownNeuronData(string name, OptionalValue description) @@ -1237,7 +1148,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1262,7 +1172,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1310,13 +1219,9 @@ namespace Test public class ListProposalInfo { public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1388,9 +1293,7 @@ namespace Test public class ManageNeuron { public OptionalValue id { get; set; } - public OptionalValue command { get; set; } - public OptionalValue neuron_id_or_subaccount { get; set; } public ManageNeuron(OptionalValue id, OptionalValue command, OptionalValue neuronIdOrSubaccount) @@ -1476,7 +1379,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1517,19 +1419,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1561,37 +1456,21 @@ namespace Test public class Neuron { public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue knownNeuronData) @@ -1656,9 +1535,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -1689,7 +1566,6 @@ namespace Test public class NeuronInFlightCommand { public OptionalValue command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(OptionalValue command, ulong timestamp) @@ -1715,23 +1591,14 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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) @@ -1764,17 +1631,11 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, OptionalValue from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1804,7 +1665,6 @@ namespace Test public class NodeProvider { public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } public NodeProvider(OptionalValue id, OptionalValue rewardAccount) @@ -1834,19 +1694,12 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -1903,11 +1756,8 @@ namespace Test public class Proposal { public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { get; set; } - public string summary { get; set; } public Proposal(string url, OptionalValue title, OptionalValue action, string summary) @@ -1935,29 +1785,17 @@ namespace Test public class ProposalData { public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -1994,35 +1832,20 @@ namespace Test public class ProposalInfo { public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } 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) @@ -2061,7 +1884,6 @@ namespace Test public class RegisterVote { public int vote { get; set; } - public OptionalValue proposal { get; set; } public RegisterVote(int vote, OptionalValue proposal) @@ -2112,7 +1934,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2148,9 +1969,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object? value) @@ -2186,9 +2005,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object? value) @@ -2224,9 +2041,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object? value) @@ -2262,9 +2077,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object? value) @@ -2300,9 +2113,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object? value) @@ -2333,11 +2144,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2369,9 +2177,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) @@ -2402,9 +2208,7 @@ namespace Test public class RewardNodeProvider { public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) @@ -2431,7 +2235,6 @@ namespace Test public class RewardNodeProviders { public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) @@ -2537,9 +2340,7 @@ namespace Test public class Spawn { public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) @@ -2603,11 +2404,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap index ebe3adbf..5e604285 100644 --- a/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap +++ b/test/Candid.Tests/Generators/__snapshots__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_True.snap @@ -11,9 +11,7 @@ namespace Test public class GovernanceApiClient { public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) @@ -215,25 +213,15 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } public Action(ActionTag tag, object? value) @@ -356,7 +344,6 @@ namespace Test public class Ballot { public int vote { get; set; } - public ulong voting_power { get; set; } public Ballot(int vote, ulong votingPower) @@ -412,11 +399,8 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } public By(ByTag tag, object? value) @@ -460,9 +444,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } public Change(ChangeTag tag, object? value) @@ -517,7 +499,6 @@ namespace Test { [CandidOptional] public Principal? controller { get; set; } - public ulong memo { get; set; } public ClaimOrRefreshNeuronFromAccount(Principal? controller, ulong memo) @@ -593,27 +574,16 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } public Command(CommandTag tag, object? value) @@ -658,29 +628,17 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo? Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo? Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo? Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } public Command_1(Command_1Tag tag, object? value) @@ -754,21 +712,13 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } public Command_2(Command_2Tag tag, object? value) @@ -874,14 +824,11 @@ namespace Test public class DisburseToNeuron { public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } [CandidOptional] public Principal? new_controller { get; set; } - public ulong nonce { get; set; } public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, Principal? newController, ulong nonce) @@ -914,9 +861,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } public DissolveState(DissolveStateTag tag, object? value) @@ -946,7 +891,6 @@ namespace Test public class ExecuteNnsFunction { public int nns_function { get; set; } - public List payload { get; set; } public ExecuteNnsFunction(int nnsFunction, List payload) @@ -971,7 +915,6 @@ namespace Test public class Follow { public int topic { get; set; } - public List followees { get; set; } public Follow(int topic, List followees) @@ -1019,12 +962,10 @@ namespace Test public class Governance { public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } [CandidOptional] public GovernanceCachedMetrics? metrics { get; set; } - public List node_providers { get; set; } [CandidOptional] @@ -1032,17 +973,11 @@ namespace Test [CandidOptional] public RewardEvent? latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } public Governance(Dictionary defaultFollowees, ulong waitForQuietThresholdSeconds, GovernanceCachedMetrics? metrics, List nodeProviders, NetworkEconomics? economics, RewardEvent? latestRewardEvent, List toClaimTransfers, ulong shortVotingPeriodSeconds, Dictionary proposals, Dictionary inFlightCommands, Dictionary neurons, ulong genesisTimestampSeconds) @@ -1076,35 +1011,20 @@ namespace Test public class GovernanceCachedMetrics { public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } 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) @@ -1140,7 +1060,6 @@ namespace Test public class GovernanceError { public string error_message { get; set; } - public int error_type { get; set; } public GovernanceError(string errorMessage, int errorType) @@ -1257,7 +1176,6 @@ namespace Test public class ListNeurons { public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) @@ -1282,7 +1200,6 @@ namespace Test public class ListNeuronsResponse { public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) @@ -1333,11 +1250,8 @@ namespace Test [CandidOptional] public NeuronId? before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } public ListProposalInfo(List includeRewardStatus, NeuronId? beforeProposal, uint limit, List excludeTopic, List includeStatus) @@ -1503,7 +1417,6 @@ namespace Test public class MergeMaturityResponse { public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) @@ -1544,19 +1457,12 @@ namespace Test public class NetworkEconomics { public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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) @@ -1593,23 +1499,14 @@ namespace Test [CandidOptional] public Principal? controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } [CandidOptional] @@ -1617,9 +1514,7 @@ namespace Test [CandidOptional] public DissolveState? dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } [CandidOptional] @@ -1690,9 +1585,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) @@ -1724,7 +1617,6 @@ namespace Test { [CandidOptional] public Command_2? command { get; set; } - public ulong timestamp { get; set; } public NeuronInFlightCommand(Command_2? command, ulong timestamp) @@ -1750,25 +1642,18 @@ namespace Test public class NeuronInfo { public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } [CandidOptional] public ulong? joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } [CandidOptional] public KnownNeuronData? known_neuron_data { get; set; } - public ulong voting_power { get; set; } - public ulong age_seconds { get; set; } public NeuronInfo(ulong dissolveDelaySeconds, List recentBallots, ulong createdTimestampSeconds, int state, ulong stakeE8s, ulong? joinedCommunityFundTimestampSeconds, ulong retrievedAtTimestampSeconds, KnownNeuronData? knownNeuronData, ulong votingPower, ulong ageSeconds) @@ -1802,18 +1687,13 @@ namespace Test public class NeuronStakeTransfer { public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } [CandidOptional] public Principal? from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { get; set; } - public ulong block_height { get; set; } public NeuronStakeTransfer(List toSubaccount, ulong neuronStakeE8s, Principal? from, ulong memo, List fromSubaccount, ulong transferTimestamp, ulong blockHeight) @@ -1876,19 +1756,12 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } public Operation(OperationTag tag, object? value) @@ -1951,7 +1824,6 @@ namespace Test [CandidOptional] public Action? action { get; set; } - public string summary { get; set; } public Proposal(string url, string? title, Action? action, string summary) @@ -1983,20 +1855,14 @@ namespace Test [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2007,7 +1873,6 @@ namespace Test [CandidOptional] public WaitForQuietState? wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalData(NeuronId? id, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, WaitForQuietState? waitForQuietState, ulong executedTimestampSeconds) @@ -2045,32 +1910,23 @@ namespace Test { [CandidOptional] public NeuronId? id { get; set; } - public int status { get; set; } - public int topic { get; set; } [CandidOptional] public GovernanceError? failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } [CandidOptional] public ulong? deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } [CandidOptional] public Tally? latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } [CandidOptional] @@ -2078,7 +1934,6 @@ namespace Test [CandidOptional] public NeuronId? proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } public ProposalInfo(NeuronId? id, int status, int topic, GovernanceError? failureReason, Dictionary ballots, ulong proposalTimestampSeconds, ulong rewardEventRound, ulong? deadlineTimestampSeconds, ulong failedTimestampSeconds, ulong rejectCostE8s, Tally? latestTally, int rewardStatus, ulong decidedTimestampSeconds, Proposal? proposal, NeuronId? proposer, ulong executedTimestampSeconds) @@ -2171,7 +2026,6 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } public Result(ResultTag tag, object? value) @@ -2207,9 +2061,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } public Result_1(Result_1Tag tag, object? value) @@ -2245,9 +2097,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } public Result_2(Result_2Tag tag, object? value) @@ -2283,9 +2133,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } public Result_3(Result_3Tag tag, object? value) @@ -2321,9 +2169,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } public Result_4(Result_4Tag tag, object? value) @@ -2359,9 +2205,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } public Result_5(Result_5Tag tag, object? value) @@ -2392,11 +2236,8 @@ namespace Test public class RewardEvent { public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) @@ -2428,9 +2269,7 @@ namespace Test [VariantValueProperty] public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } public RewardMode(RewardModeTag tag, object? value) @@ -2465,7 +2304,6 @@ namespace Test [CandidOptional] public RewardMode? reward_mode { get; set; } - public ulong amount_e8s { get; set; } public RewardNodeProvider(NodeProvider? nodeProvider, RewardMode? rewardMode, ulong amountE8s) @@ -2493,7 +2331,6 @@ namespace Test { [CandidOptional] public bool? use_registry_derived_rewards { get; set; } - public List rewards { get; set; } public RewardNodeProviders(bool? useRegistryDerivedRewards, List rewards) @@ -2671,11 +2508,8 @@ namespace Test public class Tally { public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { get; set; } - public ulong timestamp_seconds { get; set; } public Tally(ulong no, ulong yes, ulong total, ulong timestampSeconds) diff --git a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/__mismatch__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap deleted file mode 100644 index 507a3bb9..00000000 --- a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/AnonymousTuples_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ /dev/null @@ -1,39 +0,0 @@ -using EdjCase.ICP.Agent.Agents; -using EdjCase.ICP.Candid.Models; -using EdjCase.ICP.Candid; -using System.Threading.Tasks; -using System.Collections.Generic; -using EdjCase.ICP.Agent.Responses; - -namespace Test -{ - public class AnonymousTuplesApiClient - { - public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } - - public AnonymousTuplesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) - { - this.Agent = agent; - this.CanisterId = canisterId; - this.Converter = converter; - } - - 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); - } - - 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); - } - } -} diff --git a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap deleted file mode 100644 index dbaeac95..00000000 --- a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Dex_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ /dev/null @@ -1,377 +0,0 @@ -using EdjCase.ICP.Agent.Agents; -using EdjCase.ICP.Candid.Models; -using EdjCase.ICP.Candid; -using System.Threading.Tasks; -using Test; -using System.Collections.Generic; -using EdjCase.ICP.Agent.Responses; -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - -namespace Test -{ - public class DexApiClient - { - public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } - - public DexApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) - { - this.Agent = agent; - this.CanisterId = canisterId; - this.Converter = converter; - } - - public async Task cancelOrder(OrderId arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "cancelOrder", arg); - return reply.ToObjects(this.Converter); - } - - 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) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter), CandidTypedValue.FromObject(arg1, this.Converter), CandidTypedValue.FromObject(arg2, this.Converter)); - await this.Agent.CallAsync(this.CanisterId, "credit", arg); - } - - public async Task deposit(Token arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "deposit", arg); - return reply.ToObjects(this.Converter); - } - - 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); - } - - public async Task getBalance(Token arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "getBalance", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - 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); - } - - 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) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "getOrder", arg); - return reply.ToObjects>(this.Converter); - } - - 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) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - 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) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter), CandidTypedValue.FromObject(arg1, this.Converter), CandidTypedValue.FromObject(arg2, this.Converter), CandidTypedValue.FromObject(arg3, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "placeOrder", arg); - return reply.ToObjects(this.Converter); - } - - public async Task whoami() - { - CandidArg arg = CandidArg.FromCandid(); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "whoami", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - public async Task withdraw(Token arg0, UnboundedUInt arg1, Principal arg2) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter), CandidTypedValue.FromObject(arg1, this.Converter), CandidTypedValue.FromObject(arg2, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "withdraw", arg); - return reply.ToObjects(this.Converter); - } - } -} - -Type File: 'WithdrawReceipt' - -using EdjCase.ICP.Candid.Mapping; -using Test; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - [Variant] - public class WithdrawReceipt - { - [VariantTagProperty] - public WithdrawReceiptTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public WithdrawErr? Err { get => this.Tag == WithdrawReceiptTag.Err ? (WithdrawErr)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == WithdrawReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (WithdrawReceiptTag.Ok, value); } - - public WithdrawReceipt(WithdrawReceiptTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected WithdrawReceipt() - { - } - } - - public enum WithdrawReceiptTag - { - Err, - Ok - } -} - -Type File: 'WithdrawErr' - -namespace Test -{ - public enum WithdrawErr - { - BalanceLow, - TransferFailure - } -} - -Type File: 'OrderPlacementReceipt' - -using EdjCase.ICP.Candid.Mapping; -using Test; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - [Variant] - public class OrderPlacementReceipt - { - [VariantTagProperty] - public OrderPlacementReceiptTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public OrderPlacementErr? Err { get => this.Tag == OrderPlacementReceiptTag.Err ? (OrderPlacementErr)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Err, value); } - public OptionalValue? Ok { get => this.Tag == OrderPlacementReceiptTag.Ok ? (OptionalValue)this.Value! : default; set => (this.Tag, this.Value) = (OrderPlacementReceiptTag.Ok, value); } - - public OrderPlacementReceipt(OrderPlacementReceiptTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected OrderPlacementReceipt() - { - } - } - - public enum OrderPlacementReceiptTag - { - Err, - Ok - } -} - -Type File: 'OrderPlacementErr' - -namespace Test -{ - public enum OrderPlacementErr - { - InvalidOrder, - OrderBookFull - } -} - -Type File: 'Order' - -using EdjCase.ICP.Candid.Models; -using Token = EdjCase.ICP.Candid.Models.Principal; -using OrderId = System.UInt32; - -namespace Test -{ - public class Order - { - public Token from { get; set; } - public UnboundedUInt fromAmount { get; set; } - public OrderId id { get; set; } - public Principal owner { get; set; } - public Token to { 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; - } - - public Order() - { - } - } -} - -Type File: 'DepositReceipt' - -using EdjCase.ICP.Candid.Mapping; -using Test; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - [Variant] - public class DepositReceipt - { - [VariantTagProperty] - public DepositReceiptTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public DepositErr? Err { get => this.Tag == DepositReceiptTag.Err ? (DepositErr)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Err, value); } - public UnboundedUInt? Ok { get => this.Tag == DepositReceiptTag.Ok ? (UnboundedUInt)this.Value! : default; set => (this.Tag, this.Value) = (DepositReceiptTag.Ok, value); } - - public DepositReceipt(DepositReceiptTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected DepositReceipt() - { - } - } - - public enum DepositReceiptTag - { - Err, - Ok - } -} - -Type File: 'DepositErr' - -namespace Test -{ - public enum DepositErr - { - BalanceLow, - TransferFailure - } -} - -Type File: 'CancelOrderReceipt' - -using EdjCase.ICP.Candid.Mapping; -using Test; -using OrderId = System.UInt32; - -namespace Test -{ - [Variant] - public class CancelOrderReceipt - { - [VariantTagProperty] - public CancelOrderReceiptTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public CancelOrderErr? Err { get => this.Tag == CancelOrderReceiptTag.Err ? (CancelOrderErr)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Err, value); } - public OrderId? Ok { get => this.Tag == CancelOrderReceiptTag.Ok ? (OrderId)this.Value! : default; set => (this.Tag, this.Value) = (CancelOrderReceiptTag.Ok, value); } - - public CancelOrderReceipt(CancelOrderReceiptTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected CancelOrderReceipt() - { - } - } - - public enum CancelOrderReceiptTag - { - Err, - Ok - } -} - -Type File: 'CancelOrderErr' - -namespace Test -{ - public enum CancelOrderErr - { - NotAllowed, - NotExistingOrder - } -} - -Type File: 'Balance' - -using EdjCase.ICP.Candid.Models; -using Token = EdjCase.ICP.Candid.Models.Principal; - -namespace Test -{ - public class Balance - { - public UnboundedUInt amount { get; set; } - public Principal owner { get; set; } - public Token token { get; set; } - - public Balance(UnboundedUInt amount, Principal owner, Token token) - { - this.amount = amount; - this.owner = owner; - this.token = token; - } - - public Balance() - { - } - } -} diff --git a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/__mismatch__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap deleted file mode 100644 index 3c3cc579..00000000 --- a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/DuplicatePropertyNames_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ /dev/null @@ -1,52 +0,0 @@ -using EdjCase.ICP.Agent.Agents; -using EdjCase.ICP.Candid.Models; -using EdjCase.ICP.Candid; -using System.Threading.Tasks; -using Test; -using EdjCase.ICP.Agent.Responses; - -namespace Test -{ - public class DuplicatePropertyNamesApiClient - { - public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } - - public DuplicatePropertyNamesApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) - { - this.Agent = agent; - this.CanisterId = canisterId; - this.Converter = converter; - } - - 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); - } - } -} - -Type File: 'Result' - -namespace Test -{ - public class Result - { - public ulong a { get; set; } - public ulong _a { get; set; } - - public Result(ulong a, ulong _a) - { - this.a = a; - this._a = _a; - } - - public Result() - { - } - } -} diff --git a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap b/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap deleted file mode 100644 index 441061bc..00000000 --- a/test/Candid.Tests/Generators/__snapshots__/__mismatch__/Governance_NoFolders_True_Nullable_True_KeepCandidCase_True_VariantsUseProperties_True_OverrideOptionalValue_False.snap +++ /dev/null @@ -1,2464 +0,0 @@ -using EdjCase.ICP.Agent.Agents; -using EdjCase.ICP.Candid.Models; -using EdjCase.ICP.Candid; -using System.Threading.Tasks; -using Test; -using System.Collections.Generic; -using EdjCase.ICP.Agent.Responses; - -namespace Test -{ - public class GovernanceApiClient - { - public IAgent Agent { get; } - public Principal CanisterId { get; } - public CandidConverter? Converter { get; } - - public GovernanceApiClient(IAgent agent, Principal canisterId, CandidConverter? converter = default) - { - this.Agent = agent; - this.CanisterId = canisterId; - this.Converter = converter; - } - - public async Task claim_gtc_neurons(Principal arg0, List arg1) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter), CandidTypedValue.FromObject(arg1, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_gtc_neurons", arg); - return reply.ToObjects(this.Converter); - } - - public async Task claim_or_refresh_neuron_from_account(ClaimOrRefreshNeuronFromAccount arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "claim_or_refresh_neuron_from_account", arg); - return reply.ToObjects(this.Converter); - } - - public async Task _get_build_metadata() - { - CandidArg arg = CandidArg.FromCandid(); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_build_metadata", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - public async Task _get_full_neuron(ulong arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_full_neuron", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - public async Task _get_full_neuron_by_id_or_subaccount(NeuronIdOrSubaccount arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - 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); - } - - 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); - } - - 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); - } - - public async Task> _get_neuron_ids() - { - CandidArg arg = CandidArg.FromCandid(); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_ids", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); - } - - public async Task _get_neuron_info(ulong arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_neuron_info", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - public async Task _get_neuron_info_by_id_or_subaccount(NeuronIdOrSubaccount arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - 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); - } - - public async Task _get_node_provider_by_caller(NullValue arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_node_provider_by_caller", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - 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); - } - - public async Task> _get_proposal_info(ulong arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "get_proposal_info", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects>(this.Converter); - } - - 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); - } - - public async Task list_neurons(ListNeurons arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_neurons", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - 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); - } - - public async Task list_proposals(ListProposalInfo arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - QueryResponse response = await this.Agent.QueryAsync(this.CanisterId, "list_proposals", arg); - CandidArg reply = response.ThrowOrGetReply(); - return reply.ToObjects(this.Converter); - } - - public async Task manage_neuron(ManageNeuron arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "manage_neuron", arg); - return reply.ToObjects(this.Converter); - } - - public async Task transfer_gtc_neuron(NeuronId arg0, NeuronId arg1) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter), CandidTypedValue.FromObject(arg1, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "transfer_gtc_neuron", arg); - return reply.ToObjects(this.Converter); - } - - public async Task update_node_provider(UpdateNodeProvider arg0) - { - CandidArg arg = CandidArg.FromCandid(CandidTypedValue.FromObject(arg0, this.Converter)); - CandidArg reply = await this.Agent.CallAndWaitAsync(this.CanisterId, "update_node_provider", arg); - return reply.ToObjects(this.Converter); - } - } -} - -Type File: 'AccountIdentifier' - -using System.Collections.Generic; - -namespace Test -{ - public class AccountIdentifier - { - public List hash { get; set; } - - public AccountIdentifier(List hash) - { - this.hash = hash; - } - - public AccountIdentifier() - { - } - } -} - -Type File: 'Action' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Action - { - [VariantTagProperty] - public ActionTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public KnownNeuron? RegisterKnownNeuron { get => this.Tag == ActionTag.RegisterKnownNeuron ? (KnownNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RegisterKnownNeuron, value); } - public ManageNeuron? ManageNeuron { get => this.Tag == ActionTag.ManageNeuron ? (ManageNeuron)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNeuron, value); } - public ExecuteNnsFunction? ExecuteNnsFunction { get => this.Tag == ActionTag.ExecuteNnsFunction ? (ExecuteNnsFunction)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ExecuteNnsFunction, value); } - public RewardNodeProvider? RewardNodeProvider { get => this.Tag == ActionTag.RewardNodeProvider ? (RewardNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProvider, value); } - public SetDefaultFollowees? SetDefaultFollowees { get => this.Tag == ActionTag.SetDefaultFollowees ? (SetDefaultFollowees)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.SetDefaultFollowees, value); } - public RewardNodeProviders? RewardNodeProviders { get => this.Tag == ActionTag.RewardNodeProviders ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.RewardNodeProviders, value); } - public NetworkEconomics? ManageNetworkEconomics { get => this.Tag == ActionTag.ManageNetworkEconomics ? (NetworkEconomics)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ManageNetworkEconomics, value); } - public ApproveGenesisKyc? ApproveGenesisKyc { get => this.Tag == ActionTag.ApproveGenesisKyc ? (ApproveGenesisKyc)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.ApproveGenesisKyc, value); } - public AddOrRemoveNodeProvider? AddOrRemoveNodeProvider { get => this.Tag == ActionTag.AddOrRemoveNodeProvider ? (AddOrRemoveNodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.AddOrRemoveNodeProvider, value); } - public Motion? Motion { get => this.Tag == ActionTag.Motion ? (Motion)this.Value! : default; set => (this.Tag, this.Value) = (ActionTag.Motion, value); } - - public Action(ActionTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Action() - { - } - } - - public enum ActionTag - { - RegisterKnownNeuron, - ManageNeuron, - ExecuteNnsFunction, - RewardNodeProvider, - SetDefaultFollowees, - RewardNodeProviders, - ManageNetworkEconomics, - ApproveGenesisKyc, - AddOrRemoveNodeProvider, - Motion - } -} - -Type File: 'AddHotKey' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class AddHotKey - { - public OptionalValue new_hot_key { get; set; } - - public AddHotKey(OptionalValue newHotKey) - { - this.new_hot_key = newHotKey; - } - - public AddHotKey() - { - } - } -} - -Type File: 'AddOrRemoveNodeProvider' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class AddOrRemoveNodeProvider - { - public OptionalValue change { get; set; } - - public AddOrRemoveNodeProvider(OptionalValue change) - { - this.change = change; - } - - public AddOrRemoveNodeProvider() - { - } - } -} - -Type File: 'Amount' - -namespace Test -{ - public class Amount - { - public ulong e8s { get; set; } - - public Amount(ulong e8s) - { - this.e8s = e8s; - } - - public Amount() - { - } - } -} - -Type File: 'ApproveGenesisKyc' - -using System.Collections.Generic; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class ApproveGenesisKyc - { - public List principals { get; set; } - - public ApproveGenesisKyc(List principals) - { - this.principals = principals; - } - - public ApproveGenesisKyc() - { - } - } -} - -Type File: 'Ballot' - -namespace Test -{ - public class Ballot - { - public int vote { get; set; } - public ulong voting_power { get; set; } - - public Ballot(int vote, ulong votingPower) - { - this.vote = vote; - this.voting_power = votingPower; - } - - public Ballot() - { - } - } -} - -Type File: 'BallotInfo' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class BallotInfo - { - public int vote { get; set; } - public OptionalValue proposal_id { get; set; } - - public BallotInfo(int vote, OptionalValue proposalId) - { - this.vote = vote; - this.proposal_id = proposalId; - } - - public BallotInfo() - { - } - } -} - -Type File: 'By' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class By - { - [VariantTagProperty] - public ByTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public By.NeuronIdOrSubaccountInfo? NeuronIdOrSubaccount { get => this.Tag == ByTag.NeuronIdOrSubaccount ? (By.NeuronIdOrSubaccountInfo)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.NeuronIdOrSubaccount, value); } - public ClaimOrRefreshNeuronFromAccount? MemoAndController { get => this.Tag == ByTag.MemoAndController ? (ClaimOrRefreshNeuronFromAccount)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.MemoAndController, value); } - public ulong? Memo { get => this.Tag == ByTag.Memo ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (ByTag.Memo, value); } - - public By(ByTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected By() - { - } - - public class NeuronIdOrSubaccountInfo - { - public NeuronIdOrSubaccountInfo() - { - } - } - } - - public enum ByTag - { - NeuronIdOrSubaccount, - MemoAndController, - Memo - } -} - -Type File: 'Change' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Change - { - [VariantTagProperty] - public ChangeTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public NodeProvider? ToRemove { get => this.Tag == ChangeTag.ToRemove ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToRemove, value); } - public NodeProvider? ToAdd { get => this.Tag == ChangeTag.ToAdd ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (ChangeTag.ToAdd, value); } - - public Change(ChangeTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Change() - { - } - } - - public enum ChangeTag - { - ToRemove, - ToAdd - } -} - -Type File: 'ClaimOrRefresh' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ClaimOrRefresh - { - public OptionalValue by { get; set; } - - public ClaimOrRefresh(OptionalValue by) - { - this.by = by; - } - - public ClaimOrRefresh() - { - } - } -} - -Type File: 'ClaimOrRefreshNeuronFromAccount' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class ClaimOrRefreshNeuronFromAccount - { - public OptionalValue controller { get; set; } - public ulong memo { get; set; } - - public ClaimOrRefreshNeuronFromAccount(OptionalValue controller, ulong memo) - { - this.controller = controller; - this.memo = memo; - } - - public ClaimOrRefreshNeuronFromAccount() - { - } - } -} - -Type File: 'ClaimOrRefreshNeuronFromAccountResponse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ClaimOrRefreshNeuronFromAccountResponse - { - public OptionalValue result { get; set; } - - public ClaimOrRefreshNeuronFromAccountResponse(OptionalValue result) - { - this.result = result; - } - - public ClaimOrRefreshNeuronFromAccountResponse() - { - } - } -} - -Type File: 'ClaimOrRefreshResponse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ClaimOrRefreshResponse - { - public OptionalValue refreshed_neuron_id { get; set; } - - public ClaimOrRefreshResponse(OptionalValue refreshedNeuronId) - { - this.refreshed_neuron_id = refreshedNeuronId; - } - - public ClaimOrRefreshResponse() - { - } - } -} - -Type File: 'Command' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Command - { - [VariantTagProperty] - public CommandTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == CommandTag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Spawn, value); } - public Split? Split { get => this.Tag == CommandTag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Split, value); } - public Follow? Follow { get => this.Tag == CommandTag.Follow ? (Follow)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Follow, value); } - public ClaimOrRefresh? ClaimOrRefresh { get => this.Tag == CommandTag.ClaimOrRefresh ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.ClaimOrRefresh, value); } - public Configure? Configure { get => this.Tag == CommandTag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Configure, value); } - public RegisterVote? RegisterVote { get => this.Tag == CommandTag.RegisterVote ? (RegisterVote)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.RegisterVote, value); } - public Merge? Merge { get => this.Tag == CommandTag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == CommandTag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.DisburseToNeuron, value); } - public Proposal? MakeProposal { get => this.Tag == CommandTag.MakeProposal ? (Proposal)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MakeProposal, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == CommandTag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == CommandTag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (CommandTag.Disburse, value); } - - public Command(CommandTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Command() - { - } - } - - public enum CommandTag - { - Spawn, - Split, - Follow, - ClaimOrRefresh, - Configure, - RegisterVote, - Merge, - DisburseToNeuron, - MakeProposal, - MergeMaturity, - Disburse - } -} - -Type File: 'Command_1' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Command_1 - { - [VariantTagProperty] - public Command_1Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Command_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Error, value); } - public SpawnResponse? Spawn { get => this.Tag == Command_1Tag.Spawn ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Spawn, value); } - public SpawnResponse? Split { get => this.Tag == Command_1Tag.Split ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Split, value); } - public Command_1.FollowInfo? Follow { get => this.Tag == Command_1Tag.Follow ? (Command_1.FollowInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Follow, value); } - public ClaimOrRefreshResponse? ClaimOrRefresh { get => this.Tag == Command_1Tag.ClaimOrRefresh ? (ClaimOrRefreshResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.ClaimOrRefresh, value); } - public Command_1.ConfigureInfo? Configure { get => this.Tag == Command_1Tag.Configure ? (Command_1.ConfigureInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Configure, value); } - public Command_1.RegisterVoteInfo? RegisterVote { get => this.Tag == Command_1Tag.RegisterVote ? (Command_1.RegisterVoteInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.RegisterVote, value); } - public Command_1.MergeInfo? Merge { get => this.Tag == Command_1Tag.Merge ? (Command_1.MergeInfo)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Merge, value); } - public SpawnResponse? DisburseToNeuron { get => this.Tag == Command_1Tag.DisburseToNeuron ? (SpawnResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.DisburseToNeuron, value); } - public MakeProposalResponse? MakeProposal { get => this.Tag == Command_1Tag.MakeProposal ? (MakeProposalResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MakeProposal, value); } - public MergeMaturityResponse? MergeMaturity { get => this.Tag == Command_1Tag.MergeMaturity ? (MergeMaturityResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.MergeMaturity, value); } - public DisburseResponse? Disburse { get => this.Tag == Command_1Tag.Disburse ? (DisburseResponse)this.Value! : default; set => (this.Tag, this.Value) = (Command_1Tag.Disburse, value); } - - public Command_1(Command_1Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Command_1() - { - } - - public class FollowInfo - { - public FollowInfo() - { - } - } - - public class ConfigureInfo - { - public ConfigureInfo() - { - } - } - - public class RegisterVoteInfo - { - public RegisterVoteInfo() - { - } - } - - public class MergeInfo - { - public MergeInfo() - { - } - } - } - - public enum Command_1Tag - { - Error, - Spawn, - Split, - Follow, - ClaimOrRefresh, - Configure, - RegisterVote, - Merge, - DisburseToNeuron, - MakeProposal, - MergeMaturity, - Disburse - } -} - -Type File: 'Command_2' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Command_2 - { - [VariantTagProperty] - public Command_2Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public Spawn? Spawn { get => this.Tag == Command_2Tag.Spawn ? (Spawn)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Spawn, value); } - public Split? Split { get => this.Tag == Command_2Tag.Split ? (Split)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Split, value); } - public Configure? Configure { get => this.Tag == Command_2Tag.Configure ? (Configure)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Configure, value); } - public Merge? Merge { get => this.Tag == Command_2Tag.Merge ? (Merge)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Merge, value); } - public DisburseToNeuron? DisburseToNeuron { get => this.Tag == Command_2Tag.DisburseToNeuron ? (DisburseToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.DisburseToNeuron, value); } - public ClaimOrRefresh? ClaimOrRefreshNeuron { get => this.Tag == Command_2Tag.ClaimOrRefreshNeuron ? (ClaimOrRefresh)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.ClaimOrRefreshNeuron, value); } - public MergeMaturity? MergeMaturity { get => this.Tag == Command_2Tag.MergeMaturity ? (MergeMaturity)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.MergeMaturity, value); } - public Disburse? Disburse { get => this.Tag == Command_2Tag.Disburse ? (Disburse)this.Value! : default; set => (this.Tag, this.Value) = (Command_2Tag.Disburse, value); } - - public Command_2(Command_2Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Command_2() - { - } - } - - public enum Command_2Tag - { - Spawn, - Split, - Configure, - Merge, - DisburseToNeuron, - ClaimOrRefreshNeuron, - MergeMaturity, - Disburse - } -} - -Type File: 'Configure' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class Configure - { - public OptionalValue operation { get; set; } - - public Configure(OptionalValue operation) - { - this.operation = operation; - } - - public Configure() - { - } - } -} - -Type File: 'Disburse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class Disburse - { - public OptionalValue to_account { get; set; } - public OptionalValue amount { get; set; } - - public Disburse(OptionalValue toAccount, OptionalValue amount) - { - this.to_account = toAccount; - this.amount = amount; - } - - public Disburse() - { - } - } -} - -Type File: 'DisburseResponse' - -namespace Test -{ - public class DisburseResponse - { - public ulong transfer_block_height { get; set; } - - public DisburseResponse(ulong transferBlockHeight) - { - this.transfer_block_height = transferBlockHeight; - } - - public DisburseResponse() - { - } - } -} - -Type File: 'DisburseToNeuron' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class DisburseToNeuron - { - public ulong dissolve_delay_seconds { get; set; } - public bool kyc_verified { get; set; } - public ulong amount_e8s { get; set; } - public OptionalValue new_controller { get; set; } - public ulong nonce { get; set; } - - public DisburseToNeuron(ulong dissolveDelaySeconds, bool kycVerified, ulong amountE8s, OptionalValue newController, ulong nonce) - { - this.dissolve_delay_seconds = dissolveDelaySeconds; - this.kyc_verified = kycVerified; - this.amount_e8s = amountE8s; - this.new_controller = newController; - this.nonce = nonce; - } - - public DisburseToNeuron() - { - } - } -} - -Type File: 'DissolveState' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class DissolveState - { - [VariantTagProperty] - public DissolveStateTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public ulong? DissolveDelaySeconds { get => this.Tag == DissolveStateTag.DissolveDelaySeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.DissolveDelaySeconds, value); } - public ulong? WhenDissolvedTimestampSeconds { get => this.Tag == DissolveStateTag.WhenDissolvedTimestampSeconds ? (ulong)this.Value! : default; set => (this.Tag, this.Value) = (DissolveStateTag.WhenDissolvedTimestampSeconds, value); } - - public DissolveState(DissolveStateTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected DissolveState() - { - } - } - - public enum DissolveStateTag - { - DissolveDelaySeconds, - WhenDissolvedTimestampSeconds - } -} - -Type File: 'ExecuteNnsFunction' - -using System.Collections.Generic; - -namespace Test -{ - public class ExecuteNnsFunction - { - public int nns_function { get; set; } - public List payload { get; set; } - - public ExecuteNnsFunction(int nnsFunction, List payload) - { - this.nns_function = nnsFunction; - this.payload = payload; - } - - public ExecuteNnsFunction() - { - } - } -} - -Type File: 'Follow' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class Follow - { - public int topic { get; set; } - public List followees { get; set; } - - public Follow(int topic, List followees) - { - this.topic = topic; - this.followees = followees; - } - - public Follow() - { - } - } -} - -Type File: 'Followees' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class Followees - { - public List followees { get; set; } - - public Followees(List followees) - { - this.followees = followees; - } - - public Followees() - { - } - } -} - -Type File: 'Governance' - -using System.Collections.Generic; -using Test; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class Governance - { - public Dictionary default_followees { get; set; } - public ulong wait_for_quiet_threshold_seconds { get; set; } - public OptionalValue metrics { get; set; } - public List node_providers { get; set; } - public OptionalValue economics { get; set; } - public OptionalValue latest_reward_event { get; set; } - public List to_claim_transfers { get; set; } - public ulong short_voting_period_seconds { get; set; } - public Dictionary proposals { get; set; } - public Dictionary in_flight_commands { get; set; } - public Dictionary neurons { get; set; } - public ulong genesis_timestamp_seconds { get; set; } - - 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.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() - { - } - } -} - -Type File: 'GovernanceCachedMetrics' - -using System.Collections.Generic; - -namespace Test -{ - public class GovernanceCachedMetrics - { - public Dictionary not_dissolving_neurons_e8s_buckets { get; set; } - public ulong garbage_collectable_neurons_count { get; set; } - public ulong neurons_with_invalid_stake_count { get; set; } - public Dictionary not_dissolving_neurons_count_buckets { get; set; } - public ulong total_supply_icp { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_count { get; set; } - public ulong dissolved_neurons_count { get; set; } - public ulong total_staked_e8s { get; set; } - public ulong not_dissolving_neurons_count { get; set; } - public ulong dissolved_neurons_e8s { get; set; } - public ulong neurons_with_less_than_6_months_dissolve_delay_e8s { get; set; } - public Dictionary dissolving_neurons_count_buckets { get; set; } - public ulong dissolving_neurons_count { get; set; } - public Dictionary dissolving_neurons_e8s_buckets { get; set; } - public ulong community_fund_total_staked_e8s { get; set; } - public ulong timestamp_seconds { get; set; } - - 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.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() - { - } - } -} - -Type File: 'GovernanceError' - -namespace Test -{ - public class GovernanceError - { - public string error_message { get; set; } - public int error_type { get; set; } - - public GovernanceError(string errorMessage, int errorType) - { - this.error_message = errorMessage; - this.error_type = errorType; - } - - public GovernanceError() - { - } - } -} - -Type File: 'IncreaseDissolveDelay' - -namespace Test -{ - public class IncreaseDissolveDelay - { - public uint additional_dissolve_delay_seconds { get; set; } - - public IncreaseDissolveDelay(uint additionalDissolveDelaySeconds) - { - this.additional_dissolve_delay_seconds = additionalDissolveDelaySeconds; - } - - public IncreaseDissolveDelay() - { - } - } -} - -Type File: 'KnownNeuron' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class KnownNeuron - { - public OptionalValue id { get; set; } - public OptionalValue known_neuron_data { get; set; } - - public KnownNeuron(OptionalValue id, OptionalValue knownNeuronData) - { - this.id = id; - this.known_neuron_data = knownNeuronData; - } - - public KnownNeuron() - { - } - } -} - -Type File: 'KnownNeuronData' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class KnownNeuronData - { - public string name { get; set; } - public OptionalValue description { get; set; } - - public KnownNeuronData(string name, OptionalValue description) - { - this.name = name; - this.description = description; - } - - public KnownNeuronData() - { - } - } -} - -Type File: 'ListKnownNeuronsResponse' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class ListKnownNeuronsResponse - { - public List known_neurons { get; set; } - - public ListKnownNeuronsResponse(List knownNeurons) - { - this.known_neurons = knownNeurons; - } - - public ListKnownNeuronsResponse() - { - } - } -} - -Type File: 'ListNeurons' - -using System.Collections.Generic; - -namespace Test -{ - public class ListNeurons - { - public List neuron_ids { get; set; } - public bool include_neurons_readable_by_caller { get; set; } - - public ListNeurons(List neuronIds, bool includeNeuronsReadableByCaller) - { - this.neuron_ids = neuronIds; - this.include_neurons_readable_by_caller = includeNeuronsReadableByCaller; - } - - public ListNeurons() - { - } - } -} - -Type File: 'ListNeuronsResponse' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class ListNeuronsResponse - { - public Dictionary neuron_infos { get; set; } - public List full_neurons { get; set; } - - public ListNeuronsResponse(Dictionary neuronInfos, List fullNeurons) - { - this.neuron_infos = neuronInfos; - this.full_neurons = fullNeurons; - } - - public ListNeuronsResponse() - { - } - } -} - -Type File: 'ListNodeProvidersResponse' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class ListNodeProvidersResponse - { - public List node_providers { get; set; } - - public ListNodeProvidersResponse(List nodeProviders) - { - this.node_providers = nodeProviders; - } - - public ListNodeProvidersResponse() - { - } - } -} - -Type File: 'ListProposalInfo' - -using System.Collections.Generic; -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ListProposalInfo - { - public List include_reward_status { get; set; } - public OptionalValue before_proposal { get; set; } - public uint limit { get; set; } - public List exclude_topic { get; set; } - public List include_status { get; set; } - - public ListProposalInfo(List includeRewardStatus, OptionalValue beforeProposal, uint limit, List excludeTopic, List includeStatus) - { - this.include_reward_status = includeRewardStatus; - this.before_proposal = beforeProposal; - this.limit = limit; - this.exclude_topic = excludeTopic; - this.include_status = includeStatus; - } - - public ListProposalInfo() - { - } - } -} - -Type File: 'ListProposalInfoResponse' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class ListProposalInfoResponse - { - public List proposal_info { get; set; } - - public ListProposalInfoResponse(List proposalInfo) - { - this.proposal_info = proposalInfo; - } - - public ListProposalInfoResponse() - { - } - } -} - -Type File: 'MakeProposalResponse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class MakeProposalResponse - { - public OptionalValue proposal_id { get; set; } - - public MakeProposalResponse(OptionalValue proposalId) - { - this.proposal_id = proposalId; - } - - public MakeProposalResponse() - { - } - } -} - -Type File: 'ManageNeuron' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ManageNeuron - { - public OptionalValue id { get; set; } - public OptionalValue command { 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.neuron_id_or_subaccount = neuronIdOrSubaccount; - } - - public ManageNeuron() - { - } - } -} - -Type File: 'ManageNeuronResponse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class ManageNeuronResponse - { - public OptionalValue command { get; set; } - - public ManageNeuronResponse(OptionalValue command) - { - this.command = command; - } - - public ManageNeuronResponse() - { - } - } -} - -Type File: 'Merge' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class Merge - { - public OptionalValue source_neuron_id { get; set; } - - public Merge(OptionalValue sourceNeuronId) - { - this.source_neuron_id = sourceNeuronId; - } - - public Merge() - { - } - } -} - -Type File: 'MergeMaturity' - -namespace Test -{ - public class MergeMaturity - { - public uint percentage_to_merge { get; set; } - - public MergeMaturity(uint percentageToMerge) - { - this.percentage_to_merge = percentageToMerge; - } - - public MergeMaturity() - { - } - } -} - -Type File: 'MergeMaturityResponse' - -namespace Test -{ - public class MergeMaturityResponse - { - public ulong merged_maturity_e8s { get; set; } - public ulong new_stake_e8s { get; set; } - - public MergeMaturityResponse(ulong mergedMaturityE8s, ulong newStakeE8s) - { - this.merged_maturity_e8s = mergedMaturityE8s; - this.new_stake_e8s = newStakeE8s; - } - - public MergeMaturityResponse() - { - } - } -} - -Type File: 'Motion' - -namespace Test -{ - public class Motion - { - public string motion_text { get; set; } - - public Motion(string motionText) - { - this.motion_text = motionText; - } - - public Motion() - { - } - } -} - -Type File: 'NetworkEconomics' - -namespace Test -{ - public class NetworkEconomics - { - public ulong neuron_minimum_stake_e8s { get; set; } - public uint max_proposals_to_keep_per_topic { get; set; } - public ulong neuron_management_fee_per_proposal_e8s { get; set; } - public ulong reject_cost_e8s { get; set; } - public ulong transaction_fee_e8s { get; set; } - public ulong neuron_spawn_dissolve_delay_seconds { get; set; } - public ulong minimum_icp_xdr_rate { 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.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() - { - } - } -} - -Type File: 'Neuron' - -using EdjCase.ICP.Candid.Models; -using Test; -using System.Collections.Generic; - -namespace Test -{ - public class Neuron - { - public OptionalValue id { get; set; } - public OptionalValue controller { get; set; } - public List recent_ballots { get; set; } - public bool kyc_verified { get; set; } - public bool not_for_profit { get; set; } - public ulong maturity_e8s_equivalent { get; set; } - public ulong cached_neuron_stake_e8s { get; set; } - public ulong created_timestamp_seconds { get; set; } - public ulong aging_since_timestamp_seconds { get; set; } - public List hot_keys { get; set; } - public List account { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public OptionalValue dissolve_state { get; set; } - public Dictionary followees { get; set; } - public ulong neuron_fees_e8s { get; set; } - public OptionalValue transfer { 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, Dictionary followees, ulong neuronFeesE8s, OptionalValue transfer, OptionalValue 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() - { - } - } -} - -Type File: 'NeuronId' - -namespace Test -{ - public class NeuronId - { - public ulong id { get; set; } - - public NeuronId(ulong id) - { - this.id = id; - } - - public NeuronId() - { - } - } -} - -Type File: 'NeuronIdOrSubaccount' - -using EdjCase.ICP.Candid.Mapping; -using Test; -using System.Collections.Generic; - -namespace Test -{ - [Variant] - public class NeuronIdOrSubaccount - { - [VariantTagProperty] - public NeuronIdOrSubaccountTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public List? Subaccount { get => this.Tag == NeuronIdOrSubaccountTag.Subaccount ? (List)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.Subaccount, value); } - public NeuronId? NeuronId { get => this.Tag == NeuronIdOrSubaccountTag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (NeuronIdOrSubaccountTag.NeuronId, value); } - - public NeuronIdOrSubaccount(NeuronIdOrSubaccountTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected NeuronIdOrSubaccount() - { - } - } - - public enum NeuronIdOrSubaccountTag - { - Subaccount, - NeuronId - } -} - -Type File: 'NeuronInFlightCommand' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class NeuronInFlightCommand - { - public OptionalValue command { get; set; } - public ulong timestamp { get; set; } - - public NeuronInFlightCommand(OptionalValue command, ulong timestamp) - { - this.command = command; - this.timestamp = timestamp; - } - - public NeuronInFlightCommand() - { - } - } -} - -Type File: 'NeuronInfo' - -using System.Collections.Generic; -using Test; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class NeuronInfo - { - public ulong dissolve_delay_seconds { get; set; } - public List recent_ballots { get; set; } - public ulong created_timestamp_seconds { get; set; } - public int state { get; set; } - public ulong stake_e8s { get; set; } - public OptionalValue joined_community_fund_timestamp_seconds { get; set; } - public ulong retrieved_at_timestamp_seconds { get; set; } - public OptionalValue known_neuron_data { get; set; } - public ulong voting_power { 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.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() - { - } - } -} - -Type File: 'NeuronStakeTransfer' - -using System.Collections.Generic; -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class NeuronStakeTransfer - { - public List to_subaccount { get; set; } - public ulong neuron_stake_e8s { get; set; } - public OptionalValue from { get; set; } - public ulong memo { get; set; } - public List from_subaccount { get; set; } - public ulong transfer_timestamp { 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.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() - { - } - } -} - -Type File: 'NodeProvider' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class NodeProvider - { - public OptionalValue id { get; set; } - public OptionalValue reward_account { get; set; } - - public NodeProvider(OptionalValue id, OptionalValue rewardAccount) - { - this.id = id; - this.reward_account = rewardAccount; - } - - public NodeProvider() - { - } - } -} - -Type File: 'Operation' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Operation - { - [VariantTagProperty] - public OperationTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public RemoveHotKey? RemoveHotKey { get => this.Tag == OperationTag.RemoveHotKey ? (RemoveHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.RemoveHotKey, value); } - public AddHotKey? AddHotKey { get => this.Tag == OperationTag.AddHotKey ? (AddHotKey)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.AddHotKey, value); } - public Operation.StopDissolvingInfo? StopDissolving { get => this.Tag == OperationTag.StopDissolving ? (Operation.StopDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StopDissolving, value); } - public Operation.StartDissolvingInfo? StartDissolving { get => this.Tag == OperationTag.StartDissolving ? (Operation.StartDissolvingInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.StartDissolving, value); } - public IncreaseDissolveDelay? IncreaseDissolveDelay { get => this.Tag == OperationTag.IncreaseDissolveDelay ? (IncreaseDissolveDelay)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.IncreaseDissolveDelay, value); } - public Operation.JoinCommunityFundInfo? JoinCommunityFund { get => this.Tag == OperationTag.JoinCommunityFund ? (Operation.JoinCommunityFundInfo)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.JoinCommunityFund, value); } - public SetDissolveTimestamp? SetDissolveTimestamp { get => this.Tag == OperationTag.SetDissolveTimestamp ? (SetDissolveTimestamp)this.Value! : default; set => (this.Tag, this.Value) = (OperationTag.SetDissolveTimestamp, value); } - - public Operation(OperationTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Operation() - { - } - - public class StopDissolvingInfo - { - public StopDissolvingInfo() - { - } - } - - public class StartDissolvingInfo - { - public StartDissolvingInfo() - { - } - } - - public class JoinCommunityFundInfo - { - public JoinCommunityFundInfo() - { - } - } - } - - public enum OperationTag - { - RemoveHotKey, - AddHotKey, - StopDissolving, - StartDissolving, - IncreaseDissolveDelay, - JoinCommunityFund, - SetDissolveTimestamp - } -} - -Type File: 'Proposal' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class Proposal - { - public string url { get; set; } - public OptionalValue title { get; set; } - public OptionalValue action { 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; - } - - public Proposal() - { - } - } -} - -Type File: 'ProposalData' - -using EdjCase.ICP.Candid.Models; -using Test; -using System.Collections.Generic; - -namespace Test -{ - public class ProposalData - { - public OptionalValue id { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public OptionalValue wait_for_quiet_state { get; set; } - public ulong executed_timestamp_seconds { get; set; } - - 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.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() - { - } - } -} - -Type File: 'ProposalInfo' - -using EdjCase.ICP.Candid.Models; -using Test; -using System.Collections.Generic; - -namespace Test -{ - public class ProposalInfo - { - public OptionalValue id { get; set; } - public int status { get; set; } - public int topic { get; set; } - public OptionalValue failure_reason { get; set; } - public Dictionary ballots { get; set; } - public ulong proposal_timestamp_seconds { get; set; } - public ulong reward_event_round { get; set; } - public OptionalValue deadline_timestamp_seconds { get; set; } - public ulong failed_timestamp_seconds { get; set; } - public ulong reject_cost_e8s { get; set; } - public OptionalValue latest_tally { get; set; } - public int reward_status { get; set; } - public ulong decided_timestamp_seconds { get; set; } - public OptionalValue proposal { get; set; } - public OptionalValue proposer { get; set; } - public ulong executed_timestamp_seconds { get; set; } - - 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.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() - { - } - } -} - -Type File: 'RegisterVote' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class RegisterVote - { - public int vote { get; set; } - public OptionalValue proposal { get; set; } - - public RegisterVote(int vote, OptionalValue proposal) - { - this.vote = vote; - this.proposal = proposal; - } - - public RegisterVote() - { - } - } -} - -Type File: 'RemoveHotKey' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class RemoveHotKey - { - public OptionalValue hot_key_to_remove { get; set; } - - public RemoveHotKey(OptionalValue hotKeyToRemove) - { - this.hot_key_to_remove = hotKeyToRemove; - } - - public RemoveHotKey() - { - } - } -} - -Type File: 'Result' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result - { - [VariantTagProperty] - public ResultTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public GovernanceError? Err { get => this.Tag == ResultTag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (ResultTag.Err, value); } - - public Result(ResultTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result() - { - } - } - - public enum ResultTag - { - Ok, - Err - } -} - -Type File: 'Result_1' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result_1 - { - [VariantTagProperty] - public Result_1Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public GovernanceError? Error { get => this.Tag == Result_1Tag.Error ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.Error, value); } - public NeuronId? NeuronId { get => this.Tag == Result_1Tag.NeuronId ? (NeuronId)this.Value! : default; set => (this.Tag, this.Value) = (Result_1Tag.NeuronId, value); } - - public Result_1(Result_1Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result_1() - { - } - } - - public enum Result_1Tag - { - Error, - NeuronId - } -} - -Type File: 'Result_2' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result_2 - { - [VariantTagProperty] - public Result_2Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public Neuron? Ok { get => this.Tag == Result_2Tag.Ok ? (Neuron)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_2Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_2Tag.Err, value); } - - public Result_2(Result_2Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result_2() - { - } - } - - public enum Result_2Tag - { - Ok, - Err - } -} - -Type File: 'Result_3' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result_3 - { - [VariantTagProperty] - public Result_3Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public RewardNodeProviders? Ok { get => this.Tag == Result_3Tag.Ok ? (RewardNodeProviders)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_3Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_3Tag.Err, value); } - - public Result_3(Result_3Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result_3() - { - } - } - - public enum Result_3Tag - { - Ok, - Err - } -} - -Type File: 'Result_4' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result_4 - { - [VariantTagProperty] - public Result_4Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public NeuronInfo? Ok { get => this.Tag == Result_4Tag.Ok ? (NeuronInfo)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_4Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_4Tag.Err, value); } - - public Result_4(Result_4Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result_4() - { - } - } - - public enum Result_4Tag - { - Ok, - Err - } -} - -Type File: 'Result_5' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class Result_5 - { - [VariantTagProperty] - public Result_5Tag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public NodeProvider? Ok { get => this.Tag == Result_5Tag.Ok ? (NodeProvider)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Ok, value); } - public GovernanceError? Err { get => this.Tag == Result_5Tag.Err ? (GovernanceError)this.Value! : default; set => (this.Tag, this.Value) = (Result_5Tag.Err, value); } - - public Result_5(Result_5Tag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected Result_5() - { - } - } - - public enum Result_5Tag - { - Ok, - Err - } -} - -Type File: 'RewardEvent' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class RewardEvent - { - public ulong day_after_genesis { get; set; } - public ulong actual_timestamp_seconds { get; set; } - public ulong distributed_e8s_equivalent { get; set; } - public List settled_proposals { get; set; } - - public RewardEvent(ulong dayAfterGenesis, ulong actualTimestampSeconds, ulong distributedE8sEquivalent, List settledProposals) - { - this.day_after_genesis = dayAfterGenesis; - this.actual_timestamp_seconds = actualTimestampSeconds; - this.distributed_e8s_equivalent = distributedE8sEquivalent; - this.settled_proposals = settledProposals; - } - - public RewardEvent() - { - } - } -} - -Type File: 'RewardMode' - -using EdjCase.ICP.Candid.Mapping; -using Test; - -namespace Test -{ - [Variant] - public class RewardMode - { - [VariantTagProperty] - public RewardModeTag Tag { get; set; } - - [VariantValueProperty] - public object? Value { get; set; } - public RewardToNeuron? RewardToNeuron { get => this.Tag == RewardModeTag.RewardToNeuron ? (RewardToNeuron)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToNeuron, value); } - public RewardToAccount? RewardToAccount { get => this.Tag == RewardModeTag.RewardToAccount ? (RewardToAccount)this.Value! : default; set => (this.Tag, this.Value) = (RewardModeTag.RewardToAccount, value); } - - public RewardMode(RewardModeTag tag, object? value) - { - this.Tag = tag; - this.Value = value; - } - - protected RewardMode() - { - } - } - - public enum RewardModeTag - { - RewardToNeuron, - RewardToAccount - } -} - -Type File: 'RewardNodeProvider' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class RewardNodeProvider - { - public OptionalValue node_provider { get; set; } - public OptionalValue reward_mode { get; set; } - public ulong amount_e8s { get; set; } - - public RewardNodeProvider(OptionalValue nodeProvider, OptionalValue rewardMode, ulong amountE8s) - { - this.node_provider = nodeProvider; - this.reward_mode = rewardMode; - this.amount_e8s = amountE8s; - } - - public RewardNodeProvider() - { - } - } -} - -Type File: 'RewardNodeProviders' - -using EdjCase.ICP.Candid.Models; -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class RewardNodeProviders - { - public OptionalValue use_registry_derived_rewards { get; set; } - public List rewards { get; set; } - - public RewardNodeProviders(OptionalValue useRegistryDerivedRewards, List rewards) - { - this.use_registry_derived_rewards = useRegistryDerivedRewards; - this.rewards = rewards; - } - - public RewardNodeProviders() - { - } - } -} - -Type File: 'RewardToAccount' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class RewardToAccount - { - public OptionalValue to_account { get; set; } - - public RewardToAccount(OptionalValue toAccount) - { - this.to_account = toAccount; - } - - public RewardToAccount() - { - } - } -} - -Type File: 'RewardToNeuron' - -namespace Test -{ - public class RewardToNeuron - { - public ulong dissolve_delay_seconds { get; set; } - - public RewardToNeuron(ulong dissolveDelaySeconds) - { - this.dissolve_delay_seconds = dissolveDelaySeconds; - } - - public RewardToNeuron() - { - } - } -} - -Type File: 'SetDefaultFollowees' - -using System.Collections.Generic; -using Test; - -namespace Test -{ - public class SetDefaultFollowees - { - public Dictionary default_followees { get; set; } - - public SetDefaultFollowees(Dictionary defaultFollowees) - { - this.default_followees = defaultFollowees; - } - - public SetDefaultFollowees() - { - } - } -} - -Type File: 'SetDissolveTimestamp' - -namespace Test -{ - public class SetDissolveTimestamp - { - public ulong dissolve_timestamp_seconds { get; set; } - - public SetDissolveTimestamp(ulong dissolveTimestampSeconds) - { - this.dissolve_timestamp_seconds = dissolveTimestampSeconds; - } - - public SetDissolveTimestamp() - { - } - } -} - -Type File: 'Spawn' - -using EdjCase.ICP.Candid.Models; - -namespace Test -{ - public class Spawn - { - public OptionalValue percentage_to_spawn { get; set; } - public OptionalValue new_controller { get; set; } - public OptionalValue nonce { get; set; } - - public Spawn(OptionalValue percentageToSpawn, OptionalValue newController, OptionalValue nonce) - { - this.percentage_to_spawn = percentageToSpawn; - this.new_controller = newController; - this.nonce = nonce; - } - - public Spawn() - { - } - } -} - -Type File: 'SpawnResponse' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class SpawnResponse - { - public OptionalValue created_neuron_id { get; set; } - - public SpawnResponse(OptionalValue createdNeuronId) - { - this.created_neuron_id = createdNeuronId; - } - - public SpawnResponse() - { - } - } -} - -Type File: 'Split' - -namespace Test -{ - public class Split - { - public ulong amount_e8s { get; set; } - - public Split(ulong amountE8s) - { - this.amount_e8s = amountE8s; - } - - public Split() - { - } - } -} - -Type File: 'Tally' - -namespace Test -{ - public class Tally - { - public ulong no { get; set; } - public ulong yes { get; set; } - public ulong total { 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.timestamp_seconds = timestampSeconds; - } - - public Tally() - { - } - } -} - -Type File: 'UpdateNodeProvider' - -using EdjCase.ICP.Candid.Models; -using Test; - -namespace Test -{ - public class UpdateNodeProvider - { - public OptionalValue reward_account { get; set; } - - public UpdateNodeProvider(OptionalValue rewardAccount) - { - this.reward_account = rewardAccount; - } - - public UpdateNodeProvider() - { - } - } -} - -Type File: 'WaitForQuietState' - -namespace Test -{ - public class WaitForQuietState - { - public ulong current_deadline_timestamp_seconds { get; set; } - - public WaitForQuietState(ulong currentDeadlineTimestampSeconds) - { - this.current_deadline_timestamp_seconds = currentDeadlineTimestampSeconds; - } - - public WaitForQuietState() - { - } - } -}