11package com .algorand .algosdk .v2 .client .model ;
22
3+ import com .fasterxml .jackson .annotation .JsonCreator ;
34import com .fasterxml .jackson .annotation .JsonProperty ;
45
56public class Enums {
@@ -10,7 +11,8 @@ public class Enums {
1011 public enum AddressRole {
1112 @ JsonProperty ("sender" ) SENDER ("sender" ),
1213 @ JsonProperty ("receiver" ) RECEIVER ("receiver" ),
13- @ JsonProperty ("freeze-target" ) FREEZETARGET ("freeze-target" );
14+ @ JsonProperty ("freeze-target" ) FREEZETARGET ("freeze-target" ),
15+ @ JsonProperty ("" ) UNKNOWN ("" );
1416
1517 final String serializedName ;
1618 AddressRole (String name ) {
@@ -21,6 +23,17 @@ public enum AddressRole {
2123 public String toString () {
2224 return this .serializedName ;
2325 }
26+
27+ @ JsonCreator
28+ public static AddressRole forValue (String value ) {
29+ for (AddressRole t : values ()) {
30+ if (t .serializedName .equalsIgnoreCase (value )) {
31+ return t ;
32+ }
33+ }
34+ return UNKNOWN ;
35+ }
36+
2437 }
2538
2639 /**
@@ -34,7 +47,8 @@ public enum Exclude {
3447 @ JsonProperty ("created-assets" ) CREATEDASSETS ("created-assets" ),
3548 @ JsonProperty ("apps-local-state" ) APPSLOCALSTATE ("apps-local-state" ),
3649 @ JsonProperty ("created-apps" ) CREATEDAPPS ("created-apps" ),
37- @ JsonProperty ("none" ) NONE ("none" );
50+ @ JsonProperty ("none" ) NONE ("none" ),
51+ @ JsonProperty ("" ) UNKNOWN ("" );
3852
3953 final String serializedName ;
4054 Exclude (String name ) {
@@ -45,6 +59,17 @@ public enum Exclude {
4559 public String toString () {
4660 return this .serializedName ;
4761 }
62+
63+ @ JsonCreator
64+ public static Exclude forValue (String value ) {
65+ for (Exclude t : values ()) {
66+ if (t .serializedName .equalsIgnoreCase (value )) {
67+ return t ;
68+ }
69+ }
70+ return UNKNOWN ;
71+ }
72+
4873 }
4974
5075 /**
@@ -54,7 +79,8 @@ public String toString() {
5479 */
5580 public enum Hashtype {
5681 @ JsonProperty ("sha512_256" ) SHA512_256 ("sha512_256" ),
57- @ JsonProperty ("sha256" ) SHA256 ("sha256" );
82+ @ JsonProperty ("sha256" ) SHA256 ("sha256" ),
83+ @ JsonProperty ("" ) UNKNOWN ("" );
5884
5985 final String serializedName ;
6086 Hashtype (String name ) {
@@ -65,6 +91,17 @@ public enum Hashtype {
6591 public String toString () {
6692 return this .serializedName ;
6793 }
94+
95+ @ JsonCreator
96+ public static Hashtype forValue (String value ) {
97+ for (Hashtype t : values ()) {
98+ if (t .serializedName .equalsIgnoreCase (value )) {
99+ return t ;
100+ }
101+ }
102+ return UNKNOWN ;
103+ }
104+
68105 }
69106
70107 /**
@@ -84,7 +121,8 @@ public enum OnCompletion {
84121 @ JsonProperty ("closeout" ) CLOSEOUT ("closeout" ),
85122 @ JsonProperty ("clear" ) CLEAR ("clear" ),
86123 @ JsonProperty ("update" ) UPDATE ("update" ),
87- @ JsonProperty ("delete" ) DELETE ("delete" );
124+ @ JsonProperty ("delete" ) DELETE ("delete" ),
125+ @ JsonProperty ("" ) UNKNOWN ("" );
88126
89127 final String serializedName ;
90128 OnCompletion (String name ) {
@@ -95,6 +133,17 @@ public enum OnCompletion {
95133 public String toString () {
96134 return this .serializedName ;
97135 }
136+
137+ @ JsonCreator
138+ public static OnCompletion forValue (String value ) {
139+ for (OnCompletion t : values ()) {
140+ if (t .serializedName .equalsIgnoreCase (value )) {
141+ return t ;
142+ }
143+ }
144+ return UNKNOWN ;
145+ }
146+
98147 }
99148
100149 /**
@@ -107,7 +156,8 @@ public String toString() {
107156 public enum SigType {
108157 @ JsonProperty ("sig" ) SIG ("sig" ),
109158 @ JsonProperty ("msig" ) MSIG ("msig" ),
110- @ JsonProperty ("lsig" ) LSIG ("lsig" );
159+ @ JsonProperty ("lsig" ) LSIG ("lsig" ),
160+ @ JsonProperty ("" ) UNKNOWN ("" );
111161
112162 final String serializedName ;
113163 SigType (String name ) {
@@ -118,6 +168,17 @@ public enum SigType {
118168 public String toString () {
119169 return this .serializedName ;
120170 }
171+
172+ @ JsonCreator
173+ public static SigType forValue (String value ) {
174+ for (SigType t : values ()) {
175+ if (t .serializedName .equalsIgnoreCase (value )) {
176+ return t ;
177+ }
178+ }
179+ return UNKNOWN ;
180+ }
181+
121182 }
122183
123184 /**
@@ -137,7 +198,8 @@ public enum TxType {
137198 @ JsonProperty ("acfg" ) ACFG ("acfg" ),
138199 @ JsonProperty ("axfer" ) AXFER ("axfer" ),
139200 @ JsonProperty ("afrz" ) AFRZ ("afrz" ),
140- @ JsonProperty ("appl" ) APPL ("appl" );
201+ @ JsonProperty ("appl" ) APPL ("appl" ),
202+ @ JsonProperty ("" ) UNKNOWN ("" );
141203
142204 final String serializedName ;
143205 TxType (String name ) {
@@ -148,6 +210,17 @@ public enum TxType {
148210 public String toString () {
149211 return this .serializedName ;
150212 }
213+
214+ @ JsonCreator
215+ public static TxType forValue (String value ) {
216+ for (TxType t : values ()) {
217+ if (t .serializedName .equalsIgnoreCase (value )) {
218+ return t ;
219+ }
220+ }
221+ return UNKNOWN ;
222+ }
223+
151224 }
152225
153226}
0 commit comments