Skip to content

Commit

Permalink
Add FreezeState type.
Browse files Browse the repository at this point in the history
  • Loading branch information
v16Studios committed Dec 29, 2023
1 parent e96cfca commit 00bedd9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/Enjin.Platform.Sdk/Enjin.Platform.Sdk/Model/FreezeState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
using JetBrains.Annotations;

namespace Enjin.Platform.Sdk;

/// <summary>
/// The freezable objects supported on-chain.
/// </summary>
[JsonConverter(typeof(JsonStringEnumMemberConverter))]
[PublicAPI]
public enum FreezeState
{
/// <summary>
/// Indicates the token will be permanently frozen.
/// </summary>
[EnumMember(Value = "PERMANENT")]
Permanent,

/// <summary>
/// Indicates the token will be frozen temporarily.
/// </summary>
[EnumMember(Value = "TEMPORARY")]
Temporary,

/// <summary>
/// Indicates the the token cannot be frozen.
/// </summary>
[EnumMember(Value = "NEVER")]
Never,
}
12 changes: 12 additions & 0 deletions src/Enjin.Platform.Sdk/Enjin.Platform.Sdk/Schema/CoreTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ public static class CoreTypes
/// </summary>
public const string EncodableTokenIdInputArray = "[EncodableTokenIdInput!]!";

// FreezeStateType

/// <summary>
/// String for <c>FreezeType</c> type.
/// </summary>
public const string FreezeState = "FreezeStateType!";

/// <summary>
/// String for an array of <c>FreezeType</c> type.
/// </summary>
public const string FreezeStateArray = "[FreezeStateType!]!";

// FreezeType

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ public Freeze SetFreezeType(FreezeType? freezeType)
{
return SetVariable("freezeType", CoreTypes.FreezeType, freezeType);
}

/// <summary>
/// Sets the freeze state type.
/// </summary>
/// <param name="freezeState">The freeze state type.</param>
/// <returns>This request for chaining.</returns>
public Freeze SetFreezeState(FreezeState? freezeState)
{
return SetVariable("freezeState", CoreTypes.FreezeState, freezeState);
}

/// <summary>
/// Sets the collection ID to freeze.
Expand Down

0 comments on commit 00bedd9

Please sign in to comment.