@@ -121,7 +121,8 @@ public static CountWorkflowExecutionsRequest countWorkflowExecutionsRequest(
121
121
return null ;
122
122
}
123
123
CountWorkflowExecutionsRequest .Builder request =
124
- CountWorkflowExecutionsRequest .newBuilder ().setDomain (t .getDomain ());
124
+ CountWorkflowExecutionsRequest .newBuilder ()
125
+ .setDomain (t .getDomain () != null ? t .getDomain () : "" );
125
126
if (t .getQuery () != null ) {
126
127
request .setQuery (t .getQuery ());
127
128
}
@@ -134,7 +135,7 @@ public static DescribeTaskListRequest describeTaskListRequest(
134
135
return null ;
135
136
}
136
137
return DescribeTaskListRequest .newBuilder ()
137
- .setDomain (t .getDomain ())
138
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
138
139
.setTaskList (taskList (t .getTaskList ()))
139
140
.setTaskListType (taskListType (t .getTaskListType ()))
140
141
.setIncludeTaskListStatus (t .isIncludeTaskListStatus ())
@@ -148,7 +149,7 @@ public static ListArchivedWorkflowExecutionsRequest listArchivedWorkflowExecutio
148
149
}
149
150
ListArchivedWorkflowExecutionsRequest .Builder request =
150
151
ListArchivedWorkflowExecutionsRequest .newBuilder ()
151
- .setDomain (t .getDomain ())
152
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
152
153
.setPageSize (t .getPageSize ());
153
154
if (t .getNextPageToken () != null ) {
154
155
request .setNextPageToken (arrayToByteString (t .getNextPageToken ()));
@@ -166,7 +167,7 @@ public static RequestCancelWorkflowExecutionRequest requestCancelWorkflowExecuti
166
167
}
167
168
RequestCancelWorkflowExecutionRequest .Builder builder =
168
169
RequestCancelWorkflowExecutionRequest .newBuilder ()
169
- .setDomain (t .getDomain ())
170
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
170
171
.setWorkflowExecution (workflowExecution (t .getWorkflowExecution ()))
171
172
.setRequestId (t .getRequestId ());
172
173
if (t .getIdentity () != null ) {
@@ -187,7 +188,7 @@ public static ResetStickyTaskListRequest resetStickyTaskListRequest(
187
188
return null ;
188
189
}
189
190
return ResetStickyTaskListRequest .newBuilder ()
190
- .setDomain (t .getDomain ())
191
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
191
192
.setWorkflowExecution (workflowExecution (t .getExecution ()))
192
193
.build ();
193
194
}
@@ -198,7 +199,7 @@ public static ResetWorkflowExecutionRequest resetWorkflowExecutionRequest(
198
199
return null ;
199
200
}
200
201
return ResetWorkflowExecutionRequest .newBuilder ()
201
- .setDomain (t .getDomain ())
202
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
202
203
.setWorkflowExecution (workflowExecution (t .getWorkflowExecution ()))
203
204
.setReason (t .getReason () != null ? t .getReason () : "" )
204
205
.setDecisionFinishEventId (t .getDecisionFinishEventId ())
@@ -214,7 +215,7 @@ public static RespondActivityTaskCanceledByIDRequest respondActivityTaskCanceled
214
215
}
215
216
RespondActivityTaskCanceledByIDRequest .Builder builder =
216
217
RespondActivityTaskCanceledByIDRequest .newBuilder ()
217
- .setDomain (t .getDomain ())
218
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
218
219
.setWorkflowExecution (TypeMapper .workflowRunPair (t .getWorkflowID (), t .getRunID ()))
219
220
.setActivityId (t .getActivityID ())
220
221
.setDetails (payload (t .getDetails ()));
@@ -247,7 +248,7 @@ public static RespondActivityTaskCompletedByIDRequest respondActivityTaskComplet
247
248
}
248
249
RespondActivityTaskCompletedByIDRequest .Builder builder =
249
250
RespondActivityTaskCompletedByIDRequest .newBuilder ()
250
- .setDomain (t .getDomain ())
251
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
251
252
.setWorkflowExecution (TypeMapper .workflowRunPair (t .getWorkflowID (), t .getRunID ()))
252
253
.setActivityId (t .getActivityID ())
253
254
.setResult (payload (t .getResult ()));
@@ -280,7 +281,7 @@ public static RespondActivityTaskFailedByIDRequest respondActivityTaskFailedById
280
281
}
281
282
RespondActivityTaskFailedByIDRequest .Builder builder =
282
283
RespondActivityTaskFailedByIDRequest .newBuilder ()
283
- .setDomain (t .getDomain ())
284
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
284
285
.setWorkflowExecution (TypeMapper .workflowRunPair (t .getWorkflowID (), t .getRunID ()))
285
286
.setActivityId (t .getActivityID ())
286
287
.setFailure (failure (t .getReason (), t .getDetails ()));
@@ -384,7 +385,7 @@ public static ScanWorkflowExecutionsRequest scanWorkflowExecutionsRequest(
384
385
}
385
386
ScanWorkflowExecutionsRequest .Builder request =
386
387
ScanWorkflowExecutionsRequest .newBuilder ()
387
- .setDomain (t .getDomain ())
388
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
388
389
.setPageSize (t .getPageSize ());
389
390
if (t .getNextPageToken () != null ) {
390
391
request .setNextPageToken (arrayToByteString (t .getNextPageToken ()));
@@ -401,7 +402,7 @@ public static DescribeWorkflowExecutionRequest describeWorkflowExecutionRequest(
401
402
return null ;
402
403
}
403
404
return DescribeWorkflowExecutionRequest .newBuilder ()
404
- .setDomain (t .getDomain ())
405
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
405
406
.setWorkflowExecution (workflowExecution (t .getExecution ()))
406
407
.setQueryConsistencyLevel (queryConsistencyLevel (t .getQueryConsistencyLevel ()))
407
408
.build ();
@@ -414,7 +415,7 @@ public static GetWorkflowExecutionHistoryRequest getWorkflowExecutionHistoryRequ
414
415
}
415
416
GetWorkflowExecutionHistoryRequest .Builder builder =
416
417
GetWorkflowExecutionHistoryRequest .newBuilder ()
417
- .setDomain (t .getDomain ())
418
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
418
419
.setWorkflowExecution (workflowExecution (t .getExecution ()))
419
420
.setPageSize (t .getMaximumPageSize ())
420
421
.setWaitForNewEvent (t .isWaitForNewEvent ())
@@ -434,7 +435,7 @@ public static SignalWithStartWorkflowExecutionRequest signalWithStartWorkflowExe
434
435
}
435
436
StartWorkflowExecutionRequest .Builder builder =
436
437
StartWorkflowExecutionRequest .newBuilder ()
437
- .setDomain (t .getDomain ())
438
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
438
439
.setWorkflowId (t .getWorkflowId ())
439
440
.setWorkflowType (workflowType (t .getWorkflowType ()))
440
441
.setTaskList (taskList (t .getTaskList ()))
@@ -497,7 +498,7 @@ public static SignalWorkflowExecutionRequest signalWorkflowExecutionRequest(
497
498
}
498
499
SignalWorkflowExecutionRequest .Builder builder =
499
500
SignalWorkflowExecutionRequest .newBuilder ()
500
- .setDomain (t .getDomain ())
501
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
501
502
.setWorkflowExecution (workflowExecution (t .getWorkflowExecution ()))
502
503
.setSignalName (t .getSignalName ())
503
504
.setSignalInput (payload (t .getInput ()))
@@ -518,7 +519,7 @@ public static StartWorkflowExecutionRequest startWorkflowExecutionRequest(
518
519
}
519
520
StartWorkflowExecutionRequest .Builder request =
520
521
StartWorkflowExecutionRequest .newBuilder ()
521
- .setDomain (t .getDomain ())
522
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
522
523
.setWorkflowId (t .getWorkflowId ())
523
524
.setWorkflowType (workflowType (t .getWorkflowType ()))
524
525
.setTaskList (taskList (t .getTaskList ()))
@@ -566,7 +567,7 @@ public static TerminateWorkflowExecutionRequest terminateWorkflowExecutionReques
566
567
}
567
568
TerminateWorkflowExecutionRequest .Builder builder =
568
569
TerminateWorkflowExecutionRequest .newBuilder ()
569
- .setDomain (t .getDomain ())
570
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
570
571
.setWorkflowExecution (workflowExecution (t .getWorkflowExecution ()))
571
572
.setReason (t .getReason () != null ? t .getReason () : "" )
572
573
.setDetails (payload (t .getDetails ()));
@@ -622,7 +623,7 @@ public static ListTaskListPartitionsRequest listTaskListPartitionsRequest(
622
623
return null ;
623
624
}
624
625
return ListTaskListPartitionsRequest .newBuilder ()
625
- .setDomain (t .getDomain ())
626
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
626
627
.setTaskList (taskList (t .getTaskList ()))
627
628
.build ();
628
629
}
@@ -634,7 +635,7 @@ public static ListWorkflowExecutionsRequest listWorkflowExecutionsRequest(
634
635
}
635
636
ListWorkflowExecutionsRequest .Builder request =
636
637
ListWorkflowExecutionsRequest .newBuilder ()
637
- .setDomain (t .getDomain ())
638
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
638
639
.setPageSize (t .getPageSize ());
639
640
if (t .getNextPageToken () != null ) {
640
641
request .setNextPageToken (arrayToByteString (t .getNextPageToken ()));
@@ -652,7 +653,7 @@ public static PollForActivityTaskRequest pollForActivityTaskRequest(
652
653
}
653
654
PollForActivityTaskRequest .Builder builder =
654
655
PollForActivityTaskRequest .newBuilder ()
655
- .setDomain (t .getDomain ())
656
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
656
657
.setTaskList (taskList (t .getTaskList ()))
657
658
.setTaskListMetadata (taskListMetadata (t .getTaskListMetadata ()));
658
659
if (t .getIdentity () != null ) {
@@ -668,7 +669,7 @@ public static PollForDecisionTaskRequest pollForDecisionTaskRequest(
668
669
}
669
670
PollForDecisionTaskRequest .Builder builder =
670
671
PollForDecisionTaskRequest .newBuilder ()
671
- .setDomain (t .getDomain ())
672
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
672
673
.setTaskList (taskList (t .getTaskList ()));
673
674
if (t .getBinaryChecksum () != null ) {
674
675
builder .setBinaryChecksum (t .getBinaryChecksum ());
@@ -684,7 +685,7 @@ public static QueryWorkflowRequest queryWorkflowRequest(com.uber.cadence.QueryWo
684
685
return null ;
685
686
}
686
687
return QueryWorkflowRequest .newBuilder ()
687
- .setDomain (t .getDomain ())
688
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
688
689
.setWorkflowExecution (workflowExecution (t .getExecution ()))
689
690
.setQuery (workflowQuery (t .getQuery ()))
690
691
.setQueryRejectCondition (queryRejectCondition (t .getQueryRejectCondition ()))
@@ -699,7 +700,7 @@ public static RecordActivityTaskHeartbeatByIDRequest recordActivityTaskHeartbeat
699
700
}
700
701
RecordActivityTaskHeartbeatByIDRequest .Builder builder =
701
702
RecordActivityTaskHeartbeatByIDRequest .newBuilder ()
702
- .setDomain (t .getDomain ())
703
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
703
704
.setWorkflowExecution (TypeMapper .workflowRunPair (t .getWorkflowID (), t .getRunID ()))
704
705
.setActivityId (t .getActivityID ())
705
706
.setDetails (payload (t .getDetails ()));
@@ -756,7 +757,7 @@ public static RestartWorkflowExecutionRequest restartWorkflowExecutionRequest(
756
757
return null ;
757
758
}
758
759
return RestartWorkflowExecutionRequest .newBuilder ()
759
- .setDomain (t .getDomain ())
760
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
760
761
.setWorkflowExecution (workflowExecution (t .getWorkflowExecution ()))
761
762
.setReason (t .getReason () != null ? t .getReason () : "" )
762
763
.setIdentity (t .getIdentity () != null ? t .getIdentity () : "" )
@@ -852,7 +853,7 @@ public static ListClosedWorkflowExecutionsRequest listClosedWorkflowExecutionsRe
852
853
}
853
854
ListClosedWorkflowExecutionsRequest .Builder request =
854
855
ListClosedWorkflowExecutionsRequest .newBuilder ()
855
- .setDomain (t .getDomain ())
856
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
856
857
.setPageSize (t .getMaximumPageSize ());
857
858
if (t .getExecutionFilter () != null ) {
858
859
request .setExecutionFilter (workflowExecutionFilter (t .getExecutionFilter ()));
@@ -879,7 +880,7 @@ public static ListOpenWorkflowExecutionsRequest listOpenWorkflowExecutionsReques
879
880
}
880
881
ListOpenWorkflowExecutionsRequest .Builder request =
881
882
ListOpenWorkflowExecutionsRequest .newBuilder ()
882
- .setDomain (t .getDomain ())
883
+ .setDomain (t .getDomain () != null ? t . getDomain () : "" )
883
884
.setPageSize (t .getMaximumPageSize ());
884
885
if (t .getExecutionFilter () != null ) {
885
886
request .setExecutionFilter (workflowExecutionFilter (t .getExecutionFilter ()));
@@ -903,7 +904,7 @@ public static RespondActivityTaskFailedByIDRequest respondActivityTaskFailedByID
903
904
}
904
905
RespondActivityTaskFailedByIDRequest .Builder request =
905
906
RespondActivityTaskFailedByIDRequest .newBuilder ()
906
- .setDomain (failRequest .getDomain ())
907
+ .setDomain (failRequest .getDomain () != null ? failRequest . getDomain () : "" )
907
908
.setWorkflowExecution (
908
909
TypeMapper .workflowRunPair (failRequest .getWorkflowID (), failRequest .getRunID ()))
909
910
.setActivityId (failRequest .getActivityID ())
@@ -919,7 +920,7 @@ public static RespondActivityTaskCompletedByIDRequest respondActivityTaskComplet
919
920
}
920
921
RespondActivityTaskCompletedByIDRequest .Builder request =
921
922
RespondActivityTaskCompletedByIDRequest .newBuilder ()
922
- .setDomain (completeRequest .getDomain ())
923
+ .setDomain (completeRequest .getDomain () != null ? completeRequest . getDomain () : "" )
923
924
.setWorkflowExecution (
924
925
TypeMapper .workflowRunPair (
925
926
completeRequest .getWorkflowID (), completeRequest .getRunID ()))
@@ -937,7 +938,7 @@ public static RecordActivityTaskHeartbeatByIDRequest recordActivityTaskHeartbeat
937
938
}
938
939
RecordActivityTaskHeartbeatByIDRequest .Builder request =
939
940
RecordActivityTaskHeartbeatByIDRequest .newBuilder ()
940
- .setDomain (heartbeatRequest .getDomain ())
941
+ .setDomain (heartbeatRequest .getDomain () != null ? heartbeatRequest . getDomain () : "" )
941
942
.setWorkflowExecution (
942
943
TypeMapper .workflowRunPair (
943
944
heartbeatRequest .getWorkflowID (), heartbeatRequest .getRunID ()))
@@ -955,7 +956,7 @@ public static RespondActivityTaskCanceledByIDRequest respondActivityTaskCanceled
955
956
}
956
957
RespondActivityTaskCanceledByIDRequest .Builder request =
957
958
RespondActivityTaskCanceledByIDRequest .newBuilder ()
958
- .setDomain (canceledRequest .getDomain ())
959
+ .setDomain (canceledRequest .getDomain () != null ? canceledRequest . getDomain () : "" )
959
960
.setWorkflowExecution (
960
961
TypeMapper .workflowRunPair (
961
962
canceledRequest .getWorkflowID (), canceledRequest .getRunID ()))
@@ -972,7 +973,8 @@ public static GetTaskListsByDomainRequest getTaskListsByDomainRequest(
972
973
return null ;
973
974
}
974
975
GetTaskListsByDomainRequest .Builder request =
975
- GetTaskListsByDomainRequest .newBuilder ().setDomain (domainRequest .getDomainName ());
976
+ GetTaskListsByDomainRequest .newBuilder ()
977
+ .setDomain (domainRequest .getDomainName () != null ? domainRequest .getDomainName () : "" );
976
978
return request .build ();
977
979
}
978
980
@@ -981,6 +983,8 @@ public static RefreshWorkflowTasksRequest refreshWorkflowTasksRequest(
981
983
if (request == null ) {
982
984
return null ;
983
985
}
984
- return RefreshWorkflowTasksRequest .newBuilder ().setDomain (request .getDomain ()).build ();
986
+ return RefreshWorkflowTasksRequest .newBuilder ()
987
+ .setDomain (request .getDomain () != null ? request .getDomain () : "" )
988
+ .build ();
985
989
}
986
990
}
0 commit comments