Skip to content

Commit

Permalink
update core api models to newest ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelPawelec-RDX committed Nov 13, 2024
1 parent 22b1ecb commit fafc9ad
Show file tree
Hide file tree
Showing 39 changed files with 2,159 additions and 394 deletions.
315 changes: 266 additions & 49 deletions src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/RadixDlt.CoreApiSdk/generated/Model/AccessRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
namespace RadixDlt.CoreApiSdk.Model
{
/// <summary>
/// AccessRule
/// A representation of an access rule in the Radix Engine. Note that some of the field and discriminator names use an older naming schema, for backwards compatibility. See the [advanced access rules](https://docs.radixdlt.com/docs/advanced-accessrules) docs for more information.
/// </summary>
[DataContract(Name = "AccessRule")]
[JsonConverter(typeof(JsonSubtypes), "type")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,33 +91,33 @@
namespace RadixDlt.CoreApiSdk.Model
{
/// <summary>
/// AnyOfProofRule
/// AllOfBasicRequirement
/// </summary>
[DataContract(Name = "AnyOfProofRule")]
[DataContract(Name = "AllOfBasicRequirement")]
[JsonConverter(typeof(JsonSubtypes), "type")]
[JsonSubtypes.KnownSubType(typeof(AllOfProofRule), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AmountOfProofRule), "AmountOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfProofRule), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(CountOfProofRule), "CountOf")]
[JsonSubtypes.KnownSubType(typeof(RequireProofRule), "Require")]
public partial class AnyOfProofRule : ProofRule, IEquatable<AnyOfProofRule>
[JsonSubtypes.KnownSubType(typeof(AllOfBasicRequirement), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AmountOfBasicRequirement), "AmountOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfBasicRequirement), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(CountOfBasicRequirement), "CountOf")]
[JsonSubtypes.KnownSubType(typeof(RequireBasicRequirement), "Require")]
public partial class AllOfBasicRequirement : BasicRequirement, IEquatable<AllOfBasicRequirement>
{
/// <summary>
/// Initializes a new instance of the <see cref="AnyOfProofRule" /> class.
/// Initializes a new instance of the <see cref="AllOfBasicRequirement" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AnyOfProofRule() { }
protected AllOfBasicRequirement() { }
/// <summary>
/// Initializes a new instance of the <see cref="AnyOfProofRule" /> class.
/// Initializes a new instance of the <see cref="AllOfBasicRequirement" /> class.
/// </summary>
/// <param name="list">list (required).</param>
/// <param name="type">type (required) (default to ProofRuleType.AnyOf).</param>
public AnyOfProofRule(List<Requirement> list = default(List<Requirement>), ProofRuleType type = ProofRuleType.AnyOf) : base(type)
/// <param name="type">type (required) (default to BasicRequirementType.AllOf).</param>
public AllOfBasicRequirement(List<Requirement> list = default(List<Requirement>), BasicRequirementType type = BasicRequirementType.AllOf) : base(type)
{
// to ensure "list" is required (not null)
if (list == null)
{
throw new ArgumentNullException("list is a required property for AnyOfProofRule and cannot be null");
throw new ArgumentNullException("list is a required property for AllOfBasicRequirement and cannot be null");
}
this.List = list;
}
Expand All @@ -135,7 +135,7 @@ protected AnyOfProofRule() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AnyOfProofRule {\n");
sb.Append("class AllOfBasicRequirement {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" List: ").Append(List).Append("\n");
sb.Append("}\n");
Expand All @@ -158,15 +158,15 @@ public override string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AnyOfProofRule);
return this.Equals(input as AllOfBasicRequirement);
}

/// <summary>
/// Returns true if AnyOfProofRule instances are equal
/// Returns true if AllOfBasicRequirement instances are equal
/// </summary>
/// <param name="input">Instance of AnyOfProofRule to be compared</param>
/// <param name="input">Instance of AllOfBasicRequirement to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AnyOfProofRule input)
public bool Equals(AllOfBasicRequirement input)
{
if (input == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,26 @@
namespace RadixDlt.CoreApiSdk.Model
{
/// <summary>
/// AllOfProofRuleAllOf
/// AllOfBasicRequirementAllOf
/// </summary>
[DataContract(Name = "AllOfProofRule_allOf")]
public partial class AllOfProofRuleAllOf : IEquatable<AllOfProofRuleAllOf>
[DataContract(Name = "AllOfBasicRequirement_allOf")]
public partial class AllOfBasicRequirementAllOf : IEquatable<AllOfBasicRequirementAllOf>
{
/// <summary>
/// Initializes a new instance of the <see cref="AllOfProofRuleAllOf" /> class.
/// Initializes a new instance of the <see cref="AllOfBasicRequirementAllOf" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AllOfProofRuleAllOf() { }
protected AllOfBasicRequirementAllOf() { }
/// <summary>
/// Initializes a new instance of the <see cref="AllOfProofRuleAllOf" /> class.
/// Initializes a new instance of the <see cref="AllOfBasicRequirementAllOf" /> class.
/// </summary>
/// <param name="list">list (required).</param>
public AllOfProofRuleAllOf(List<Requirement> list = default(List<Requirement>))
public AllOfBasicRequirementAllOf(List<Requirement> list = default(List<Requirement>))
{
// to ensure "list" is required (not null)
if (list == null)
{
throw new ArgumentNullException("list is a required property for AllOfProofRuleAllOf and cannot be null");
throw new ArgumentNullException("list is a required property for AllOfBasicRequirementAllOf and cannot be null");
}
this.List = list;
}
Expand All @@ -127,7 +127,7 @@ protected AllOfProofRuleAllOf() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AllOfProofRuleAllOf {\n");
sb.Append("class AllOfBasicRequirementAllOf {\n");
sb.Append(" List: ").Append(List).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand All @@ -149,15 +149,15 @@ public virtual string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AllOfProofRuleAllOf);
return this.Equals(input as AllOfBasicRequirementAllOf);
}

/// <summary>
/// Returns true if AllOfProofRuleAllOf instances are equal
/// Returns true if AllOfBasicRequirementAllOf instances are equal
/// </summary>
/// <param name="input">Instance of AllOfProofRuleAllOf to be compared</param>
/// <param name="input">Instance of AllOfBasicRequirementAllOf to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AllOfProofRuleAllOf input)
public bool Equals(AllOfBasicRequirementAllOf input)
{
if (input == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,31 @@
namespace RadixDlt.CoreApiSdk.Model
{
/// <summary>
/// AnyOfAccessRuleNode
/// AllOfCompositeRequirement
/// </summary>
[DataContract(Name = "AnyOfAccessRuleNode")]
[DataContract(Name = "AllOfCompositeRequirement")]
[JsonConverter(typeof(JsonSubtypes), "type")]
[JsonSubtypes.KnownSubType(typeof(AllOfAccessRuleNode), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfAccessRuleNode), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(ProofAccessRuleNode), "ProofRule")]
public partial class AnyOfAccessRuleNode : AccessRuleNode, IEquatable<AnyOfAccessRuleNode>
[JsonSubtypes.KnownSubType(typeof(AllOfCompositeRequirement), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfCompositeRequirement), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(ProofRuleCompositeRequirement), "ProofRule")]
public partial class AllOfCompositeRequirement : CompositeRequirement, IEquatable<AllOfCompositeRequirement>
{
/// <summary>
/// Initializes a new instance of the <see cref="AnyOfAccessRuleNode" /> class.
/// Initializes a new instance of the <see cref="AllOfCompositeRequirement" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AnyOfAccessRuleNode() { }
protected AllOfCompositeRequirement() { }
/// <summary>
/// Initializes a new instance of the <see cref="AnyOfAccessRuleNode" /> class.
/// Initializes a new instance of the <see cref="AllOfCompositeRequirement" /> class.
/// </summary>
/// <param name="accessRules">accessRules (required).</param>
/// <param name="type">type (required) (default to AccessRuleNodeType.AnyOf).</param>
public AnyOfAccessRuleNode(List<AccessRuleNode> accessRules = default(List<AccessRuleNode>), AccessRuleNodeType type = AccessRuleNodeType.AnyOf) : base(type)
/// <param name="type">type (required) (default to CompositeRequirementType.AllOf).</param>
public AllOfCompositeRequirement(List<CompositeRequirement> accessRules = default(List<CompositeRequirement>), CompositeRequirementType type = CompositeRequirementType.AllOf) : base(type)
{
// to ensure "accessRules" is required (not null)
if (accessRules == null)
{
throw new ArgumentNullException("accessRules is a required property for AnyOfAccessRuleNode and cannot be null");
throw new ArgumentNullException("accessRules is a required property for AllOfCompositeRequirement and cannot be null");
}
this.AccessRules = accessRules;
}
Expand All @@ -124,7 +124,7 @@ protected AnyOfAccessRuleNode() { }
/// Gets or Sets AccessRules
/// </summary>
[DataMember(Name = "access_rules", IsRequired = true, EmitDefaultValue = true)]
public List<AccessRuleNode> AccessRules { get; set; }
public List<CompositeRequirement> AccessRules { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand All @@ -133,7 +133,7 @@ protected AnyOfAccessRuleNode() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AnyOfAccessRuleNode {\n");
sb.Append("class AllOfCompositeRequirement {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" AccessRules: ").Append(AccessRules).Append("\n");
sb.Append("}\n");
Expand All @@ -156,15 +156,15 @@ public override string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AnyOfAccessRuleNode);
return this.Equals(input as AllOfCompositeRequirement);
}

/// <summary>
/// Returns true if AnyOfAccessRuleNode instances are equal
/// Returns true if AllOfCompositeRequirement instances are equal
/// </summary>
/// <param name="input">Instance of AnyOfAccessRuleNode to be compared</param>
/// <param name="input">Instance of AllOfCompositeRequirement to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AnyOfAccessRuleNode input)
public bool Equals(AllOfCompositeRequirement input)
{
if (input == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,40 +91,40 @@
namespace RadixDlt.CoreApiSdk.Model
{
/// <summary>
/// AmountOfProofRule
/// AmountOfBasicRequirement
/// </summary>
[DataContract(Name = "AmountOfProofRule")]
[DataContract(Name = "AmountOfBasicRequirement")]
[JsonConverter(typeof(JsonSubtypes), "type")]
[JsonSubtypes.KnownSubType(typeof(AllOfProofRule), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AmountOfProofRule), "AmountOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfProofRule), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(CountOfProofRule), "CountOf")]
[JsonSubtypes.KnownSubType(typeof(RequireProofRule), "Require")]
public partial class AmountOfProofRule : ProofRule, IEquatable<AmountOfProofRule>
[JsonSubtypes.KnownSubType(typeof(AllOfBasicRequirement), "AllOf")]
[JsonSubtypes.KnownSubType(typeof(AmountOfBasicRequirement), "AmountOf")]
[JsonSubtypes.KnownSubType(typeof(AnyOfBasicRequirement), "AnyOf")]
[JsonSubtypes.KnownSubType(typeof(CountOfBasicRequirement), "CountOf")]
[JsonSubtypes.KnownSubType(typeof(RequireBasicRequirement), "Require")]
public partial class AmountOfBasicRequirement : BasicRequirement, IEquatable<AmountOfBasicRequirement>
{
/// <summary>
/// Initializes a new instance of the <see cref="AmountOfProofRule" /> class.
/// Initializes a new instance of the <see cref="AmountOfBasicRequirement" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AmountOfProofRule() { }
protected AmountOfBasicRequirement() { }
/// <summary>
/// Initializes a new instance of the <see cref="AmountOfProofRule" /> class.
/// Initializes a new instance of the <see cref="AmountOfBasicRequirement" /> class.
/// </summary>
/// <param name="amount">amount (required).</param>
/// <param name="resource">The Bech32m-encoded human readable version of the resource address (required).</param>
/// <param name="type">type (required) (default to ProofRuleType.AmountOf).</param>
public AmountOfProofRule(string amount = default(string), string resource = default(string), ProofRuleType type = ProofRuleType.AmountOf) : base(type)
/// <param name="type">type (required) (default to BasicRequirementType.AmountOf).</param>
public AmountOfBasicRequirement(string amount = default(string), string resource = default(string), BasicRequirementType type = BasicRequirementType.AmountOf) : base(type)
{
// to ensure "amount" is required (not null)
if (amount == null)
{
throw new ArgumentNullException("amount is a required property for AmountOfProofRule and cannot be null");
throw new ArgumentNullException("amount is a required property for AmountOfBasicRequirement and cannot be null");
}
this.Amount = amount;
// to ensure "resource" is required (not null)
if (resource == null)
{
throw new ArgumentNullException("resource is a required property for AmountOfProofRule and cannot be null");
throw new ArgumentNullException("resource is a required property for AmountOfBasicRequirement and cannot be null");
}
this.Resource = resource;
}
Expand All @@ -149,7 +149,7 @@ protected AmountOfProofRule() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AmountOfProofRule {\n");
sb.Append("class AmountOfBasicRequirement {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" Amount: ").Append(Amount).Append("\n");
sb.Append(" Resource: ").Append(Resource).Append("\n");
Expand All @@ -173,15 +173,15 @@ public override string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AmountOfProofRule);
return this.Equals(input as AmountOfBasicRequirement);
}

/// <summary>
/// Returns true if AmountOfProofRule instances are equal
/// Returns true if AmountOfBasicRequirement instances are equal
/// </summary>
/// <param name="input">Instance of AmountOfProofRule to be compared</param>
/// <param name="input">Instance of AmountOfBasicRequirement to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AmountOfProofRule input)
public bool Equals(AmountOfBasicRequirement input)
{
if (input == null)
{
Expand Down
Loading

0 comments on commit fafc9ad

Please sign in to comment.