5656import com .uber .cadence .api .v1 .WorkflowExecutionCloseStatus ;
5757import com .uber .cadence .api .v1 .WorkflowIdReusePolicy ;
5858
59- class EnumMapper {
59+ public final class EnumMapper {
6060
61- static TaskListKind taskListKind (com .uber .cadence .TaskListKind t ) {
61+ private EnumMapper () {}
62+
63+ public static TaskListKind taskListKind (com .uber .cadence .TaskListKind t ) {
6264 if (t == null ) {
6365 return TaskListKind .TASK_LIST_KIND_INVALID ;
6466 }
@@ -71,7 +73,7 @@ static TaskListKind taskListKind(com.uber.cadence.TaskListKind t) {
7173 throw new IllegalArgumentException ("unexpected enum value" );
7274 }
7375
74- static TaskListType taskListType (com .uber .cadence .TaskListType t ) {
76+ public static TaskListType taskListType (com .uber .cadence .TaskListType t ) {
7577 if (t == null ) {
7678 return TaskListType .TASK_LIST_TYPE_INVALID ;
7779 }
@@ -84,7 +86,7 @@ static TaskListType taskListType(com.uber.cadence.TaskListType t) {
8486 throw new IllegalArgumentException ("unexpected enum value" );
8587 }
8688
87- static EventFilterType eventFilterType (com .uber .cadence .HistoryEventFilterType t ) {
89+ public static EventFilterType eventFilterType (com .uber .cadence .HistoryEventFilterType t ) {
8890 if (t == null ) {
8991 return EventFilterType .EVENT_FILTER_TYPE_INVALID ;
9092 }
@@ -97,7 +99,7 @@ static EventFilterType eventFilterType(com.uber.cadence.HistoryEventFilterType t
9799 throw new IllegalArgumentException ("unexpected enum value" );
98100 }
99101
100- static QueryRejectCondition queryRejectCondition (com .uber .cadence .QueryRejectCondition t ) {
102+ public static QueryRejectCondition queryRejectCondition (com .uber .cadence .QueryRejectCondition t ) {
101103 if (t == null ) {
102104 return QueryRejectCondition .QUERY_REJECT_CONDITION_INVALID ;
103105 }
@@ -110,7 +112,8 @@ static QueryRejectCondition queryRejectCondition(com.uber.cadence.QueryRejectCon
110112 throw new IllegalArgumentException ("unexpected enum value" );
111113 }
112114
113- static QueryConsistencyLevel queryConsistencyLevel (com .uber .cadence .QueryConsistencyLevel t ) {
115+ public static QueryConsistencyLevel queryConsistencyLevel (
116+ com .uber .cadence .QueryConsistencyLevel t ) {
114117 if (t == null ) {
115118 return QueryConsistencyLevel .QUERY_CONSISTENCY_LEVEL_INVALID ;
116119 }
@@ -123,7 +126,8 @@ static QueryConsistencyLevel queryConsistencyLevel(com.uber.cadence.QueryConsist
123126 throw new IllegalArgumentException ("unexpected enum value" );
124127 }
125128
126- static ContinueAsNewInitiator continueAsNewInitiator (com .uber .cadence .ContinueAsNewInitiator t ) {
129+ public static ContinueAsNewInitiator continueAsNewInitiator (
130+ com .uber .cadence .ContinueAsNewInitiator t ) {
127131 if (t == null ) {
128132 return ContinueAsNewInitiator .CONTINUE_AS_NEW_INITIATOR_INVALID ;
129133 }
@@ -138,7 +142,8 @@ static ContinueAsNewInitiator continueAsNewInitiator(com.uber.cadence.ContinueAs
138142 throw new IllegalArgumentException ("unexpected enum value" );
139143 }
140144
141- static WorkflowIdReusePolicy workflowIdReusePolicy (com .uber .cadence .WorkflowIdReusePolicy t ) {
145+ public static WorkflowIdReusePolicy workflowIdReusePolicy (
146+ com .uber .cadence .WorkflowIdReusePolicy t ) {
142147 if (t == null ) {
143148 return WorkflowIdReusePolicy .WORKFLOW_ID_REUSE_POLICY_INVALID ;
144149 }
@@ -155,7 +160,7 @@ static WorkflowIdReusePolicy workflowIdReusePolicy(com.uber.cadence.WorkflowIdRe
155160 throw new IllegalArgumentException ("unexpected enum value" );
156161 }
157162
158- static QueryResultType queryResultType (com .uber .cadence .QueryResultType t ) {
163+ public static QueryResultType queryResultType (com .uber .cadence .QueryResultType t ) {
159164 if (t == null ) {
160165 return QUERY_RESULT_TYPE_INVALID ;
161166 }
@@ -168,7 +173,7 @@ static QueryResultType queryResultType(com.uber.cadence.QueryResultType t) {
168173 throw new IllegalArgumentException ("unexpected enum value" );
169174 }
170175
171- static ArchivalStatus archivalStatus (com .uber .cadence .ArchivalStatus t ) {
176+ public static ArchivalStatus archivalStatus (com .uber .cadence .ArchivalStatus t ) {
172177 if (t == null ) {
173178 return ArchivalStatus .ARCHIVAL_STATUS_INVALID ;
174179 }
@@ -181,7 +186,7 @@ static ArchivalStatus archivalStatus(com.uber.cadence.ArchivalStatus t) {
181186 throw new IllegalArgumentException ("unexpected enum value" );
182187 }
183188
184- static ParentClosePolicy parentClosePolicy (com .uber .cadence .ParentClosePolicy t ) {
189+ public static ParentClosePolicy parentClosePolicy (com .uber .cadence .ParentClosePolicy t ) {
185190 if (t == null ) {
186191 return ParentClosePolicy .PARENT_CLOSE_POLICY_INVALID ;
187192 }
@@ -196,7 +201,7 @@ static ParentClosePolicy parentClosePolicy(com.uber.cadence.ParentClosePolicy t)
196201 throw new IllegalArgumentException ("unexpected enum value" );
197202 }
198203
199- static DecisionTaskFailedCause decisionTaskFailedCause (
204+ public static DecisionTaskFailedCause decisionTaskFailedCause (
200205 com .uber .cadence .DecisionTaskFailedCause t ) {
201206 if (t == null ) {
202207 return DECISION_TASK_FAILED_CAUSE_INVALID ;
@@ -252,7 +257,7 @@ static DecisionTaskFailedCause decisionTaskFailedCause(
252257 throw new IllegalArgumentException ("unexpected enum value" );
253258 }
254259
255- static WorkflowExecutionCloseStatus workflowExecutionCloseStatus (
260+ public static WorkflowExecutionCloseStatus workflowExecutionCloseStatus (
256261 com .uber .cadence .WorkflowExecutionCloseStatus t ) {
257262 if (t == null ) {
258263 return WorkflowExecutionCloseStatus .WORKFLOW_EXECUTION_CLOSE_STATUS_INVALID ;
@@ -274,7 +279,7 @@ static WorkflowExecutionCloseStatus workflowExecutionCloseStatus(
274279 throw new IllegalArgumentException ("unexpected enum value" );
275280 }
276281
277- static QueryResultType queryTaskCompletedType (com .uber .cadence .QueryTaskCompletedType t ) {
282+ public static QueryResultType queryTaskCompletedType (com .uber .cadence .QueryTaskCompletedType t ) {
278283 if (t == null ) {
279284 return QUERY_RESULT_TYPE_INVALID ;
280285 }
0 commit comments