From b8dc99ec102c3d97e5764c27e470e1e63605a893 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 30 May 2025 14:09:10 -0700 Subject: [PATCH 1/3] remove raw history (#1004) What changed? Remove raw history support in client Why? History is stored as Thrift encoded binary. Sending raw history in Thrift will no longer be supported in V4 How did you test it? Unit Test --- .../internal/common/InternalUtils.java | 97 ---------------- .../shadowing/ReplayWorkflowActivityImpl.java | 13 +-- .../testservice/TestWorkflowStoreImpl.java | 8 +- .../WorkflowServiceTChannel.java | 13 +-- .../internal/common/InternalUtilsTest.java | 106 ------------------ .../shadowing/ReplayWorkflowActivityTest.java | 20 ++-- 6 files changed, 20 insertions(+), 237 deletions(-) diff --git a/src/main/java/com/uber/cadence/internal/common/InternalUtils.java b/src/main/java/com/uber/cadence/internal/common/InternalUtils.java index 520d8efbb..e5b4b330b 100644 --- a/src/main/java/com/uber/cadence/internal/common/InternalUtils.java +++ b/src/main/java/com/uber/cadence/internal/common/InternalUtils.java @@ -18,11 +18,6 @@ package com.uber.cadence.internal.common; import com.google.common.base.Defaults; -import com.google.common.collect.Lists; -import com.uber.cadence.DataBlob; -import com.uber.cadence.History; -import com.uber.cadence.HistoryEvent; -import com.uber.cadence.HistoryEventFilterType; import com.uber.cadence.Memo; import com.uber.cadence.SearchAttributes; import com.uber.cadence.TaskList; @@ -33,15 +28,10 @@ import com.uber.cadence.workflow.WorkflowMethod; import java.lang.reflect.Method; import java.nio.ByteBuffer; -import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.thrift.TDeserializer; -import org.apache.thrift.TException; -import org.apache.thrift.TSerializer; /** Utility functions shared by the implementation code. */ public final class InternalUtils { @@ -164,93 +154,6 @@ public static SearchAttributes convertMapToSearchAttributes( return new SearchAttributes().setIndexedFields(mapOfByteBuffer); } - // This method serializes history to blob data - public static DataBlob SerializeFromHistoryToBlobData(History history) { - - // TODO: move to global dependency after https://issues.apache.org/jira/browse/THRIFT-2218 - TSerializer serializer = new TSerializer(); - DataBlob blob = new DataBlob(); - try { - blob.setData(serializer.serialize(history)); - } catch (org.apache.thrift.TException err) { - throw new RuntimeException("Serialize history to blob data failed", err); - } - - return blob; - } - - // This method deserialize the DataBlob data to the History data - public static History DeserializeFromBlobDataToHistory( - List blobData, HistoryEventFilterType historyEventFilterType) throws TException { - - // TODO: move to global dependency after https://issues.apache.org/jira/browse/THRIFT-2218 - TDeserializer deSerializer = new TDeserializer(); - List events = Lists.newArrayList(); - for (DataBlob data : blobData) { - History history = new History(); - try { - byte[] dataByte = data.getData(); - // TODO: verify the beginning index - dataByte = Arrays.copyOfRange(dataByte, 0, dataByte.length); - deSerializer.deserialize(history, dataByte); - - if (history == null || history.getEvents() == null || history.getEvents().size() == 0) { - return null; - } - } catch (org.apache.thrift.TException err) { - throw new TException("Deserialize blob data to history failed with unknown error"); - } - - events.addAll(history.getEvents()); - } - - if (events.size() > 0 && historyEventFilterType == HistoryEventFilterType.CLOSE_EVENT) { - events = events.subList(events.size() - 1, events.size()); - } - - return new History().setEvents(events); - } - - // This method serializes history event to blob data - public static List SerializeFromHistoryEventToBlobData(List events) { - - // TODO: move to global dependency after https://issues.apache.org/jira/browse/THRIFT-2218 - TSerializer serializer = new TSerializer(); - List blobs = Lists.newArrayListWithCapacity(events.size()); - for (HistoryEvent event : events) { - DataBlob blob = new DataBlob(); - try { - blob.setData(serializer.serialize(event)); - } catch (org.apache.thrift.TException err) { - throw new RuntimeException("Serialize history event to blob data failed", err); - } - blobs.add(blob); - } - return blobs; - } - - // This method serializes blob data to history event - public static List DeserializeFromBlobDataToHistoryEvents(List blobData) - throws TException { - - // TODO: move to global dependency after https://issues.apache.org/jira/browse/THRIFT-2218 - TDeserializer deSerializer = new TDeserializer(); - List events = Lists.newArrayList(); - for (DataBlob data : blobData) { - try { - HistoryEvent event = new HistoryEvent(); - byte[] dataByte = data.getData(); - // TODO: verify the beginning index - dataByte = Arrays.copyOfRange(dataByte, 0, dataByte.length); - deSerializer.deserialize(event, dataByte); - events.add(event); - } catch (org.apache.thrift.TException err) { - throw new TException("Deserialize blob data to history event failed with unknown error"); - } - } - return events; - } - /** Prohibit instantiation */ private InternalUtils() {} } diff --git a/src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityImpl.java b/src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityImpl.java index d2432889f..eae82edb0 100644 --- a/src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityImpl.java +++ b/src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityImpl.java @@ -19,12 +19,9 @@ import com.google.common.collect.Lists; import com.uber.cadence.GetWorkflowExecutionHistoryResponse; -import com.uber.cadence.History; import com.uber.cadence.HistoryEvent; -import com.uber.cadence.HistoryEventFilterType; import com.uber.cadence.activity.Activity; import com.uber.cadence.common.WorkflowExecutionHistory; -import com.uber.cadence.internal.common.InternalUtils; import com.uber.cadence.internal.common.RpcRetryer; import com.uber.cadence.internal.common.WorkflowExecutionUtils; import com.uber.cadence.internal.metrics.MetricsType; @@ -185,14 +182,10 @@ protected WorkflowExecutionHistory getFullHistory(String domain, WorkflowExecuti nextPageToken, this.serviceClient, domain, execution.toThrift())); pageToken = resp.getNextPageToken(); - // handle raw history + // TODO support raw history feature once server removes default Thrift encoding if (resp.getRawHistory() != null && resp.getRawHistory().size() > 0) { - History history = - InternalUtils.DeserializeFromBlobDataToHistory( - resp.getRawHistory(), HistoryEventFilterType.ALL_EVENT); - if (history != null && history.getEvents() != null) { - histories.addAll(history.getEvents()); - } + throw new UnsupportedOperationException( + "Raw history is not supported. Please turn off frontend.sendRawWorkflowHistory feature flag in frontend service to recover"); } else { histories.addAll(resp.getHistory().getEvents()); } diff --git a/src/main/java/com/uber/cadence/internal/testservice/TestWorkflowStoreImpl.java b/src/main/java/com/uber/cadence/internal/testservice/TestWorkflowStoreImpl.java index 5759f4562..06f18eab2 100644 --- a/src/main/java/com/uber/cadence/internal/testservice/TestWorkflowStoreImpl.java +++ b/src/main/java/com/uber/cadence/internal/testservice/TestWorkflowStoreImpl.java @@ -18,7 +18,6 @@ package com.uber.cadence.internal.testservice; import com.uber.cadence.BadRequestError; -import com.uber.cadence.DataBlob; import com.uber.cadence.EntityNotExistsError; import com.uber.cadence.EventType; import com.uber.cadence.GetWorkflowExecutionHistoryRequest; @@ -34,7 +33,6 @@ import com.uber.cadence.StickyExecutionAttributes; import com.uber.cadence.WorkflowExecution; import com.uber.cadence.WorkflowExecutionInfo; -import com.uber.cadence.internal.common.InternalUtils; import com.uber.cadence.internal.common.WorkflowExecutionUtils; import com.uber.cadence.internal.testservice.RequestContext.Timer; import java.time.Duration; @@ -348,12 +346,10 @@ public GetWorkflowExecutionHistoryResponse getWorkflowExecutionHistory( if (!getRequest.isWaitForNewEvent() && getRequest.getHistoryEventFilterType() != HistoryEventFilterType.CLOSE_EVENT) { List events = history.getEventsLocked(); - List blobs = InternalUtils.SerializeFromHistoryEventToBlobData(events); // Copy the list as it is mutable. Individual events assumed immutable. ArrayList eventsCopy = new ArrayList<>(events); return new GetWorkflowExecutionHistoryResponse() - .setHistory(new History().setEvents(eventsCopy)) - .setRawHistory(blobs); + .setHistory(new History().setEvents(eventsCopy)); } expectedNextEventId = history.getNextEventIdLocked(); } finally { @@ -361,11 +357,9 @@ public GetWorkflowExecutionHistoryResponse getWorkflowExecutionHistory( } List events = history.waitForNewEvents(expectedNextEventId, getRequest.getHistoryEventFilterType()); - List blobs = InternalUtils.SerializeFromHistoryEventToBlobData(events); GetWorkflowExecutionHistoryResponse result = new GetWorkflowExecutionHistoryResponse(); if (events != null) { result.setHistory(new History().setEvents(events)); - result.setRawHistory(blobs); } return result; } diff --git a/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java b/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java index 2878e6fac..7c45bb8ca 100644 --- a/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java +++ b/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java @@ -28,7 +28,6 @@ import com.uber.cadence.WorkflowService.GetWorkflowExecutionHistory_result; import com.uber.cadence.internal.Version; import com.uber.cadence.internal.common.CheckedExceptionWrapper; -import com.uber.cadence.internal.common.InternalUtils; import com.uber.cadence.internal.metrics.MetricsTag; import com.uber.cadence.internal.metrics.MetricsType; import com.uber.cadence.internal.metrics.ServiceMethod; @@ -766,10 +765,8 @@ private GetWorkflowExecutionHistoryResponse getWorkflowExecutionHistory( if (response.getResponseCode() == ResponseCode.OK) { GetWorkflowExecutionHistoryResponse res = result.getSuccess(); if (res.getRawHistory() != null) { - History history = - InternalUtils.DeserializeFromBlobDataToHistory( - res.getRawHistory(), getRequest.getHistoryEventFilterType()); - res.setHistory(history); + throw new TException( + "Raw history is not supported. Please turn off frontend.sendRawWorkflowHistory feature flag in frontend service to recover"); } return res; } @@ -2593,10 +2590,8 @@ private void getWorkflowExecutionHistory( if (r.getResponseCode() == ResponseCode.OK) { GetWorkflowExecutionHistoryResponse res = result.getSuccess(); if (res.getRawHistory() != null) { - History history = - InternalUtils.DeserializeFromBlobDataToHistory( - res.getRawHistory(), getRequest.getHistoryEventFilterType()); - res.setHistory(history); + throw new TException( + "Raw history is not supported. Please turn off frontend.sendRawWorkflowHistory feature flag in frontend service to recover"); } resultHandler.onComplete(res); return; diff --git a/src/test/java/com/uber/cadence/internal/common/InternalUtilsTest.java b/src/test/java/com/uber/cadence/internal/common/InternalUtilsTest.java index 23ecb652c..eb6250adf 100644 --- a/src/test/java/com/uber/cadence/internal/common/InternalUtilsTest.java +++ b/src/test/java/com/uber/cadence/internal/common/InternalUtilsTest.java @@ -17,23 +17,14 @@ package com.uber.cadence.internal.common; -import static com.uber.cadence.EventType.WorkflowExecutionStarted; import static junit.framework.TestCase.assertEquals; -import static org.junit.Assert.assertNotNull; -import com.google.common.collect.Lists; -import com.googlecode.junittoolbox.MultithreadingTester; -import com.googlecode.junittoolbox.RunnableAssert; import com.uber.cadence.*; import com.uber.cadence.converter.DataConverterException; import com.uber.cadence.workflow.WorkflowUtils; import java.io.FileOutputStream; -import java.time.LocalDateTime; -import java.time.ZoneOffset; import java.util.HashMap; -import java.util.List; import java.util.Map; -import junit.framework.TestCase; import org.junit.Test; public class InternalUtilsTest { @@ -56,101 +47,4 @@ public void testConvertMapToSearchAttributesException() throws Throwable { attr.put("InvalidValue", new FileOutputStream("dummy")); InternalUtils.convertMapToSearchAttributes(attr); } - - @Test - public void testSerialization_History() { - - RunnableAssert r = - new RunnableAssert("history_serialization") { - @Override - public void run() { - HistoryEvent event = - new HistoryEvent() - .setEventId(1) - .setVersion(1) - .setEventType(WorkflowExecutionStarted) - .setTimestamp(LocalDateTime.now().toEpochSecond(ZoneOffset.UTC)) - .setWorkflowExecutionStartedEventAttributes( - new WorkflowExecutionStartedEventAttributes() - .setAttempt(1) - .setFirstExecutionRunId("test")); - - List historyEvents = Lists.newArrayList(event); - History history = new History().setEvents(historyEvents); - DataBlob blob = InternalUtils.SerializeFromHistoryToBlobData(history); - assertNotNull(blob); - - try { - History result = - InternalUtils.DeserializeFromBlobDataToHistory( - Lists.newArrayList(blob), HistoryEventFilterType.ALL_EVENT); - assertNotNull(result); - assertEquals(1, result.events.size()); - assertEquals(event.getEventId(), result.events.get(0).getEventId()); - assertEquals(event.getVersion(), result.events.get(0).getVersion()); - assertEquals(event.getEventType(), result.events.get(0).getEventType()); - assertEquals(event.getTimestamp(), result.events.get(0).getTimestamp()); - assertEquals( - event.getWorkflowExecutionStartedEventAttributes(), - result.events.get(0).getWorkflowExecutionStartedEventAttributes()); - } catch (Exception e) { - TestCase.fail("Received unexpected error during deserialization"); - } - } - }; - - try { - new MultithreadingTester().add(r).numThreads(50).numRoundsPerThread(10).run(); - } catch (Exception e) { - TestCase.fail("Received unexpected error during concurrent deserialization"); - } - } - - @Test - public void testSerialization_HistoryEvent() { - - RunnableAssert r = - new RunnableAssert("history_event_serialization") { - @Override - public void run() { - HistoryEvent event = - new HistoryEvent() - .setEventId(1) - .setVersion(1) - .setEventType(WorkflowExecutionStarted) - .setTimestamp(LocalDateTime.now().toEpochSecond(ZoneOffset.UTC)) - .setWorkflowExecutionStartedEventAttributes( - new WorkflowExecutionStartedEventAttributes() - .setAttempt(1) - .setFirstExecutionRunId("test")); - - List historyEvents = Lists.newArrayList(event); - List blobList = - InternalUtils.SerializeFromHistoryEventToBlobData(historyEvents); - assertEquals(1, blobList.size()); - - try { - List result = - InternalUtils.DeserializeFromBlobDataToHistoryEvents(blobList); - assertNotNull(result); - assertEquals(1, result.size()); - assertEquals(event.getEventId(), result.get(0).getEventId()); - assertEquals(event.getVersion(), result.get(0).getVersion()); - assertEquals(event.getEventType(), result.get(0).getEventType()); - assertEquals(event.getTimestamp(), result.get(0).getTimestamp()); - assertEquals( - event.getWorkflowExecutionStartedEventAttributes(), - result.get(0).getWorkflowExecutionStartedEventAttributes()); - } catch (Exception e) { - TestCase.fail("Received unexpected error during deserialization"); - } - } - }; - - try { - new MultithreadingTester().add(r).numThreads(50).numRoundsPerThread(10).run(); - } catch (Exception e) { - TestCase.fail("Received unexpected error during concurrent deserialization"); - } - } } diff --git a/src/test/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityTest.java b/src/test/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityTest.java index 4e1df82c3..ed17dc8fd 100644 --- a/src/test/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityTest.java +++ b/src/test/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityTest.java @@ -20,9 +20,7 @@ import static com.uber.cadence.EventType.DecisionTaskStarted; import static com.uber.cadence.EventType.TimerStarted; import static com.uber.cadence.EventType.WorkflowExecutionStarted; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -42,7 +40,6 @@ import com.uber.cadence.WorkflowType; import com.uber.cadence.common.WorkflowExecutionHistory; import com.uber.cadence.converter.JsonDataConverter; -import com.uber.cadence.internal.common.InternalUtils; import com.uber.cadence.internal.testing.WorkflowTestingTest; import com.uber.cadence.serviceclient.IWorkflowService; import com.uber.cadence.testing.TestActivityEnvironment; @@ -144,15 +141,22 @@ public void testGetFullHistory_DecodedHistory_ExpectedSuccessResponse() throws E } @Test - public void testGetFullHistory_RawHistory_ExpectedSuccessResponse() throws Exception { + public void testGetFullHistory_RawHistory_NotSupportedError() throws Exception { History history = new History().setEvents(Lists.newArrayList(historyEvents.get(0))); - DataBlob blob = InternalUtils.SerializeFromHistoryToBlobData(history); + DataBlob blob = new DataBlob().setData(new byte[] {1, 2, 3}); GetWorkflowExecutionHistoryResponse response = new GetWorkflowExecutionHistoryResponse().setRawHistory(Lists.newArrayList(blob)); when(mockServiceClient.GetWorkflowExecutionHistory(any())).thenReturn(response); - WorkflowExecutionHistory result = activity.getFullHistory(domain, execution); - assertEquals(1, result.getEvents().size()); + try { + WorkflowExecutionHistory result = activity.getFullHistory(domain, execution); + } catch (Exception e) { + assertEquals( + "Raw history is not supported. Please turn off frontend.sendRawWorkflowHistory feature flag in frontend service to recover", + e.getMessage()); + return; + } + fail("Expected exception not thrown"); } @Test(expected = Error.class) From aafd9ddfa11d6e1ba2965d90a990e61ec5103138 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Fri, 13 Jun 2025 10:30:16 -0700 Subject: [PATCH 2/3] added WorkflowServiceGrpc and IWorkflowServiceV4 (#999) What changed? added client entities that maps 1:1 with thrift (generated from a generator) added BaseError, which is a catchall similar to TException. added mappers to transform Proto to client entities. (mostly copied from thrift mappers) added IWorkflowServiceV4 which is exactly same as IWorkflowService except for it's using the client entities. added WorkflowServiceGrpc that implements the V4 interface Plan new V4 interface with new entities < This PR replace all pointers to V4 in one go (Should be import change only) Why? Thrift deprecation work How did you test it? Unit Test on mappers from ClientObjects to ProtoObjects --- .../cadence/entities/AccessDeniedError.java | 46 + .../entities/ActivityLocalDispatchInfo.java | 37 + ...ityTaskCancelRequestedEventAttributes.java | 34 + .../ActivityTaskCanceledEventAttributes.java | 37 + .../ActivityTaskCompletedEventAttributes.java | 36 + .../ActivityTaskFailedEventAttributes.java | 37 + .../ActivityTaskScheduledEventAttributes.java | 44 + .../ActivityTaskStartedEventAttributes.java | 38 + .../ActivityTaskTimedOutEventAttributes.java | 38 + .../uber/cadence/entities/ActivityType.java | 33 + .gen/com/uber/cadence/entities/Any.java | 34 + .../ApplyParentClosePolicyAttributes.java | 36 + .../ApplyParentClosePolicyRequest.java | 34 + .../ApplyParentClosePolicyResult.java | 34 + .../ApplyParentClosePolicyStatus.java | 34 + .../uber/cadence/entities/ArchivalStatus.java | 28 + .../entities/AsyncWorkflowConfiguration.java | 36 + .../uber/cadence/entities/BadBinaries.java | 33 + .../uber/cadence/entities/BadBinaryInfo.java | 35 + .../cadence/entities/BadRequestError.java | 46 + .gen/com/uber/cadence/entities/BaseError.java | 41 + ...lExternalWorkflowExecutionFailedCause.java | 28 + .../CancelTimerDecisionAttributes.java | 33 + .../CancelTimerFailedEventAttributes.java | 36 + ...elWorkflowExecutionDecisionAttributes.java | 33 + .../CancellationAlreadyRequestedError.java | 46 + ...kflowExecutionCanceledEventAttributes.java | 38 + ...flowExecutionCompletedEventAttributes.java | 38 + .../ChildWorkflowExecutionFailedCause.java | 27 + ...orkflowExecutionFailedEventAttributes.java | 39 + ...rkflowExecutionStartedEventAttributes.java | 37 + ...lowExecutionTerminatedEventAttributes.java | 37 + ...kflowExecutionTimedOutEventAttributes.java | 38 + .../ClientVersionNotSupportedError.java | 51 + .../cadence/entities/CloseShardRequest.java | 33 + .../uber/cadence/entities/ClusterInfo.java | 33 + .../ClusterReplicationConfiguration.java | 33 + ...teWorkflowExecutionDecisionAttributes.java | 33 + .../entities/ContinueAsNewInitiator.java | 29 + ...ewWorkflowExecutionDecisionAttributes.java | 48 + .../CountWorkflowExecutionsRequest.java | 34 + .../CountWorkflowExecutionsResponse.java | 33 + ...plyParentClosePolicyRequestAttributes.java | 33 + ...lyParentClosePolicyResponseAttributes.java | 33 + ...usterCancelExecutionRequestAttributes.java | 38 + ...sterCancelExecutionResponseAttributes.java | 31 + ...lowExecutionCompleteRequestAttributes.java | 37 + ...owExecutionCompleteResponseAttributes.java | 31 + ...usterSignalExecutionRequestAttributes.java | 41 + ...sterSignalExecutionResponseAttributes.java | 31 + ...rStartChildExecutionRequestAttributes.java | 38 + ...StartChildExecutionResponseAttributes.java | 33 + .../entities/CrossClusterTaskFailedCause.java | 32 + .../entities/CrossClusterTaskInfo.java | 39 + .../entities/CrossClusterTaskRequest.java | 39 + .../entities/CrossClusterTaskResponse.java | 42 + .../entities/CrossClusterTaskType.java | 31 + .../entities/CurrentBranchChangedError.java | 49 + .gen/com/uber/cadence/entities/DataBlob.java | 34 + .gen/com/uber/cadence/entities/Decision.java | 51 + .../DecisionTaskCompletedEventAttributes.java | 37 + .../entities/DecisionTaskFailedCause.java | 49 + .../DecisionTaskFailedEventAttributes.java | 43 + .../DecisionTaskScheduledEventAttributes.java | 35 + .../DecisionTaskStartedEventAttributes.java | 35 + .../entities/DecisionTaskTimedOutCause.java | 28 + .../DecisionTaskTimedOutEventAttributes.java | 41 + .../uber/cadence/entities/DecisionType.java | 39 + .../entities/DeprecateDomainRequest.java | 34 + .../entities/DescribeDomainRequest.java | 34 + .../entities/DescribeDomainResponse.java | 38 + .../entities/DescribeHistoryHostRequest.java | 35 + .../entities/DescribeHistoryHostResponse.java | 37 + .../entities/DescribeQueueRequest.java | 35 + .../entities/DescribeQueueResponse.java | 33 + .../DescribeShardDistributionRequest.java | 34 + .../DescribeShardDistributionResponse.java | 34 + .../entities/DescribeTaskListRequest.java | 36 + .../entities/DescribeTaskListResponse.java | 34 + .../DescribeWorkflowExecutionRequest.java | 34 + .../DescribeWorkflowExecutionResponse.java | 37 + .../entities/DomainAlreadyExistsError.java | 46 + .../cadence/entities/DomainCacheInfo.java | 34 + .../cadence/entities/DomainConfiguration.java | 41 + .../com/uber/cadence/entities/DomainInfo.java | 38 + .../entities/DomainNotActiveError.java | 51 + .../DomainReplicationConfiguration.java | 34 + .../uber/cadence/entities/DomainStatus.java | 29 + .../uber/cadence/entities/EncodingType.java | 28 + .../entities/EntityNotExistsError.java | 50 + .gen/com/uber/cadence/entities/EventType.java | 68 + ...ecutionCancelRequestedEventAttributes.java | 35 + ...kflowExecutionSignaledEventAttributes.java | 36 + ...ilWorkflowExecutionDecisionAttributes.java | 34 + .../uber/cadence/entities/FailoverInfo.java | 37 + .../uber/cadence/entities/FeatureFlags.java | 33 + .../entities/FeatureNotEnabledError.java | 49 + .../entities/GetCrossClusterTasksRequest.java | 34 + .../GetCrossClusterTasksResponse.java | 34 + .../entities/GetSearchAttributesResponse.java | 33 + .../cadence/entities/GetTaskFailedCause.java | 30 + .../entities/GetTaskListsByDomainRequest.java | 33 + .../GetTaskListsByDomainResponse.java | 34 + .../GetWorkflowExecutionHistoryRequest.java | 39 + .../GetWorkflowExecutionHistoryResponse.java | 36 + .gen/com/uber/cadence/entities/Header.java | 33 + .gen/com/uber/cadence/entities/History.java | 33 + .../uber/cadence/entities/HistoryBranch.java | 35 + .../cadence/entities/HistoryBranchRange.java | 35 + .../uber/cadence/entities/HistoryEvent.java | 95 ++ .../entities/HistoryEventFilterType.java | 28 + .../cadence/entities/IndexedValueType.java | 32 + .../InternalDataInconsistencyError.java | 46 + .../entities/InternalServiceError.java | 46 + .../entities/IsolationGroupConfiguration.java | 33 + .../entities/IsolationGroupPartition.java | 34 + .../cadence/entities/IsolationGroupState.java | 29 + .../cadence/entities/LimitExceededError.java | 46 + ...ListArchivedWorkflowExecutionsRequest.java | 36 + ...istArchivedWorkflowExecutionsResponse.java | 34 + .../ListClosedWorkflowExecutionsRequest.java | 39 + .../ListClosedWorkflowExecutionsResponse.java | 34 + .../cadence/entities/ListDomainsRequest.java | 34 + .../cadence/entities/ListDomainsResponse.java | 34 + .../ListOpenWorkflowExecutionsRequest.java | 38 + .../ListOpenWorkflowExecutionsResponse.java | 34 + .../ListTaskListPartitionsRequest.java | 34 + .../ListTaskListPartitionsResponse.java | 34 + .../ListWorkflowExecutionsRequest.java | 36 + .../ListWorkflowExecutionsResponse.java | 34 + .../MarkerRecordedEventAttributes.java | 36 + .gen/com/uber/cadence/entities/Memo.java | 33 + .../cadence/entities/ParentClosePolicy.java | 29 + .../cadence/entities/PendingActivityInfo.java | 46 + .../entities/PendingActivityState.java | 29 + .../entities/PendingChildExecutionInfo.java | 38 + .../cadence/entities/PendingDecisionInfo.java | 37 + .../entities/PendingDecisionState.java | 28 + .../entities/PollForActivityTaskRequest.java | 36 + .../entities/PollForActivityTaskResponse.java | 48 + .../entities/PollForDecisionTaskRequest.java | 36 + .../entities/PollForDecisionTaskResponse.java | 48 + .../com/uber/cadence/entities/PollerInfo.java | 35 + .../entities/QueryConsistencyLevel.java | 28 + .../cadence/entities/QueryFailedError.java | 46 + .../entities/QueryRejectCondition.java | 28 + .../uber/cadence/entities/QueryRejected.java | 33 + .../cadence/entities/QueryResultType.java | 28 + .../entities/QueryTaskCompletedType.java | 28 + .../entities/QueryWorkflowRequest.java | 37 + .../entities/QueryWorkflowResponse.java | 34 + .../entities/ReapplyEventsRequest.java | 35 + ...ecordActivityTaskHeartbeatByIDRequest.java | 38 + .../RecordActivityTaskHeartbeatRequest.java | 35 + .../RecordActivityTaskHeartbeatResponse.java | 33 + .../RecordMarkerDecisionAttributes.java | 35 + .../entities/RefreshWorkflowTasksRequest.java | 34 + .../entities/RegisterDomainRequest.java | 46 + .../entities/RemoteSyncMatchedError.java | 46 + .../cadence/entities/RemoveTaskRequest.java | 37 + ...tCancelActivityTaskDecisionAttributes.java | 33 + ...ncelActivityTaskFailedEventAttributes.java | 35 + ...alWorkflowExecutionDecisionAttributes.java | 37 + ...orkflowExecutionFailedEventAttributes.java | 38 + ...flowExecutionInitiatedEventAttributes.java | 37 + ...RequestCancelWorkflowExecutionRequest.java | 38 + .../uber/cadence/entities/ResetPointInfo.java | 38 + .../uber/cadence/entities/ResetPoints.java | 33 + .../cadence/entities/ResetQueueRequest.java | 35 + .../entities/ResetStickyTaskListRequest.java | 34 + .../entities/ResetStickyTaskListResponse.java | 31 + .../ResetWorkflowExecutionRequest.java | 38 + .../ResetWorkflowExecutionResponse.java | 33 + ...espondActivityTaskCanceledByIDRequest.java | 38 + .../RespondActivityTaskCanceledRequest.java | 35 + ...spondActivityTaskCompletedByIDRequest.java | 38 + .../RespondActivityTaskCompletedRequest.java | 35 + .../RespondActivityTaskFailedByIDRequest.java | 39 + .../RespondActivityTaskFailedRequest.java | 36 + ...pondCrossClusterTasksCompletedRequest.java | 36 + ...ondCrossClusterTasksCompletedResponse.java | 33 + .../RespondDecisionTaskCompletedRequest.java | 41 + .../RespondDecisionTaskCompletedResponse.java | 34 + .../RespondDecisionTaskFailedRequest.java | 37 + .../RespondQueryTaskCompletedRequest.java | 37 + .../RestartWorkflowExecutionRequest.java | 36 + .../RestartWorkflowExecutionResponse.java | 33 + .../uber/cadence/entities/RetryPolicy.java | 38 + .../cadence/entities/RetryTaskV2Error.java | 55 + ...cheduleActivityTaskDecisionAttributes.java | 44 + .../cadence/entities/SearchAttributes.java | 33 + .../cadence/entities/ServiceBusyError.java | 49 + ...alWorkflowExecutionDecisionAttributes.java | 38 + ...lExternalWorkflowExecutionFailedCause.java | 28 + ...orkflowExecutionFailedEventAttributes.java | 38 + ...flowExecutionInitiatedEventAttributes.java | 39 + ...ithStartWorkflowExecutionAsyncRequest.java | 33 + ...thStartWorkflowExecutionAsyncResponse.java | 31 + ...gnalWithStartWorkflowExecutionRequest.java | 52 + .../SignalWorkflowExecutionRequest.java | 39 + ...ldWorkflowExecutionDecisionAttributes.java | 47 + ...orkflowExecutionFailedEventAttributes.java | 39 + ...flowExecutionInitiatedEventAttributes.java | 50 + .../cadence/entities/StartTimeFilter.java | 34 + .../StartTimerDecisionAttributes.java | 34 + .../StartWorkflowExecutionAsyncRequest.java | 33 + .../StartWorkflowExecutionAsyncResponse.java | 31 + .../StartWorkflowExecutionRequest.java | 49 + .../StartWorkflowExecutionResponse.java | 33 + .../entities/StickyExecutionAttributes.java | 34 + .../StickyWorkerUnavailableError.java | 46 + .../entities/SupportedClientVersions.java | 34 + .../uber/cadence/entities/TaskIDBlock.java | 34 + .gen/com/uber/cadence/entities/TaskList.java | 34 + .../uber/cadence/entities/TaskListKind.java | 28 + .../cadence/entities/TaskListMetadata.java | 33 + .../entities/TaskListPartitionMetadata.java | 34 + .../uber/cadence/entities/TaskListStatus.java | 37 + .../uber/cadence/entities/TaskListType.java | 28 + .../TerminateWorkflowExecutionRequest.java | 38 + .../uber/cadence/entities/TimeoutType.java | 30 + .../TimerCanceledEventAttributes.java | 36 + .../entities/TimerFiredEventAttributes.java | 34 + .../entities/TimerStartedEventAttributes.java | 35 + .../entities/TransientDecisionInfo.java | 34 + .../cadence/entities/UpdateDomainInfo.java | 35 + .../cadence/entities/UpdateDomainRequest.java | 39 + .../entities/UpdateDomainResponse.java | 37 + ...lowSearchAttributesDecisionAttributes.java | 33 + ...rkflowSearchAttributesEventAttributes.java | 34 + .../cadence/entities/VersionHistories.java | 34 + .../uber/cadence/entities/VersionHistory.java | 34 + .../cadence/entities/VersionHistoryItem.java | 34 + .../cadence/entities/WorkerVersionInfo.java | 34 + .../cadence/entities/WorkflowExecution.java | 34 + ...orkflowExecutionAlreadyCompletedError.java | 46 + .../WorkflowExecutionAlreadyStartedError.java | 50 + ...ecutionCancelRequestedEventAttributes.java | 37 + ...kflowExecutionCanceledEventAttributes.java | 34 + .../WorkflowExecutionCloseStatus.java | 32 + ...flowExecutionCompletedEventAttributes.java | 34 + .../WorkflowExecutionConfiguration.java | 35 + ...xecutionContinuedAsNewEventAttributes.java | 47 + ...orkflowExecutionFailedEventAttributes.java | 35 + .../entities/WorkflowExecutionFilter.java | 34 + .../entities/WorkflowExecutionInfo.java | 50 + ...kflowExecutionSignaledEventAttributes.java | 36 + ...rkflowExecutionStartedEventAttributes.java | 60 + ...lowExecutionTerminatedEventAttributes.java | 35 + ...kflowExecutionTimedOutEventAttributes.java | 33 + .../entities/WorkflowIdReusePolicy.java | 30 + .../uber/cadence/entities/WorkflowQuery.java | 34 + .../cadence/entities/WorkflowQueryResult.java | 35 + .../uber/cadence/entities/WorkflowType.java | 33 + .../cadence/entities/WorkflowTypeFilter.java | 33 + build.gradle | 7 +- scripts/v4_entity_generator/generator.go | 304 ++++ scripts/v4_entity_generator/go.mod | 5 + scripts/v4_entity_generator/go.sum | 10 + scripts/v4_entity_generator/main.go | 9 + .../template/java_base_exception.tmpl | 19 + .../template/java_enum.tmpl | 7 + .../template/java_exception.tmpl | 29 + .../template/java_struct.tmpl | 13 + .../cadence/entities/AccessDeniedError.java | 38 + .../entities/ActivityLocalDispatchInfo.java | 29 + ...ityTaskCancelRequestedEventAttributes.java | 26 + .../ActivityTaskCanceledEventAttributes.java | 29 + .../ActivityTaskCompletedEventAttributes.java | 28 + .../ActivityTaskFailedEventAttributes.java | 29 + .../ActivityTaskScheduledEventAttributes.java | 36 + .../ActivityTaskStartedEventAttributes.java | 30 + .../ActivityTaskTimedOutEventAttributes.java | 30 + .../uber/cadence/entities/ActivityType.java | 25 + .../java/com/uber/cadence/entities/Any.java | 26 + .../ApplyParentClosePolicyAttributes.java | 28 + .../ApplyParentClosePolicyRequest.java | 26 + .../ApplyParentClosePolicyResult.java | 26 + .../ApplyParentClosePolicyStatus.java | 26 + .../uber/cadence/entities/ArchivalStatus.java | 20 + .../entities/AsyncWorkflowConfiguration.java | 28 + .../uber/cadence/entities/BadBinaries.java | 25 + .../uber/cadence/entities/BadBinaryInfo.java | 27 + .../cadence/entities/BadRequestError.java | 38 + .../com/uber/cadence/entities/BaseError.java | 33 + ...lExternalWorkflowExecutionFailedCause.java | 20 + .../CancelTimerDecisionAttributes.java | 25 + .../CancelTimerFailedEventAttributes.java | 28 + ...elWorkflowExecutionDecisionAttributes.java | 25 + .../CancellationAlreadyRequestedError.java | 38 + ...kflowExecutionCanceledEventAttributes.java | 30 + ...flowExecutionCompletedEventAttributes.java | 30 + .../ChildWorkflowExecutionFailedCause.java | 19 + ...orkflowExecutionFailedEventAttributes.java | 31 + ...rkflowExecutionStartedEventAttributes.java | 29 + ...lowExecutionTerminatedEventAttributes.java | 29 + ...kflowExecutionTimedOutEventAttributes.java | 30 + .../ClientVersionNotSupportedError.java | 43 + .../cadence/entities/CloseShardRequest.java | 25 + .../uber/cadence/entities/ClusterInfo.java | 25 + .../ClusterReplicationConfiguration.java | 25 + ...teWorkflowExecutionDecisionAttributes.java | 25 + .../entities/ContinueAsNewInitiator.java | 21 + ...ewWorkflowExecutionDecisionAttributes.java | 40 + .../CountWorkflowExecutionsRequest.java | 26 + .../CountWorkflowExecutionsResponse.java | 25 + ...plyParentClosePolicyRequestAttributes.java | 25 + ...lyParentClosePolicyResponseAttributes.java | 25 + ...usterCancelExecutionRequestAttributes.java | 30 + ...sterCancelExecutionResponseAttributes.java | 23 + ...lowExecutionCompleteRequestAttributes.java | 29 + ...owExecutionCompleteResponseAttributes.java | 23 + ...usterSignalExecutionRequestAttributes.java | 33 + ...sterSignalExecutionResponseAttributes.java | 23 + ...rStartChildExecutionRequestAttributes.java | 30 + ...StartChildExecutionResponseAttributes.java | 25 + .../entities/CrossClusterTaskFailedCause.java | 24 + .../entities/CrossClusterTaskInfo.java | 31 + .../entities/CrossClusterTaskRequest.java | 31 + .../entities/CrossClusterTaskResponse.java | 34 + .../entities/CrossClusterTaskType.java | 23 + .../entities/CurrentBranchChangedError.java | 41 + .../com/uber/cadence/entities/DataBlob.java | 26 + .../com/uber/cadence/entities/Decision.java | 43 + .../DecisionTaskCompletedEventAttributes.java | 29 + .../entities/DecisionTaskFailedCause.java | 41 + .../DecisionTaskFailedEventAttributes.java | 35 + .../DecisionTaskScheduledEventAttributes.java | 27 + .../DecisionTaskStartedEventAttributes.java | 27 + .../entities/DecisionTaskTimedOutCause.java | 20 + .../DecisionTaskTimedOutEventAttributes.java | 33 + .../uber/cadence/entities/DecisionType.java | 31 + .../entities/DeprecateDomainRequest.java | 26 + .../entities/DescribeDomainRequest.java | 26 + .../entities/DescribeDomainResponse.java | 30 + .../entities/DescribeHistoryHostRequest.java | 27 + .../entities/DescribeHistoryHostResponse.java | 29 + .../entities/DescribeQueueRequest.java | 27 + .../entities/DescribeQueueResponse.java | 25 + .../DescribeShardDistributionRequest.java | 26 + .../DescribeShardDistributionResponse.java | 26 + .../entities/DescribeTaskListRequest.java | 28 + .../entities/DescribeTaskListResponse.java | 26 + .../DescribeWorkflowExecutionRequest.java | 26 + .../DescribeWorkflowExecutionResponse.java | 29 + .../entities/DomainAlreadyExistsError.java | 38 + .../cadence/entities/DomainCacheInfo.java | 26 + .../cadence/entities/DomainConfiguration.java | 33 + .../com/uber/cadence/entities/DomainInfo.java | 30 + .../entities/DomainNotActiveError.java | 43 + .../DomainReplicationConfiguration.java | 26 + .../uber/cadence/entities/DomainStatus.java | 21 + .../uber/cadence/entities/EncodingType.java | 20 + .../entities/EntityNotExistsError.java | 42 + .../com/uber/cadence/entities/EventType.java | 60 + ...ecutionCancelRequestedEventAttributes.java | 27 + ...kflowExecutionSignaledEventAttributes.java | 28 + ...ilWorkflowExecutionDecisionAttributes.java | 26 + .../uber/cadence/entities/FailoverInfo.java | 29 + .../uber/cadence/entities/FeatureFlags.java | 25 + .../entities/FeatureNotEnabledError.java | 41 + .../entities/GetCrossClusterTasksRequest.java | 26 + .../GetCrossClusterTasksResponse.java | 26 + .../entities/GetSearchAttributesResponse.java | 25 + .../cadence/entities/GetTaskFailedCause.java | 22 + .../entities/GetTaskListsByDomainRequest.java | 25 + .../GetTaskListsByDomainResponse.java | 26 + .../GetWorkflowExecutionHistoryRequest.java | 31 + .../GetWorkflowExecutionHistoryResponse.java | 28 + .../com/uber/cadence/entities/Header.java | 25 + .../com/uber/cadence/entities/History.java | 25 + .../uber/cadence/entities/HistoryBranch.java | 27 + .../cadence/entities/HistoryBranchRange.java | 27 + .../uber/cadence/entities/HistoryEvent.java | 87 + .../entities/HistoryEventFilterType.java | 20 + .../cadence/entities/IndexedValueType.java | 24 + .../InternalDataInconsistencyError.java | 38 + .../entities/InternalServiceError.java | 38 + .../entities/IsolationGroupConfiguration.java | 25 + .../entities/IsolationGroupPartition.java | 26 + .../cadence/entities/IsolationGroupState.java | 21 + .../cadence/entities/LimitExceededError.java | 38 + ...ListArchivedWorkflowExecutionsRequest.java | 28 + ...istArchivedWorkflowExecutionsResponse.java | 26 + .../ListClosedWorkflowExecutionsRequest.java | 31 + .../ListClosedWorkflowExecutionsResponse.java | 26 + .../cadence/entities/ListDomainsRequest.java | 26 + .../cadence/entities/ListDomainsResponse.java | 26 + .../ListOpenWorkflowExecutionsRequest.java | 30 + .../ListOpenWorkflowExecutionsResponse.java | 26 + .../ListTaskListPartitionsRequest.java | 26 + .../ListTaskListPartitionsResponse.java | 26 + .../ListWorkflowExecutionsRequest.java | 28 + .../ListWorkflowExecutionsResponse.java | 26 + .../MarkerRecordedEventAttributes.java | 28 + .../java/com/uber/cadence/entities/Memo.java | 25 + .../cadence/entities/ParentClosePolicy.java | 21 + .../cadence/entities/PendingActivityInfo.java | 38 + .../entities/PendingActivityState.java | 21 + .../entities/PendingChildExecutionInfo.java | 30 + .../cadence/entities/PendingDecisionInfo.java | 29 + .../entities/PendingDecisionState.java | 20 + .../entities/PollForActivityTaskRequest.java | 28 + .../entities/PollForActivityTaskResponse.java | 40 + .../entities/PollForDecisionTaskRequest.java | 28 + .../entities/PollForDecisionTaskResponse.java | 40 + .../com/uber/cadence/entities/PollerInfo.java | 27 + .../entities/QueryConsistencyLevel.java | 20 + .../cadence/entities/QueryFailedError.java | 38 + .../entities/QueryRejectCondition.java | 20 + .../uber/cadence/entities/QueryRejected.java | 25 + .../cadence/entities/QueryResultType.java | 20 + .../entities/QueryTaskCompletedType.java | 20 + .../entities/QueryWorkflowRequest.java | 29 + .../entities/QueryWorkflowResponse.java | 26 + .../entities/ReapplyEventsRequest.java | 27 + ...ecordActivityTaskHeartbeatByIDRequest.java | 30 + .../RecordActivityTaskHeartbeatRequest.java | 27 + .../RecordActivityTaskHeartbeatResponse.java | 25 + .../RecordMarkerDecisionAttributes.java | 27 + .../entities/RefreshWorkflowTasksRequest.java | 26 + .../entities/RegisterDomainRequest.java | 38 + .../entities/RemoteSyncMatchedError.java | 38 + .../cadence/entities/RemoveTaskRequest.java | 29 + ...tCancelActivityTaskDecisionAttributes.java | 25 + ...ncelActivityTaskFailedEventAttributes.java | 27 + ...alWorkflowExecutionDecisionAttributes.java | 29 + ...orkflowExecutionFailedEventAttributes.java | 30 + ...flowExecutionInitiatedEventAttributes.java | 29 + ...RequestCancelWorkflowExecutionRequest.java | 30 + .../uber/cadence/entities/ResetPointInfo.java | 30 + .../uber/cadence/entities/ResetPoints.java | 25 + .../cadence/entities/ResetQueueRequest.java | 27 + .../entities/ResetStickyTaskListRequest.java | 26 + .../entities/ResetStickyTaskListResponse.java | 23 + .../ResetWorkflowExecutionRequest.java | 30 + .../ResetWorkflowExecutionResponse.java | 25 + ...espondActivityTaskCanceledByIDRequest.java | 30 + .../RespondActivityTaskCanceledRequest.java | 27 + ...spondActivityTaskCompletedByIDRequest.java | 30 + .../RespondActivityTaskCompletedRequest.java | 27 + .../RespondActivityTaskFailedByIDRequest.java | 31 + .../RespondActivityTaskFailedRequest.java | 28 + ...pondCrossClusterTasksCompletedRequest.java | 28 + ...ondCrossClusterTasksCompletedResponse.java | 25 + .../RespondDecisionTaskCompletedRequest.java | 33 + .../RespondDecisionTaskCompletedResponse.java | 26 + .../RespondDecisionTaskFailedRequest.java | 29 + .../RespondQueryTaskCompletedRequest.java | 29 + .../RestartWorkflowExecutionRequest.java | 28 + .../RestartWorkflowExecutionResponse.java | 25 + .../uber/cadence/entities/RetryPolicy.java | 30 + .../cadence/entities/RetryTaskV2Error.java | 47 + ...cheduleActivityTaskDecisionAttributes.java | 36 + .../cadence/entities/SearchAttributes.java | 25 + .../cadence/entities/ServiceBusyError.java | 41 + ...alWorkflowExecutionDecisionAttributes.java | 30 + ...lExternalWorkflowExecutionFailedCause.java | 20 + ...orkflowExecutionFailedEventAttributes.java | 30 + ...flowExecutionInitiatedEventAttributes.java | 31 + ...ithStartWorkflowExecutionAsyncRequest.java | 25 + ...thStartWorkflowExecutionAsyncResponse.java | 23 + ...gnalWithStartWorkflowExecutionRequest.java | 44 + .../SignalWorkflowExecutionRequest.java | 31 + ...ldWorkflowExecutionDecisionAttributes.java | 39 + ...orkflowExecutionFailedEventAttributes.java | 31 + ...flowExecutionInitiatedEventAttributes.java | 42 + .../cadence/entities/StartTimeFilter.java | 26 + .../StartTimerDecisionAttributes.java | 26 + .../StartWorkflowExecutionAsyncRequest.java | 25 + .../StartWorkflowExecutionAsyncResponse.java | 23 + .../StartWorkflowExecutionRequest.java | 41 + .../StartWorkflowExecutionResponse.java | 25 + .../entities/StickyExecutionAttributes.java | 26 + .../StickyWorkerUnavailableError.java | 38 + .../entities/SupportedClientVersions.java | 26 + .../uber/cadence/entities/TaskIDBlock.java | 26 + .../com/uber/cadence/entities/TaskList.java | 26 + .../uber/cadence/entities/TaskListKind.java | 20 + .../cadence/entities/TaskListMetadata.java | 25 + .../entities/TaskListPartitionMetadata.java | 26 + .../uber/cadence/entities/TaskListStatus.java | 29 + .../uber/cadence/entities/TaskListType.java | 20 + .../TerminateWorkflowExecutionRequest.java | 30 + .../uber/cadence/entities/TimeoutType.java | 22 + .../TimerCanceledEventAttributes.java | 28 + .../entities/TimerFiredEventAttributes.java | 26 + .../entities/TimerStartedEventAttributes.java | 27 + .../entities/TransientDecisionInfo.java | 26 + .../cadence/entities/UpdateDomainInfo.java | 27 + .../cadence/entities/UpdateDomainRequest.java | 31 + .../entities/UpdateDomainResponse.java | 29 + ...lowSearchAttributesDecisionAttributes.java | 25 + ...rkflowSearchAttributesEventAttributes.java | 26 + .../cadence/entities/VersionHistories.java | 26 + .../uber/cadence/entities/VersionHistory.java | 26 + .../cadence/entities/VersionHistoryItem.java | 26 + .../cadence/entities/WorkerVersionInfo.java | 26 + .../cadence/entities/WorkflowExecution.java | 26 + ...orkflowExecutionAlreadyCompletedError.java | 38 + .../WorkflowExecutionAlreadyStartedError.java | 42 + ...ecutionCancelRequestedEventAttributes.java | 29 + ...kflowExecutionCanceledEventAttributes.java | 26 + .../WorkflowExecutionCloseStatus.java | 24 + ...flowExecutionCompletedEventAttributes.java | 26 + .../WorkflowExecutionConfiguration.java | 27 + ...xecutionContinuedAsNewEventAttributes.java | 39 + ...orkflowExecutionFailedEventAttributes.java | 27 + .../entities/WorkflowExecutionFilter.java | 26 + .../entities/WorkflowExecutionInfo.java | 42 + ...kflowExecutionSignaledEventAttributes.java | 28 + ...rkflowExecutionStartedEventAttributes.java | 52 + ...lowExecutionTerminatedEventAttributes.java | 27 + ...kflowExecutionTimedOutEventAttributes.java | 25 + .../entities/WorkflowIdReusePolicy.java | 22 + .../uber/cadence/entities/WorkflowQuery.java | 26 + .../cadence/entities/WorkflowQueryResult.java | 27 + .../uber/cadence/entities/WorkflowType.java | 25 + .../cadence/entities/WorkflowTypeFilter.java | 25 + .../compatibility/proto/DecisionMapper.java | 2 +- .../proto/mappers/DecisionMapper.java | 274 ++++ .../proto/mappers/EnumMapper.java | 599 +++++++ .../proto/mappers/ErrorMapper.java | 109 ++ .../compatibility/proto/mappers/Helpers.java | 99 ++ .../proto/mappers/HistoryMapper.java | 1140 ++++++++++++++ .../proto/mappers/RequestMapper.java | 982 ++++++++++++ .../proto/mappers/ResponseMapper.java | 525 +++++++ .../proto/mappers/TypeMapper.java | 931 +++++++++++ .../serviceclient/AsyncMethodCallback.java | 33 + .../serviceclient/IWorkflowServiceV4.java | 811 ++++++++++ .../serviceclient/WorkflowServiceGrpc.java | 1393 +++++++++++++++++ .../internal/compatibility/ClientObjects.java | 1181 ++++++++++++++ .../compatibility/MapperTestUtil.java | 29 +- .../proto/mappers/DecisionMapperTest.java | 141 ++ .../proto/mappers/ErrorMapperTest.java | 138 ++ .../proto/mappers/RequestMapperTest.java | 275 ++++ .../proto/mappers/TypeMapperTest.java | 155 ++ 537 files changed, 25955 insertions(+), 5 deletions(-) create mode 100644 .gen/com/uber/cadence/entities/AccessDeniedError.java create mode 100644 .gen/com/uber/cadence/entities/ActivityLocalDispatchInfo.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ActivityType.java create mode 100644 .gen/com/uber/cadence/entities/Any.java create mode 100644 .gen/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java create mode 100644 .gen/com/uber/cadence/entities/ApplyParentClosePolicyResult.java create mode 100644 .gen/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java create mode 100644 .gen/com/uber/cadence/entities/ArchivalStatus.java create mode 100644 .gen/com/uber/cadence/entities/AsyncWorkflowConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/BadBinaries.java create mode 100644 .gen/com/uber/cadence/entities/BadBinaryInfo.java create mode 100644 .gen/com/uber/cadence/entities/BadRequestError.java create mode 100644 .gen/com/uber/cadence/entities/BaseError.java create mode 100644 .gen/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/CancelTimerDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CancellationAlreadyRequestedError.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ClientVersionNotSupportedError.java create mode 100644 .gen/com/uber/cadence/entities/CloseShardRequest.java create mode 100644 .gen/com/uber/cadence/entities/ClusterInfo.java create mode 100644 .gen/com/uber/cadence/entities/ClusterReplicationConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ContinueAsNewInitiator.java create mode 100644 .gen/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterTaskFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterTaskInfo.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterTaskRequest.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterTaskResponse.java create mode 100644 .gen/com/uber/cadence/entities/CrossClusterTaskType.java create mode 100644 .gen/com/uber/cadence/entities/CurrentBranchChangedError.java create mode 100644 .gen/com/uber/cadence/entities/DataBlob.java create mode 100644 .gen/com/uber/cadence/entities/Decision.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskTimedOutCause.java create mode 100644 .gen/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/DecisionType.java create mode 100644 .gen/com/uber/cadence/entities/DeprecateDomainRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeDomainRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeDomainResponse.java create mode 100644 .gen/com/uber/cadence/entities/DescribeHistoryHostRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeHistoryHostResponse.java create mode 100644 .gen/com/uber/cadence/entities/DescribeQueueRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeQueueResponse.java create mode 100644 .gen/com/uber/cadence/entities/DescribeShardDistributionRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeShardDistributionResponse.java create mode 100644 .gen/com/uber/cadence/entities/DescribeTaskListRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeTaskListResponse.java create mode 100644 .gen/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java create mode 100644 .gen/com/uber/cadence/entities/DomainAlreadyExistsError.java create mode 100644 .gen/com/uber/cadence/entities/DomainCacheInfo.java create mode 100644 .gen/com/uber/cadence/entities/DomainConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/DomainInfo.java create mode 100644 .gen/com/uber/cadence/entities/DomainNotActiveError.java create mode 100644 .gen/com/uber/cadence/entities/DomainReplicationConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/DomainStatus.java create mode 100644 .gen/com/uber/cadence/entities/EncodingType.java create mode 100644 .gen/com/uber/cadence/entities/EntityNotExistsError.java create mode 100644 .gen/com/uber/cadence/entities/EventType.java create mode 100644 .gen/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/FailoverInfo.java create mode 100644 .gen/com/uber/cadence/entities/FeatureFlags.java create mode 100644 .gen/com/uber/cadence/entities/FeatureNotEnabledError.java create mode 100644 .gen/com/uber/cadence/entities/GetCrossClusterTasksRequest.java create mode 100644 .gen/com/uber/cadence/entities/GetCrossClusterTasksResponse.java create mode 100644 .gen/com/uber/cadence/entities/GetSearchAttributesResponse.java create mode 100644 .gen/com/uber/cadence/entities/GetTaskFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/GetTaskListsByDomainRequest.java create mode 100644 .gen/com/uber/cadence/entities/GetTaskListsByDomainResponse.java create mode 100644 .gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java create mode 100644 .gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java create mode 100644 .gen/com/uber/cadence/entities/Header.java create mode 100644 .gen/com/uber/cadence/entities/History.java create mode 100644 .gen/com/uber/cadence/entities/HistoryBranch.java create mode 100644 .gen/com/uber/cadence/entities/HistoryBranchRange.java create mode 100644 .gen/com/uber/cadence/entities/HistoryEvent.java create mode 100644 .gen/com/uber/cadence/entities/HistoryEventFilterType.java create mode 100644 .gen/com/uber/cadence/entities/IndexedValueType.java create mode 100644 .gen/com/uber/cadence/entities/InternalDataInconsistencyError.java create mode 100644 .gen/com/uber/cadence/entities/InternalServiceError.java create mode 100644 .gen/com/uber/cadence/entities/IsolationGroupConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/IsolationGroupPartition.java create mode 100644 .gen/com/uber/cadence/entities/IsolationGroupState.java create mode 100644 .gen/com/uber/cadence/entities/LimitExceededError.java create mode 100644 .gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/ListDomainsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListDomainsResponse.java create mode 100644 .gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/ListTaskListPartitionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListTaskListPartitionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java create mode 100644 .gen/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java create mode 100644 .gen/com/uber/cadence/entities/MarkerRecordedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/Memo.java create mode 100644 .gen/com/uber/cadence/entities/ParentClosePolicy.java create mode 100644 .gen/com/uber/cadence/entities/PendingActivityInfo.java create mode 100644 .gen/com/uber/cadence/entities/PendingActivityState.java create mode 100644 .gen/com/uber/cadence/entities/PendingChildExecutionInfo.java create mode 100644 .gen/com/uber/cadence/entities/PendingDecisionInfo.java create mode 100644 .gen/com/uber/cadence/entities/PendingDecisionState.java create mode 100644 .gen/com/uber/cadence/entities/PollForActivityTaskRequest.java create mode 100644 .gen/com/uber/cadence/entities/PollForActivityTaskResponse.java create mode 100644 .gen/com/uber/cadence/entities/PollForDecisionTaskRequest.java create mode 100644 .gen/com/uber/cadence/entities/PollForDecisionTaskResponse.java create mode 100644 .gen/com/uber/cadence/entities/PollerInfo.java create mode 100644 .gen/com/uber/cadence/entities/QueryConsistencyLevel.java create mode 100644 .gen/com/uber/cadence/entities/QueryFailedError.java create mode 100644 .gen/com/uber/cadence/entities/QueryRejectCondition.java create mode 100644 .gen/com/uber/cadence/entities/QueryRejected.java create mode 100644 .gen/com/uber/cadence/entities/QueryResultType.java create mode 100644 .gen/com/uber/cadence/entities/QueryTaskCompletedType.java create mode 100644 .gen/com/uber/cadence/entities/QueryWorkflowRequest.java create mode 100644 .gen/com/uber/cadence/entities/QueryWorkflowResponse.java create mode 100644 .gen/com/uber/cadence/entities/ReapplyEventsRequest.java create mode 100644 .gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java create mode 100644 .gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java create mode 100644 .gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java create mode 100644 .gen/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java create mode 100644 .gen/com/uber/cadence/entities/RegisterDomainRequest.java create mode 100644 .gen/com/uber/cadence/entities/RemoteSyncMatchedError.java create mode 100644 .gen/com/uber/cadence/entities/RemoveTaskRequest.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/ResetPointInfo.java create mode 100644 .gen/com/uber/cadence/entities/ResetPoints.java create mode 100644 .gen/com/uber/cadence/entities/ResetQueueRequest.java create mode 100644 .gen/com/uber/cadence/entities/ResetStickyTaskListRequest.java create mode 100644 .gen/com/uber/cadence/entities/ResetStickyTaskListResponse.java create mode 100644 .gen/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java create mode 100644 .gen/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java create mode 100644 .gen/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java create mode 100644 .gen/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java create mode 100644 .gen/com/uber/cadence/entities/RetryPolicy.java create mode 100644 .gen/com/uber/cadence/entities/RetryTaskV2Error.java create mode 100644 .gen/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/SearchAttributes.java create mode 100644 .gen/com/uber/cadence/entities/ServiceBusyError.java create mode 100644 .gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java create mode 100644 .gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java create mode 100644 .gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java create mode 100644 .gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/StartTimeFilter.java create mode 100644 .gen/com/uber/cadence/entities/StartTimerDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java create mode 100644 .gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java create mode 100644 .gen/com/uber/cadence/entities/StartWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/StartWorkflowExecutionResponse.java create mode 100644 .gen/com/uber/cadence/entities/StickyExecutionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/StickyWorkerUnavailableError.java create mode 100644 .gen/com/uber/cadence/entities/SupportedClientVersions.java create mode 100644 .gen/com/uber/cadence/entities/TaskIDBlock.java create mode 100644 .gen/com/uber/cadence/entities/TaskList.java create mode 100644 .gen/com/uber/cadence/entities/TaskListKind.java create mode 100644 .gen/com/uber/cadence/entities/TaskListMetadata.java create mode 100644 .gen/com/uber/cadence/entities/TaskListPartitionMetadata.java create mode 100644 .gen/com/uber/cadence/entities/TaskListStatus.java create mode 100644 .gen/com/uber/cadence/entities/TaskListType.java create mode 100644 .gen/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java create mode 100644 .gen/com/uber/cadence/entities/TimeoutType.java create mode 100644 .gen/com/uber/cadence/entities/TimerCanceledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/TimerFiredEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/TimerStartedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/TransientDecisionInfo.java create mode 100644 .gen/com/uber/cadence/entities/UpdateDomainInfo.java create mode 100644 .gen/com/uber/cadence/entities/UpdateDomainRequest.java create mode 100644 .gen/com/uber/cadence/entities/UpdateDomainResponse.java create mode 100644 .gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java create mode 100644 .gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/VersionHistories.java create mode 100644 .gen/com/uber/cadence/entities/VersionHistory.java create mode 100644 .gen/com/uber/cadence/entities/VersionHistoryItem.java create mode 100644 .gen/com/uber/cadence/entities/WorkerVersionInfo.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecution.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionConfiguration.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionFilter.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionInfo.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowIdReusePolicy.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowQuery.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowQueryResult.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowType.java create mode 100644 .gen/com/uber/cadence/entities/WorkflowTypeFilter.java create mode 100644 scripts/v4_entity_generator/generator.go create mode 100644 scripts/v4_entity_generator/go.mod create mode 100644 scripts/v4_entity_generator/go.sum create mode 100644 scripts/v4_entity_generator/main.go create mode 100644 scripts/v4_entity_generator/template/java_base_exception.tmpl create mode 100644 scripts/v4_entity_generator/template/java_enum.tmpl create mode 100644 scripts/v4_entity_generator/template/java_exception.tmpl create mode 100644 scripts/v4_entity_generator/template/java_struct.tmpl create mode 100644 src/gen/java/com/uber/cadence/entities/AccessDeniedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityLocalDispatchInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ActivityType.java create mode 100644 src/gen/java/com/uber/cadence/entities/Any.java create mode 100644 src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyResult.java create mode 100644 src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java create mode 100644 src/gen/java/com/uber/cadence/entities/ArchivalStatus.java create mode 100644 src/gen/java/com/uber/cadence/entities/AsyncWorkflowConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/BadBinaries.java create mode 100644 src/gen/java/com/uber/cadence/entities/BadBinaryInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/BadRequestError.java create mode 100644 src/gen/java/com/uber/cadence/entities/BaseError.java create mode 100644 src/gen/java/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/CancelTimerDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CancellationAlreadyRequestedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ClientVersionNotSupportedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/CloseShardRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ClusterInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/ClusterReplicationConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ContinueAsNewInitiator.java create mode 100644 src/gen/java/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterTaskFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterTaskInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterTaskRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterTaskResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/CrossClusterTaskType.java create mode 100644 src/gen/java/com/uber/cadence/entities/CurrentBranchChangedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/DataBlob.java create mode 100644 src/gen/java/com/uber/cadence/entities/Decision.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/DecisionType.java create mode 100644 src/gen/java/com/uber/cadence/entities/DeprecateDomainRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeDomainRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeDomainResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeHistoryHostRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeHistoryHostResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeQueueRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeQueueResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeShardDistributionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeShardDistributionResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeTaskListRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeTaskListResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainAlreadyExistsError.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainCacheInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainNotActiveError.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainReplicationConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/DomainStatus.java create mode 100644 src/gen/java/com/uber/cadence/entities/EncodingType.java create mode 100644 src/gen/java/com/uber/cadence/entities/EntityNotExistsError.java create mode 100644 src/gen/java/com/uber/cadence/entities/EventType.java create mode 100644 src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/FailoverInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/FeatureFlags.java create mode 100644 src/gen/java/com/uber/cadence/entities/FeatureNotEnabledError.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetSearchAttributesResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetTaskFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/Header.java create mode 100644 src/gen/java/com/uber/cadence/entities/History.java create mode 100644 src/gen/java/com/uber/cadence/entities/HistoryBranch.java create mode 100644 src/gen/java/com/uber/cadence/entities/HistoryBranchRange.java create mode 100644 src/gen/java/com/uber/cadence/entities/HistoryEvent.java create mode 100644 src/gen/java/com/uber/cadence/entities/HistoryEventFilterType.java create mode 100644 src/gen/java/com/uber/cadence/entities/IndexedValueType.java create mode 100644 src/gen/java/com/uber/cadence/entities/InternalDataInconsistencyError.java create mode 100644 src/gen/java/com/uber/cadence/entities/InternalServiceError.java create mode 100644 src/gen/java/com/uber/cadence/entities/IsolationGroupConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/IsolationGroupPartition.java create mode 100644 src/gen/java/com/uber/cadence/entities/IsolationGroupState.java create mode 100644 src/gen/java/com/uber/cadence/entities/LimitExceededError.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListDomainsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListDomainsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/MarkerRecordedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/Memo.java create mode 100644 src/gen/java/com/uber/cadence/entities/ParentClosePolicy.java create mode 100644 src/gen/java/com/uber/cadence/entities/PendingActivityInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/PendingActivityState.java create mode 100644 src/gen/java/com/uber/cadence/entities/PendingChildExecutionInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/PendingDecisionInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/PendingDecisionState.java create mode 100644 src/gen/java/com/uber/cadence/entities/PollForActivityTaskRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/PollForActivityTaskResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/PollForDecisionTaskRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/PollForDecisionTaskResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/PollerInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryConsistencyLevel.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryFailedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryRejectCondition.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryRejected.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryResultType.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryTaskCompletedType.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryWorkflowRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/QueryWorkflowResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ReapplyEventsRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RegisterDomainRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RemoteSyncMatchedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/RemoveTaskRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetPointInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetPoints.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetQueueRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetStickyTaskListRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetStickyTaskListResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/RetryPolicy.java create mode 100644 src/gen/java/com/uber/cadence/entities/RetryTaskV2Error.java create mode 100644 src/gen/java/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/SearchAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/ServiceBusyError.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartTimeFilter.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartTimerDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/StickyExecutionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/StickyWorkerUnavailableError.java create mode 100644 src/gen/java/com/uber/cadence/entities/SupportedClientVersions.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskIDBlock.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskList.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskListKind.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskListMetadata.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskListPartitionMetadata.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskListStatus.java create mode 100644 src/gen/java/com/uber/cadence/entities/TaskListType.java create mode 100644 src/gen/java/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/TimeoutType.java create mode 100644 src/gen/java/com/uber/cadence/entities/TimerCanceledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/TimerFiredEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/TimerStartedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/TransientDecisionInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/UpdateDomainInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/UpdateDomainRequest.java create mode 100644 src/gen/java/com/uber/cadence/entities/UpdateDomainResponse.java create mode 100644 src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/VersionHistories.java create mode 100644 src/gen/java/com/uber/cadence/entities/VersionHistory.java create mode 100644 src/gen/java/com/uber/cadence/entities/VersionHistoryItem.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkerVersionInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecution.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionConfiguration.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionFilter.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionInfo.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowIdReusePolicy.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowQuery.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowQueryResult.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowType.java create mode 100644 src/gen/java/com/uber/cadence/entities/WorkflowTypeFilter.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/EnumMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/Helpers.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/HistoryMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ResponseMapper.java create mode 100644 src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapper.java create mode 100644 src/main/java/com/uber/cadence/serviceclient/AsyncMethodCallback.java create mode 100644 src/main/java/com/uber/cadence/serviceclient/IWorkflowServiceV4.java create mode 100644 src/main/java/com/uber/cadence/serviceclient/WorkflowServiceGrpc.java create mode 100644 src/test/java/com/uber/cadence/internal/compatibility/ClientObjects.java create mode 100644 src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapperTest.java create mode 100644 src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapperTest.java create mode 100644 src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapperTest.java create mode 100644 src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapperTest.java diff --git a/.gen/com/uber/cadence/entities/AccessDeniedError.java b/.gen/com/uber/cadence/entities/AccessDeniedError.java new file mode 100644 index 000000000..db59d917a --- /dev/null +++ b/.gen/com/uber/cadence/entities/AccessDeniedError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class AccessDeniedError extends BaseError { + + public AccessDeniedError() { + super(); + } + + public AccessDeniedError(String message, Throwable cause) { + super(message, cause); + } + + public AccessDeniedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/ActivityLocalDispatchInfo.java b/.gen/com/uber/cadence/entities/ActivityLocalDispatchInfo.java new file mode 100644 index 000000000..c6d822de1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityLocalDispatchInfo.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityLocalDispatchInfo { + private String activityId; + private long scheduledTimestamp; + private long startedTimestamp; + private long scheduledTimestampOfThisAttempt; + private byte[] taskToken; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java new file mode 100644 index 000000000..2c275c607 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskCancelRequestedEventAttributes { + private String activityId; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java new file mode 100644 index 000000000..c8f2b4563 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskCanceledEventAttributes { + private byte[] details; + private long latestCancelRequestedEventId; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java new file mode 100644 index 000000000..e066b8bf9 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskCompletedEventAttributes { + private byte[] result; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java new file mode 100644 index 000000000..c2aefb07e --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskFailedEventAttributes { + private String reason; + private byte[] details; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java new file mode 100644 index 000000000..70dc7e62b --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java @@ -0,0 +1,44 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskScheduledEventAttributes { + private String activityId; + private ActivityType activityType; + private String domain; + private TaskList taskList; + private byte[] input; + private int scheduleToCloseTimeoutSeconds; + private int scheduleToStartTimeoutSeconds; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private long decisionTaskCompletedEventId; + private RetryPolicy retryPolicy; + private Header header; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java new file mode 100644 index 000000000..f48d172b6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskStartedEventAttributes { + private long scheduledEventId; + private String identity; + private String requestId; + private int attempt; + private String lastFailureReason; + private byte[] lastFailureDetails; +} diff --git a/.gen/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java b/.gen/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java new file mode 100644 index 000000000..4469ddc46 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityTaskTimedOutEventAttributes { + private byte[] details; + private long scheduledEventId; + private long startedEventId; + private TimeoutType timeoutType; + private String lastFailureReason; + private byte[] lastFailureDetails; +} diff --git a/.gen/com/uber/cadence/entities/ActivityType.java b/.gen/com/uber/cadence/entities/ActivityType.java new file mode 100644 index 000000000..244d059ee --- /dev/null +++ b/.gen/com/uber/cadence/entities/ActivityType.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ActivityType { + private String name; +} diff --git a/.gen/com/uber/cadence/entities/Any.java b/.gen/com/uber/cadence/entities/Any.java new file mode 100644 index 000000000..f5899ccdf --- /dev/null +++ b/.gen/com/uber/cadence/entities/Any.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class Any { + private String ValueType; + private byte[] Value; +} diff --git a/.gen/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java new file mode 100644 index 000000000..20dc1afbd --- /dev/null +++ b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyAttributes { + private String childDomainID; + private String childWorkflowID; + private String childRunID; + private ParentClosePolicy parentClosePolicy; +} diff --git a/.gen/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java new file mode 100644 index 000000000..e0e579001 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyRequest { + private ApplyParentClosePolicyAttributes child; + private ApplyParentClosePolicyStatus status; +} diff --git a/.gen/com/uber/cadence/entities/ApplyParentClosePolicyResult.java b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyResult.java new file mode 100644 index 000000000..57b7ed58f --- /dev/null +++ b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyResult.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyResult { + private ApplyParentClosePolicyAttributes child; + private CrossClusterTaskFailedCause failedCause; +} diff --git a/.gen/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java new file mode 100644 index 000000000..977e66338 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyStatus { + private boolean completed; + private CrossClusterTaskFailedCause failedCause; +} diff --git a/.gen/com/uber/cadence/entities/ArchivalStatus.java b/.gen/com/uber/cadence/entities/ArchivalStatus.java new file mode 100644 index 000000000..8a4e0e787 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ArchivalStatus.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum ArchivalStatus { + DISABLED, + ENABLED, +} diff --git a/.gen/com/uber/cadence/entities/AsyncWorkflowConfiguration.java b/.gen/com/uber/cadence/entities/AsyncWorkflowConfiguration.java new file mode 100644 index 000000000..85b76aedd --- /dev/null +++ b/.gen/com/uber/cadence/entities/AsyncWorkflowConfiguration.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class AsyncWorkflowConfiguration { + private boolean enabled; + private String predefinedQueueName; + private String queueType; + private DataBlob queueConfig; +} diff --git a/.gen/com/uber/cadence/entities/BadBinaries.java b/.gen/com/uber/cadence/entities/BadBinaries.java new file mode 100644 index 000000000..b22bcbcba --- /dev/null +++ b/.gen/com/uber/cadence/entities/BadBinaries.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class BadBinaries { + private Map binaries; +} diff --git a/.gen/com/uber/cadence/entities/BadBinaryInfo.java b/.gen/com/uber/cadence/entities/BadBinaryInfo.java new file mode 100644 index 000000000..751ce2dc7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/BadBinaryInfo.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class BadBinaryInfo { + private String reason; + private String operator; + private long createdTimeNano; +} diff --git a/.gen/com/uber/cadence/entities/BadRequestError.java b/.gen/com/uber/cadence/entities/BadRequestError.java new file mode 100644 index 000000000..54bac97e7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/BadRequestError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class BadRequestError extends BaseError { + + public BadRequestError() { + super(); + } + + public BadRequestError(String message, Throwable cause) { + super(message, cause); + } + + public BadRequestError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/BaseError.java b/.gen/com/uber/cadence/entities/BaseError.java new file mode 100644 index 000000000..8a08aece6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/BaseError.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public class BaseError extends RuntimeException { + public BaseError() { + super(); + } + + public BaseError(String message) { + super(message); + } + + public BaseError(String message, Throwable cause) { + super(message, cause); + } + + public BaseError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java b/.gen/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..5f134c88e --- /dev/null +++ b/.gen/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum CancelExternalWorkflowExecutionFailedCause { + UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION, + WORKFLOW_ALREADY_COMPLETED, +} diff --git a/.gen/com/uber/cadence/entities/CancelTimerDecisionAttributes.java b/.gen/com/uber/cadence/entities/CancelTimerDecisionAttributes.java new file mode 100644 index 000000000..dd01a7278 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CancelTimerDecisionAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CancelTimerDecisionAttributes { + private String timerId; +} diff --git a/.gen/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java b/.gen/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java new file mode 100644 index 000000000..f8f88f3e9 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CancelTimerFailedEventAttributes { + private String timerId; + private String cause; + private long decisionTaskCompletedEventId; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..482ab4b06 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CancelWorkflowExecutionDecisionAttributes { + private byte[] details; +} diff --git a/.gen/com/uber/cadence/entities/CancellationAlreadyRequestedError.java b/.gen/com/uber/cadence/entities/CancellationAlreadyRequestedError.java new file mode 100644 index 000000000..d94701773 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CancellationAlreadyRequestedError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class CancellationAlreadyRequestedError extends BaseError { + + public CancellationAlreadyRequestedError() { + super(); + } + + public CancellationAlreadyRequestedError(String message, Throwable cause) { + super(message, cause); + } + + public CancellationAlreadyRequestedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java new file mode 100644 index 000000000..d5d8d06d6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionCanceledEventAttributes { + private byte[] details; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java new file mode 100644 index 000000000..3446a2fb7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionCompletedEventAttributes { + private byte[] result; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..ba6a3a282 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum ChildWorkflowExecutionFailedCause { + WORKFLOW_ALREADY_RUNNING, +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..008287a91 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionFailedEventAttributes { + private String reason; + private byte[] details; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java new file mode 100644 index 000000000..daba74b42 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionStartedEventAttributes { + private String domain; + private long initiatedEventId; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private Header header; +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java new file mode 100644 index 000000000..09be9bc65 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionTerminatedEventAttributes { + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java new file mode 100644 index 000000000..adec27619 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionTimedOutEventAttributes { + private TimeoutType timeoutType; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/ClientVersionNotSupportedError.java b/.gen/com/uber/cadence/entities/ClientVersionNotSupportedError.java new file mode 100644 index 000000000..9570f4dc0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ClientVersionNotSupportedError.java @@ -0,0 +1,51 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class ClientVersionNotSupportedError extends BaseError { + private String featureVersion; + private String clientImpl; + private String supportedVersions; + + public ClientVersionNotSupportedError() { + super(); + } + + public ClientVersionNotSupportedError(String message, Throwable cause) { + super(message, cause); + } + + public ClientVersionNotSupportedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/CloseShardRequest.java b/.gen/com/uber/cadence/entities/CloseShardRequest.java new file mode 100644 index 000000000..96d20f4ae --- /dev/null +++ b/.gen/com/uber/cadence/entities/CloseShardRequest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CloseShardRequest { + private int shardID; +} diff --git a/.gen/com/uber/cadence/entities/ClusterInfo.java b/.gen/com/uber/cadence/entities/ClusterInfo.java new file mode 100644 index 000000000..cd4c98930 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ClusterInfo.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ClusterInfo { + private SupportedClientVersions supportedClientVersions; +} diff --git a/.gen/com/uber/cadence/entities/ClusterReplicationConfiguration.java b/.gen/com/uber/cadence/entities/ClusterReplicationConfiguration.java new file mode 100644 index 000000000..7f43f8274 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ClusterReplicationConfiguration.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ClusterReplicationConfiguration { + private String clusterName; +} diff --git a/.gen/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..5ab3e916f --- /dev/null +++ b/.gen/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CompleteWorkflowExecutionDecisionAttributes { + private byte[] result; +} diff --git a/.gen/com/uber/cadence/entities/ContinueAsNewInitiator.java b/.gen/com/uber/cadence/entities/ContinueAsNewInitiator.java new file mode 100644 index 000000000..4b8977e77 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ContinueAsNewInitiator.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum ContinueAsNewInitiator { + Decider, + RetryPolicy, + CronSchedule, +} diff --git a/.gen/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..8c51d5ce6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,48 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ContinueAsNewWorkflowExecutionDecisionAttributes { + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private int backoffStartIntervalInSeconds; + private RetryPolicy retryPolicy; + private ContinueAsNewInitiator initiator; + private String failureReason; + private byte[] failureDetails; + private byte[] lastCompletionResult; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; + private int jitterStartSeconds; +} diff --git a/.gen/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java b/.gen/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java new file mode 100644 index 000000000..d5f15eac5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CountWorkflowExecutionsRequest { + private String domain; + private String query; +} diff --git a/.gen/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java b/.gen/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java new file mode 100644 index 000000000..e25a19217 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CountWorkflowExecutionsResponse { + private long count; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java new file mode 100644 index 000000000..1f333d309 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterApplyParentClosePolicyRequestAttributes { + private List children; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java new file mode 100644 index 000000000..6fdd2086c --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterApplyParentClosePolicyResponseAttributes { + private List childrenStatus; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java new file mode 100644 index 000000000..9e0af5e5b --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterCancelExecutionRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private String requestID; + private long initiatedEventID; + private boolean childWorkflowOnly; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java new file mode 100644 index 000000000..ef5a02cdf --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterCancelExecutionResponseAttributes {} diff --git a/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java new file mode 100644 index 000000000..686731c60 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private long initiatedEventID; + private HistoryEvent completionEvent; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java new file mode 100644 index 000000000..f74f695ee --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes {} diff --git a/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java new file mode 100644 index 000000000..199097b12 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterSignalExecutionRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private String requestID; + private long initiatedEventID; + private boolean childWorkflowOnly; + private String signalName; + private byte[] signalInput; + private byte[] control; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java new file mode 100644 index 000000000..ddc56631e --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterSignalExecutionResponseAttributes {} diff --git a/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java new file mode 100644 index 000000000..5de9b7f9a --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterStartChildExecutionRequestAttributes { + private String targetDomainID; + private String requestID; + private long initiatedEventID; + private StartChildWorkflowExecutionInitiatedEventAttributes initiatedEventAttributes; + private String targetRunID; + private Map partitionConfig; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java b/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java new file mode 100644 index 000000000..cfc348193 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterStartChildExecutionResponseAttributes { + private String runID; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterTaskFailedCause.java b/.gen/com/uber/cadence/entities/CrossClusterTaskFailedCause.java new file mode 100644 index 000000000..b5cdf967e --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterTaskFailedCause.java @@ -0,0 +1,32 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum CrossClusterTaskFailedCause { + DOMAIN_NOT_ACTIVE, + DOMAIN_NOT_EXISTS, + WORKFLOW_ALREADY_RUNNING, + WORKFLOW_NOT_EXISTS, + WORKFLOW_ALREADY_COMPLETED, + UNCATEGORIZED, +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterTaskInfo.java b/.gen/com/uber/cadence/entities/CrossClusterTaskInfo.java new file mode 100644 index 000000000..37319cae4 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterTaskInfo.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterTaskInfo { + private String domainID; + private String workflowID; + private String runID; + private CrossClusterTaskType taskType; + private int taskState; + private long taskID; + private long visibilityTimestamp; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterTaskRequest.java b/.gen/com/uber/cadence/entities/CrossClusterTaskRequest.java new file mode 100644 index 000000000..bf6a2c3ad --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterTaskRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterTaskRequest { + private CrossClusterTaskInfo taskInfo; + private CrossClusterStartChildExecutionRequestAttributes startChildExecutionAttributes; + private CrossClusterCancelExecutionRequestAttributes cancelExecutionAttributes; + private CrossClusterSignalExecutionRequestAttributes signalExecutionAttributes; + private CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes + recordChildWorkflowExecutionCompleteAttributes; + private CrossClusterApplyParentClosePolicyRequestAttributes applyParentClosePolicyAttributes; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterTaskResponse.java b/.gen/com/uber/cadence/entities/CrossClusterTaskResponse.java new file mode 100644 index 000000000..a4f909864 --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterTaskResponse.java @@ -0,0 +1,42 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class CrossClusterTaskResponse { + private long taskID; + private CrossClusterTaskType taskType; + private int taskState; + private CrossClusterTaskFailedCause failedCause; + private CrossClusterStartChildExecutionResponseAttributes startChildExecutionAttributes; + private CrossClusterCancelExecutionResponseAttributes cancelExecutionAttributes; + private CrossClusterSignalExecutionResponseAttributes signalExecutionAttributes; + private CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes + recordChildWorkflowExecutionCompleteAttributes; + private CrossClusterApplyParentClosePolicyResponseAttributes applyParentClosePolicyAttributes; +} diff --git a/.gen/com/uber/cadence/entities/CrossClusterTaskType.java b/.gen/com/uber/cadence/entities/CrossClusterTaskType.java new file mode 100644 index 000000000..40c9155ba --- /dev/null +++ b/.gen/com/uber/cadence/entities/CrossClusterTaskType.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum CrossClusterTaskType { + StartChildExecution, + CancelExecution, + SignalExecution, + RecordChildWorkflowExecutionComplete, + ApplyParentClosePolicy, +} diff --git a/.gen/com/uber/cadence/entities/CurrentBranchChangedError.java b/.gen/com/uber/cadence/entities/CurrentBranchChangedError.java new file mode 100644 index 000000000..951623f3e --- /dev/null +++ b/.gen/com/uber/cadence/entities/CurrentBranchChangedError.java @@ -0,0 +1,49 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class CurrentBranchChangedError extends BaseError { + private byte[] currentBranchToken; + + public CurrentBranchChangedError() { + super(); + } + + public CurrentBranchChangedError(String message, Throwable cause) { + super(message, cause); + } + + public CurrentBranchChangedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/DataBlob.java b/.gen/com/uber/cadence/entities/DataBlob.java new file mode 100644 index 000000000..9a5ccd935 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DataBlob.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DataBlob { + private EncodingType EncodingType; + private byte[] Data; +} diff --git a/.gen/com/uber/cadence/entities/Decision.java b/.gen/com/uber/cadence/entities/Decision.java new file mode 100644 index 000000000..917010b58 --- /dev/null +++ b/.gen/com/uber/cadence/entities/Decision.java @@ -0,0 +1,51 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class Decision { + private DecisionType decisionType; + private ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes; + private StartTimerDecisionAttributes startTimerDecisionAttributes; + private CompleteWorkflowExecutionDecisionAttributes completeWorkflowExecutionDecisionAttributes; + private FailWorkflowExecutionDecisionAttributes failWorkflowExecutionDecisionAttributes; + private RequestCancelActivityTaskDecisionAttributes requestCancelActivityTaskDecisionAttributes; + private CancelTimerDecisionAttributes cancelTimerDecisionAttributes; + private CancelWorkflowExecutionDecisionAttributes cancelWorkflowExecutionDecisionAttributes; + private RequestCancelExternalWorkflowExecutionDecisionAttributes + requestCancelExternalWorkflowExecutionDecisionAttributes; + private RecordMarkerDecisionAttributes recordMarkerDecisionAttributes; + private ContinueAsNewWorkflowExecutionDecisionAttributes + continueAsNewWorkflowExecutionDecisionAttributes; + private StartChildWorkflowExecutionDecisionAttributes + startChildWorkflowExecutionDecisionAttributes; + private SignalExternalWorkflowExecutionDecisionAttributes + signalExternalWorkflowExecutionDecisionAttributes; + private UpsertWorkflowSearchAttributesDecisionAttributes + upsertWorkflowSearchAttributesDecisionAttributes; +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java b/.gen/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java new file mode 100644 index 000000000..fae3e6441 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DecisionTaskCompletedEventAttributes { + private byte[] executionContext; + private long scheduledEventId; + private long startedEventId; + private String identity; + private String binaryChecksum; +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskFailedCause.java b/.gen/com/uber/cadence/entities/DecisionTaskFailedCause.java new file mode 100644 index 000000000..8558534dd --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskFailedCause.java @@ -0,0 +1,49 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum DecisionTaskFailedCause { + UNHANDLED_DECISION, + BAD_SCHEDULE_ACTIVITY_ATTRIBUTES, + BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES, + BAD_START_TIMER_ATTRIBUTES, + BAD_CANCEL_TIMER_ATTRIBUTES, + BAD_RECORD_MARKER_ATTRIBUTES, + BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_CONTINUE_AS_NEW_ATTRIBUTES, + START_TIMER_DUPLICATE_ID, + RESET_STICKY_TASKLIST, + WORKFLOW_WORKER_UNHANDLED_FAILURE, + BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_START_CHILD_EXECUTION_ATTRIBUTES, + FORCE_CLOSE_DECISION, + FAILOVER_CLOSE_DECISION, + BAD_SIGNAL_INPUT_SIZE, + RESET_WORKFLOW, + BAD_BINARY, + SCHEDULE_ACTIVITY_DUPLICATE_ID, + BAD_SEARCH_ATTRIBUTES, +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java b/.gen/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java new file mode 100644 index 000000000..df540b681 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java @@ -0,0 +1,43 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DecisionTaskFailedEventAttributes { + private long scheduledEventId; + private long startedEventId; + private DecisionTaskFailedCause cause; + private byte[] details; + private String identity; + private String reason; + private String baseRunId; + private String newRunId; + private long forkEventVersion; + private String binaryChecksum; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java b/.gen/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java new file mode 100644 index 000000000..795566967 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DecisionTaskScheduledEventAttributes { + private TaskList taskList; + private int startToCloseTimeoutSeconds; + private long attempt; +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java b/.gen/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java new file mode 100644 index 000000000..3fa233f0d --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DecisionTaskStartedEventAttributes { + private long scheduledEventId; + private String identity; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskTimedOutCause.java b/.gen/com/uber/cadence/entities/DecisionTaskTimedOutCause.java new file mode 100644 index 000000000..91303e7a1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskTimedOutCause.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum DecisionTaskTimedOutCause { + TIMEOUT, + RESET, +} diff --git a/.gen/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java b/.gen/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java new file mode 100644 index 000000000..52cd6030b --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DecisionTaskTimedOutEventAttributes { + private long scheduledEventId; + private long startedEventId; + private TimeoutType timeoutType; + private String baseRunId; + private String newRunId; + private long forkEventVersion; + private String reason; + private DecisionTaskTimedOutCause cause; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/DecisionType.java b/.gen/com/uber/cadence/entities/DecisionType.java new file mode 100644 index 000000000..eb7863a58 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DecisionType.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum DecisionType { + ScheduleActivityTask, + RequestCancelActivityTask, + StartTimer, + CompleteWorkflowExecution, + FailWorkflowExecution, + CancelTimer, + CancelWorkflowExecution, + RequestCancelExternalWorkflowExecution, + RecordMarker, + ContinueAsNewWorkflowExecution, + StartChildWorkflowExecution, + SignalExternalWorkflowExecution, + UpsertWorkflowSearchAttributes, +} diff --git a/.gen/com/uber/cadence/entities/DeprecateDomainRequest.java b/.gen/com/uber/cadence/entities/DeprecateDomainRequest.java new file mode 100644 index 000000000..8ffa00b93 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DeprecateDomainRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DeprecateDomainRequest { + private String name; + private String securityToken; +} diff --git a/.gen/com/uber/cadence/entities/DescribeDomainRequest.java b/.gen/com/uber/cadence/entities/DescribeDomainRequest.java new file mode 100644 index 000000000..64be75a2a --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeDomainRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeDomainRequest { + private String name; + private String uuid; +} diff --git a/.gen/com/uber/cadence/entities/DescribeDomainResponse.java b/.gen/com/uber/cadence/entities/DescribeDomainResponse.java new file mode 100644 index 000000000..4e8712bf5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeDomainResponse.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeDomainResponse { + private DomainInfo domainInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private long failoverVersion; + private boolean isGlobalDomain; + private FailoverInfo failoverInfo; +} diff --git a/.gen/com/uber/cadence/entities/DescribeHistoryHostRequest.java b/.gen/com/uber/cadence/entities/DescribeHistoryHostRequest.java new file mode 100644 index 000000000..3326ef837 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeHistoryHostRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeHistoryHostRequest { + private String hostAddress; + private int shardIdForHost; + private WorkflowExecution executionForHost; +} diff --git a/.gen/com/uber/cadence/entities/DescribeHistoryHostResponse.java b/.gen/com/uber/cadence/entities/DescribeHistoryHostResponse.java new file mode 100644 index 000000000..9cf7d68fd --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeHistoryHostResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeHistoryHostResponse { + private int numberOfShards; + private List shardIDs; + private DomainCacheInfo domainCache; + private String shardControllerStatus; + private String address; +} diff --git a/.gen/com/uber/cadence/entities/DescribeQueueRequest.java b/.gen/com/uber/cadence/entities/DescribeQueueRequest.java new file mode 100644 index 000000000..8f828b53e --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeQueueRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeQueueRequest { + private int shardID; + private String clusterName; + private int type; +} diff --git a/.gen/com/uber/cadence/entities/DescribeQueueResponse.java b/.gen/com/uber/cadence/entities/DescribeQueueResponse.java new file mode 100644 index 000000000..e5badb2dd --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeQueueResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeQueueResponse { + private List processingQueueStates; +} diff --git a/.gen/com/uber/cadence/entities/DescribeShardDistributionRequest.java b/.gen/com/uber/cadence/entities/DescribeShardDistributionRequest.java new file mode 100644 index 000000000..e7c751696 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeShardDistributionRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeShardDistributionRequest { + private int pageSize; + private int pageID; +} diff --git a/.gen/com/uber/cadence/entities/DescribeShardDistributionResponse.java b/.gen/com/uber/cadence/entities/DescribeShardDistributionResponse.java new file mode 100644 index 000000000..25d22db1b --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeShardDistributionResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeShardDistributionResponse { + private int numberOfShards; + private Map shards; +} diff --git a/.gen/com/uber/cadence/entities/DescribeTaskListRequest.java b/.gen/com/uber/cadence/entities/DescribeTaskListRequest.java new file mode 100644 index 000000000..f7ecde624 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeTaskListRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeTaskListRequest { + private String domain; + private TaskList taskList; + private TaskListType taskListType; + private boolean includeTaskListStatus; +} diff --git a/.gen/com/uber/cadence/entities/DescribeTaskListResponse.java b/.gen/com/uber/cadence/entities/DescribeTaskListResponse.java new file mode 100644 index 000000000..7f409c2e2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeTaskListResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeTaskListResponse { + private List pollers; + private TaskListStatus taskListStatus; +} diff --git a/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java new file mode 100644 index 000000000..d82f4406b --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeWorkflowExecutionRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java b/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java new file mode 100644 index 000000000..b09e0420e --- /dev/null +++ b/.gen/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DescribeWorkflowExecutionResponse { + private WorkflowExecutionConfiguration executionConfiguration; + private WorkflowExecutionInfo workflowExecutionInfo; + private List pendingActivities; + private List pendingChildren; + private PendingDecisionInfo pendingDecision; +} diff --git a/.gen/com/uber/cadence/entities/DomainAlreadyExistsError.java b/.gen/com/uber/cadence/entities/DomainAlreadyExistsError.java new file mode 100644 index 000000000..ef6587b32 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainAlreadyExistsError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class DomainAlreadyExistsError extends BaseError { + + public DomainAlreadyExistsError() { + super(); + } + + public DomainAlreadyExistsError(String message, Throwable cause) { + super(message, cause); + } + + public DomainAlreadyExistsError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/DomainCacheInfo.java b/.gen/com/uber/cadence/entities/DomainCacheInfo.java new file mode 100644 index 000000000..0a9f4b333 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainCacheInfo.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DomainCacheInfo { + private long numOfItemsInCacheByID; + private long numOfItemsInCacheByName; +} diff --git a/.gen/com/uber/cadence/entities/DomainConfiguration.java b/.gen/com/uber/cadence/entities/DomainConfiguration.java new file mode 100644 index 000000000..2e26a3b4c --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainConfiguration.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DomainConfiguration { + private int workflowExecutionRetentionPeriodInDays; + private boolean emitMetric; + private IsolationGroupConfiguration isolationgroups; + private BadBinaries badBinaries; + private ArchivalStatus historyArchivalStatus; + private String historyArchivalURI; + private ArchivalStatus visibilityArchivalStatus; + private String visibilityArchivalURI; + private AsyncWorkflowConfiguration AsyncWorkflowConfiguration; +} diff --git a/.gen/com/uber/cadence/entities/DomainInfo.java b/.gen/com/uber/cadence/entities/DomainInfo.java new file mode 100644 index 000000000..300cbf52d --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainInfo.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DomainInfo { + private String name; + private DomainStatus status; + private String description; + private String ownerEmail; + private Map data; + private String uuid; +} diff --git a/.gen/com/uber/cadence/entities/DomainNotActiveError.java b/.gen/com/uber/cadence/entities/DomainNotActiveError.java new file mode 100644 index 000000000..ec9350760 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainNotActiveError.java @@ -0,0 +1,51 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class DomainNotActiveError extends BaseError { + private String domainName; + private String currentCluster; + private String activeCluster; + + public DomainNotActiveError() { + super(); + } + + public DomainNotActiveError(String message, Throwable cause) { + super(message, cause); + } + + public DomainNotActiveError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/DomainReplicationConfiguration.java b/.gen/com/uber/cadence/entities/DomainReplicationConfiguration.java new file mode 100644 index 000000000..ba2415171 --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainReplicationConfiguration.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class DomainReplicationConfiguration { + private String activeClusterName; + private List clusters; +} diff --git a/.gen/com/uber/cadence/entities/DomainStatus.java b/.gen/com/uber/cadence/entities/DomainStatus.java new file mode 100644 index 000000000..87f7c10db --- /dev/null +++ b/.gen/com/uber/cadence/entities/DomainStatus.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum DomainStatus { + REGISTERED, + DEPRECATED, + DELETED, +} diff --git a/.gen/com/uber/cadence/entities/EncodingType.java b/.gen/com/uber/cadence/entities/EncodingType.java new file mode 100644 index 000000000..86305d62c --- /dev/null +++ b/.gen/com/uber/cadence/entities/EncodingType.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum EncodingType { + ThriftRW, + JSON, +} diff --git a/.gen/com/uber/cadence/entities/EntityNotExistsError.java b/.gen/com/uber/cadence/entities/EntityNotExistsError.java new file mode 100644 index 000000000..d429c7759 --- /dev/null +++ b/.gen/com/uber/cadence/entities/EntityNotExistsError.java @@ -0,0 +1,50 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class EntityNotExistsError extends BaseError { + private String currentCluster; + private String activeCluster; + + public EntityNotExistsError() { + super(); + } + + public EntityNotExistsError(String message, Throwable cause) { + super(message, cause); + } + + public EntityNotExistsError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/EventType.java b/.gen/com/uber/cadence/entities/EventType.java new file mode 100644 index 000000000..3c66d24ef --- /dev/null +++ b/.gen/com/uber/cadence/entities/EventType.java @@ -0,0 +1,68 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum EventType { + WorkflowExecutionStarted, + WorkflowExecutionCompleted, + WorkflowExecutionFailed, + WorkflowExecutionTimedOut, + DecisionTaskScheduled, + DecisionTaskStarted, + DecisionTaskCompleted, + DecisionTaskTimedOut, + DecisionTaskFailed, + ActivityTaskScheduled, + ActivityTaskStarted, + ActivityTaskCompleted, + ActivityTaskFailed, + ActivityTaskTimedOut, + ActivityTaskCancelRequested, + RequestCancelActivityTaskFailed, + ActivityTaskCanceled, + TimerStarted, + TimerFired, + CancelTimerFailed, + TimerCanceled, + WorkflowExecutionCancelRequested, + WorkflowExecutionCanceled, + RequestCancelExternalWorkflowExecutionInitiated, + RequestCancelExternalWorkflowExecutionFailed, + ExternalWorkflowExecutionCancelRequested, + MarkerRecorded, + WorkflowExecutionSignaled, + WorkflowExecutionTerminated, + WorkflowExecutionContinuedAsNew, + StartChildWorkflowExecutionInitiated, + StartChildWorkflowExecutionFailed, + ChildWorkflowExecutionStarted, + ChildWorkflowExecutionCompleted, + ChildWorkflowExecutionFailed, + ChildWorkflowExecutionCanceled, + ChildWorkflowExecutionTimedOut, + ChildWorkflowExecutionTerminated, + SignalExternalWorkflowExecutionInitiated, + SignalExternalWorkflowExecutionFailed, + ExternalWorkflowExecutionSignaled, + UpsertWorkflowSearchAttributes, +} diff --git a/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java b/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java new file mode 100644 index 000000000..a4c6cfde9 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ExternalWorkflowExecutionCancelRequestedEventAttributes { + private long initiatedEventId; + private String domain; + private WorkflowExecution workflowExecution; +} diff --git a/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java b/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java new file mode 100644 index 000000000..aeefed39c --- /dev/null +++ b/.gen/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ExternalWorkflowExecutionSignaledEventAttributes { + private long initiatedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private byte[] control; +} diff --git a/.gen/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..00ab5d714 --- /dev/null +++ b/.gen/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class FailWorkflowExecutionDecisionAttributes { + private String reason; + private byte[] details; +} diff --git a/.gen/com/uber/cadence/entities/FailoverInfo.java b/.gen/com/uber/cadence/entities/FailoverInfo.java new file mode 100644 index 000000000..96c441e8c --- /dev/null +++ b/.gen/com/uber/cadence/entities/FailoverInfo.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class FailoverInfo { + private long failoverVersion; + private long failoverStartTimestamp; + private long failoverExpireTimestamp; + private int completedShardCount; + private List pendingShards; +} diff --git a/.gen/com/uber/cadence/entities/FeatureFlags.java b/.gen/com/uber/cadence/entities/FeatureFlags.java new file mode 100644 index 000000000..effc354da --- /dev/null +++ b/.gen/com/uber/cadence/entities/FeatureFlags.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class FeatureFlags { + private boolean WorkflowExecutionAlreadyCompletedErrorEnabled; +} diff --git a/.gen/com/uber/cadence/entities/FeatureNotEnabledError.java b/.gen/com/uber/cadence/entities/FeatureNotEnabledError.java new file mode 100644 index 000000000..6398e11e8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/FeatureNotEnabledError.java @@ -0,0 +1,49 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class FeatureNotEnabledError extends BaseError { + private String featureFlag; + + public FeatureNotEnabledError() { + super(); + } + + public FeatureNotEnabledError(String message, Throwable cause) { + super(message, cause); + } + + public FeatureNotEnabledError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/GetCrossClusterTasksRequest.java b/.gen/com/uber/cadence/entities/GetCrossClusterTasksRequest.java new file mode 100644 index 000000000..409fb8c8f --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetCrossClusterTasksRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetCrossClusterTasksRequest { + private List shardIDs; + private String targetCluster; +} diff --git a/.gen/com/uber/cadence/entities/GetCrossClusterTasksResponse.java b/.gen/com/uber/cadence/entities/GetCrossClusterTasksResponse.java new file mode 100644 index 000000000..1d7fad63b --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetCrossClusterTasksResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetCrossClusterTasksResponse { + private Map> tasksByShard; + private Map failedCauseByShard; +} diff --git a/.gen/com/uber/cadence/entities/GetSearchAttributesResponse.java b/.gen/com/uber/cadence/entities/GetSearchAttributesResponse.java new file mode 100644 index 000000000..acf5db598 --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetSearchAttributesResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetSearchAttributesResponse { + private Map keys; +} diff --git a/.gen/com/uber/cadence/entities/GetTaskFailedCause.java b/.gen/com/uber/cadence/entities/GetTaskFailedCause.java new file mode 100644 index 000000000..d11510312 --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetTaskFailedCause.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum GetTaskFailedCause { + SERVICE_BUSY, + TIMEOUT, + SHARD_OWNERSHIP_LOST, + UNCATEGORIZED, +} diff --git a/.gen/com/uber/cadence/entities/GetTaskListsByDomainRequest.java b/.gen/com/uber/cadence/entities/GetTaskListsByDomainRequest.java new file mode 100644 index 000000000..de4837eba --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetTaskListsByDomainRequest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetTaskListsByDomainRequest { + private String domainName; +} diff --git a/.gen/com/uber/cadence/entities/GetTaskListsByDomainResponse.java b/.gen/com/uber/cadence/entities/GetTaskListsByDomainResponse.java new file mode 100644 index 000000000..34d9d131f --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetTaskListsByDomainResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetTaskListsByDomainResponse { + private Map decisionTaskListMap; + private Map activityTaskListMap; +} diff --git a/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java b/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java new file mode 100644 index 000000000..0fa56b743 --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetWorkflowExecutionHistoryRequest { + private String domain; + private WorkflowExecution execution; + private int maximumPageSize; + private byte[] nextPageToken; + private boolean waitForNewEvent; + private HistoryEventFilterType HistoryEventFilterType; + private boolean skipArchival; +} diff --git a/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java b/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java new file mode 100644 index 000000000..9c47bc302 --- /dev/null +++ b/.gen/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class GetWorkflowExecutionHistoryResponse { + private History history; + private List rawHistory; + private byte[] nextPageToken; + private boolean archived; +} diff --git a/.gen/com/uber/cadence/entities/Header.java b/.gen/com/uber/cadence/entities/Header.java new file mode 100644 index 000000000..4670d3d86 --- /dev/null +++ b/.gen/com/uber/cadence/entities/Header.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class Header { + private Map fields; +} diff --git a/.gen/com/uber/cadence/entities/History.java b/.gen/com/uber/cadence/entities/History.java new file mode 100644 index 000000000..a5328457a --- /dev/null +++ b/.gen/com/uber/cadence/entities/History.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class History { + private List events; +} diff --git a/.gen/com/uber/cadence/entities/HistoryBranch.java b/.gen/com/uber/cadence/entities/HistoryBranch.java new file mode 100644 index 000000000..7ae2bd4b2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/HistoryBranch.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class HistoryBranch { + private String treeID; + private String branchID; + private List ancestors; +} diff --git a/.gen/com/uber/cadence/entities/HistoryBranchRange.java b/.gen/com/uber/cadence/entities/HistoryBranchRange.java new file mode 100644 index 000000000..f668f0840 --- /dev/null +++ b/.gen/com/uber/cadence/entities/HistoryBranchRange.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class HistoryBranchRange { + private String branchID; + private long beginNodeID; + private long endNodeID; +} diff --git a/.gen/com/uber/cadence/entities/HistoryEvent.java b/.gen/com/uber/cadence/entities/HistoryEvent.java new file mode 100644 index 000000000..3bdecaafc --- /dev/null +++ b/.gen/com/uber/cadence/entities/HistoryEvent.java @@ -0,0 +1,95 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class HistoryEvent { + private long eventId; + private long timestamp; + private EventType eventType; + private long version; + private long taskId; + private WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes; + private WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes; + private WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes; + private WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes; + private DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes; + private DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes; + private DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes; + private DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes; + private DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes; + private ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes; + private ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes; + private ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes; + private ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes; + private ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes; + private TimerStartedEventAttributes timerStartedEventAttributes; + private TimerFiredEventAttributes timerFiredEventAttributes; + private ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes; + private RequestCancelActivityTaskFailedEventAttributes + requestCancelActivityTaskFailedEventAttributes; + private ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes; + private TimerCanceledEventAttributes timerCanceledEventAttributes; + private CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes; + private MarkerRecordedEventAttributes markerRecordedEventAttributes; + private WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes; + private WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes; + private WorkflowExecutionCancelRequestedEventAttributes + workflowExecutionCancelRequestedEventAttributes; + private WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes; + private RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + requestCancelExternalWorkflowExecutionInitiatedEventAttributes; + private RequestCancelExternalWorkflowExecutionFailedEventAttributes + requestCancelExternalWorkflowExecutionFailedEventAttributes; + private ExternalWorkflowExecutionCancelRequestedEventAttributes + externalWorkflowExecutionCancelRequestedEventAttributes; + private WorkflowExecutionContinuedAsNewEventAttributes + workflowExecutionContinuedAsNewEventAttributes; + private StartChildWorkflowExecutionInitiatedEventAttributes + startChildWorkflowExecutionInitiatedEventAttributes; + private StartChildWorkflowExecutionFailedEventAttributes + startChildWorkflowExecutionFailedEventAttributes; + private ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes; + private ChildWorkflowExecutionCompletedEventAttributes + childWorkflowExecutionCompletedEventAttributes; + private ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes; + private ChildWorkflowExecutionCanceledEventAttributes + childWorkflowExecutionCanceledEventAttributes; + private ChildWorkflowExecutionTimedOutEventAttributes + childWorkflowExecutionTimedOutEventAttributes; + private ChildWorkflowExecutionTerminatedEventAttributes + childWorkflowExecutionTerminatedEventAttributes; + private SignalExternalWorkflowExecutionInitiatedEventAttributes + signalExternalWorkflowExecutionInitiatedEventAttributes; + private SignalExternalWorkflowExecutionFailedEventAttributes + signalExternalWorkflowExecutionFailedEventAttributes; + private ExternalWorkflowExecutionSignaledEventAttributes + externalWorkflowExecutionSignaledEventAttributes; + private UpsertWorkflowSearchAttributesEventAttributes + upsertWorkflowSearchAttributesEventAttributes; +} diff --git a/.gen/com/uber/cadence/entities/HistoryEventFilterType.java b/.gen/com/uber/cadence/entities/HistoryEventFilterType.java new file mode 100644 index 000000000..7b50cc680 --- /dev/null +++ b/.gen/com/uber/cadence/entities/HistoryEventFilterType.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum HistoryEventFilterType { + ALL_EVENT, + CLOSE_EVENT, +} diff --git a/.gen/com/uber/cadence/entities/IndexedValueType.java b/.gen/com/uber/cadence/entities/IndexedValueType.java new file mode 100644 index 000000000..2e0d270bb --- /dev/null +++ b/.gen/com/uber/cadence/entities/IndexedValueType.java @@ -0,0 +1,32 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum IndexedValueType { + STRING, + KEYWORD, + INT, + DOUBLE, + BOOL, + DATETIME, +} diff --git a/.gen/com/uber/cadence/entities/InternalDataInconsistencyError.java b/.gen/com/uber/cadence/entities/InternalDataInconsistencyError.java new file mode 100644 index 000000000..0944fb908 --- /dev/null +++ b/.gen/com/uber/cadence/entities/InternalDataInconsistencyError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class InternalDataInconsistencyError extends BaseError { + + public InternalDataInconsistencyError() { + super(); + } + + public InternalDataInconsistencyError(String message, Throwable cause) { + super(message, cause); + } + + public InternalDataInconsistencyError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/InternalServiceError.java b/.gen/com/uber/cadence/entities/InternalServiceError.java new file mode 100644 index 000000000..6143a9d7f --- /dev/null +++ b/.gen/com/uber/cadence/entities/InternalServiceError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class InternalServiceError extends BaseError { + + public InternalServiceError() { + super(); + } + + public InternalServiceError(String message, Throwable cause) { + super(message, cause); + } + + public InternalServiceError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/IsolationGroupConfiguration.java b/.gen/com/uber/cadence/entities/IsolationGroupConfiguration.java new file mode 100644 index 000000000..6012eb361 --- /dev/null +++ b/.gen/com/uber/cadence/entities/IsolationGroupConfiguration.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class IsolationGroupConfiguration { + private List isolationGroups; +} diff --git a/.gen/com/uber/cadence/entities/IsolationGroupPartition.java b/.gen/com/uber/cadence/entities/IsolationGroupPartition.java new file mode 100644 index 000000000..d65dc10f2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/IsolationGroupPartition.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class IsolationGroupPartition { + private String name; + private IsolationGroupState state; +} diff --git a/.gen/com/uber/cadence/entities/IsolationGroupState.java b/.gen/com/uber/cadence/entities/IsolationGroupState.java new file mode 100644 index 000000000..163b39a2b --- /dev/null +++ b/.gen/com/uber/cadence/entities/IsolationGroupState.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum IsolationGroupState { + INVALID, + HEALTHY, + DRAINED, +} diff --git a/.gen/com/uber/cadence/entities/LimitExceededError.java b/.gen/com/uber/cadence/entities/LimitExceededError.java new file mode 100644 index 000000000..6f56b0138 --- /dev/null +++ b/.gen/com/uber/cadence/entities/LimitExceededError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class LimitExceededError extends BaseError { + + public LimitExceededError() { + super(); + } + + public LimitExceededError(String message, Throwable cause) { + super(message, cause); + } + + public LimitExceededError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java b/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java new file mode 100644 index 000000000..7c4a8e6c0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListArchivedWorkflowExecutionsRequest { + private String domain; + private int pageSize; + private byte[] nextPageToken; + private String query; +} diff --git a/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java b/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java new file mode 100644 index 000000000..79223d498 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListArchivedWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java b/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java new file mode 100644 index 000000000..9febb3924 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListClosedWorkflowExecutionsRequest { + private String domain; + private int maximumPageSize; + private byte[] nextPageToken; + private StartTimeFilter StartTimeFilter; + private WorkflowExecutionFilter executionFilter; + private WorkflowTypeFilter typeFilter; + private WorkflowExecutionCloseStatus statusFilter; +} diff --git a/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java b/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java new file mode 100644 index 000000000..68282b51b --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListClosedWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/ListDomainsRequest.java b/.gen/com/uber/cadence/entities/ListDomainsRequest.java new file mode 100644 index 000000000..c6b501bb8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListDomainsRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListDomainsRequest { + private int pageSize; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/ListDomainsResponse.java b/.gen/com/uber/cadence/entities/ListDomainsResponse.java new file mode 100644 index 000000000..b996e1bfd --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListDomainsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListDomainsResponse { + private List domains; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java b/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java new file mode 100644 index 000000000..83b8b601e --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListOpenWorkflowExecutionsRequest { + private String domain; + private int maximumPageSize; + private byte[] nextPageToken; + private StartTimeFilter StartTimeFilter; + private WorkflowExecutionFilter executionFilter; + private WorkflowTypeFilter typeFilter; +} diff --git a/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java b/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java new file mode 100644 index 000000000..02bf0b440 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListOpenWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/ListTaskListPartitionsRequest.java b/.gen/com/uber/cadence/entities/ListTaskListPartitionsRequest.java new file mode 100644 index 000000000..1a093fd99 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListTaskListPartitionsRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListTaskListPartitionsRequest { + private String domain; + private TaskList taskList; +} diff --git a/.gen/com/uber/cadence/entities/ListTaskListPartitionsResponse.java b/.gen/com/uber/cadence/entities/ListTaskListPartitionsResponse.java new file mode 100644 index 000000000..2eb347926 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListTaskListPartitionsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListTaskListPartitionsResponse { + private List activityTaskListPartitions; + private List decisionTaskListPartitions; +} diff --git a/.gen/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java b/.gen/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java new file mode 100644 index 000000000..a0f60623e --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListWorkflowExecutionsRequest { + private String domain; + private int pageSize; + private byte[] nextPageToken; + private String query; +} diff --git a/.gen/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java b/.gen/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java new file mode 100644 index 000000000..8e673fdfb --- /dev/null +++ b/.gen/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ListWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/.gen/com/uber/cadence/entities/MarkerRecordedEventAttributes.java b/.gen/com/uber/cadence/entities/MarkerRecordedEventAttributes.java new file mode 100644 index 000000000..eec54429a --- /dev/null +++ b/.gen/com/uber/cadence/entities/MarkerRecordedEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class MarkerRecordedEventAttributes { + private String markerName; + private byte[] details; + private long decisionTaskCompletedEventId; + private Header header; +} diff --git a/.gen/com/uber/cadence/entities/Memo.java b/.gen/com/uber/cadence/entities/Memo.java new file mode 100644 index 000000000..8d8326977 --- /dev/null +++ b/.gen/com/uber/cadence/entities/Memo.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class Memo { + private Map fields; +} diff --git a/.gen/com/uber/cadence/entities/ParentClosePolicy.java b/.gen/com/uber/cadence/entities/ParentClosePolicy.java new file mode 100644 index 000000000..ec2721669 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ParentClosePolicy.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum ParentClosePolicy { + ABANDON, + REQUEST_CANCEL, + TERMINATE, +} diff --git a/.gen/com/uber/cadence/entities/PendingActivityInfo.java b/.gen/com/uber/cadence/entities/PendingActivityInfo.java new file mode 100644 index 000000000..091112c0c --- /dev/null +++ b/.gen/com/uber/cadence/entities/PendingActivityInfo.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PendingActivityInfo { + private String activityID; + private ActivityType activityType; + private PendingActivityState state; + private byte[] heartbeatDetails; + private long lastHeartbeatTimestamp; + private long lastStartedTimestamp; + private int attempt; + private int maximumAttempts; + private long scheduledTimestamp; + private long expirationTimestamp; + private String lastFailureReason; + private String lastWorkerIdentity; + private byte[] lastFailureDetails; + private String startedWorkerIdentity; +} diff --git a/.gen/com/uber/cadence/entities/PendingActivityState.java b/.gen/com/uber/cadence/entities/PendingActivityState.java new file mode 100644 index 000000000..414e30958 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PendingActivityState.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum PendingActivityState { + SCHEDULED, + STARTED, + CANCEL_REQUESTED, +} diff --git a/.gen/com/uber/cadence/entities/PendingChildExecutionInfo.java b/.gen/com/uber/cadence/entities/PendingChildExecutionInfo.java new file mode 100644 index 000000000..3d3a3d34e --- /dev/null +++ b/.gen/com/uber/cadence/entities/PendingChildExecutionInfo.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PendingChildExecutionInfo { + private String domain; + private String workflowID; + private String runID; + private String workflowTypName; + private long initiatedID; + private ParentClosePolicy parentClosePolicy; +} diff --git a/.gen/com/uber/cadence/entities/PendingDecisionInfo.java b/.gen/com/uber/cadence/entities/PendingDecisionInfo.java new file mode 100644 index 000000000..262a3934f --- /dev/null +++ b/.gen/com/uber/cadence/entities/PendingDecisionInfo.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PendingDecisionInfo { + private PendingDecisionState state; + private long scheduledTimestamp; + private long startedTimestamp; + private long attempt; + private long originalScheduledTimestamp; +} diff --git a/.gen/com/uber/cadence/entities/PendingDecisionState.java b/.gen/com/uber/cadence/entities/PendingDecisionState.java new file mode 100644 index 000000000..e9e42c7d2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PendingDecisionState.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum PendingDecisionState { + SCHEDULED, + STARTED, +} diff --git a/.gen/com/uber/cadence/entities/PollForActivityTaskRequest.java b/.gen/com/uber/cadence/entities/PollForActivityTaskRequest.java new file mode 100644 index 000000000..83e0e8293 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PollForActivityTaskRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PollForActivityTaskRequest { + private String domain; + private TaskList taskList; + private String identity; + private TaskListMetadata taskListMetadata; +} diff --git a/.gen/com/uber/cadence/entities/PollForActivityTaskResponse.java b/.gen/com/uber/cadence/entities/PollForActivityTaskResponse.java new file mode 100644 index 000000000..7d8be89ec --- /dev/null +++ b/.gen/com/uber/cadence/entities/PollForActivityTaskResponse.java @@ -0,0 +1,48 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PollForActivityTaskResponse { + private byte[] taskToken; + private WorkflowExecution workflowExecution; + private String activityId; + private ActivityType activityType; + private byte[] input; + private long scheduledTimestamp; + private int scheduleToCloseTimeoutSeconds; + private long startedTimestamp; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private int attempt; + private long scheduledTimestampOfThisAttempt; + private byte[] heartbeatDetails; + private WorkflowType workflowType; + private String workflowDomain; + private Header header; +} diff --git a/.gen/com/uber/cadence/entities/PollForDecisionTaskRequest.java b/.gen/com/uber/cadence/entities/PollForDecisionTaskRequest.java new file mode 100644 index 000000000..40097da71 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PollForDecisionTaskRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PollForDecisionTaskRequest { + private String domain; + private TaskList taskList; + private String identity; + private String binaryChecksum; +} diff --git a/.gen/com/uber/cadence/entities/PollForDecisionTaskResponse.java b/.gen/com/uber/cadence/entities/PollForDecisionTaskResponse.java new file mode 100644 index 000000000..116605724 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PollForDecisionTaskResponse.java @@ -0,0 +1,48 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PollForDecisionTaskResponse { + private byte[] taskToken; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long previousStartedEventId; + private long startedEventId; + private long attempt; + private long backlogCountHint; + private History history; + private byte[] nextPageToken; + private WorkflowQuery query; + private TaskList WorkflowExecutionTaskList; + private long scheduledTimestamp; + private long startedTimestamp; + private Map queries; + private long nextEventId; + private long totalHistoryBytes; +} diff --git a/.gen/com/uber/cadence/entities/PollerInfo.java b/.gen/com/uber/cadence/entities/PollerInfo.java new file mode 100644 index 000000000..3f01ac551 --- /dev/null +++ b/.gen/com/uber/cadence/entities/PollerInfo.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class PollerInfo { + private long lastAccessTime; + private String identity; + private double ratePerSecond; +} diff --git a/.gen/com/uber/cadence/entities/QueryConsistencyLevel.java b/.gen/com/uber/cadence/entities/QueryConsistencyLevel.java new file mode 100644 index 000000000..476940010 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryConsistencyLevel.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum QueryConsistencyLevel { + EVENTUAL, + STRONG, +} diff --git a/.gen/com/uber/cadence/entities/QueryFailedError.java b/.gen/com/uber/cadence/entities/QueryFailedError.java new file mode 100644 index 000000000..7ff187af1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryFailedError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class QueryFailedError extends BaseError { + + public QueryFailedError() { + super(); + } + + public QueryFailedError(String message, Throwable cause) { + super(message, cause); + } + + public QueryFailedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/QueryRejectCondition.java b/.gen/com/uber/cadence/entities/QueryRejectCondition.java new file mode 100644 index 000000000..bfafe66f0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryRejectCondition.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum QueryRejectCondition { + NOT_OPEN, + NOT_COMPLETED_CLEANLY, +} diff --git a/.gen/com/uber/cadence/entities/QueryRejected.java b/.gen/com/uber/cadence/entities/QueryRejected.java new file mode 100644 index 000000000..97145a487 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryRejected.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class QueryRejected { + private WorkflowExecutionCloseStatus closeStatus; +} diff --git a/.gen/com/uber/cadence/entities/QueryResultType.java b/.gen/com/uber/cadence/entities/QueryResultType.java new file mode 100644 index 000000000..c30b9a4c1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryResultType.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum QueryResultType { + ANSWERED, + FAILED, +} diff --git a/.gen/com/uber/cadence/entities/QueryTaskCompletedType.java b/.gen/com/uber/cadence/entities/QueryTaskCompletedType.java new file mode 100644 index 000000000..acf6b1648 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryTaskCompletedType.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum QueryTaskCompletedType { + COMPLETED, + FAILED, +} diff --git a/.gen/com/uber/cadence/entities/QueryWorkflowRequest.java b/.gen/com/uber/cadence/entities/QueryWorkflowRequest.java new file mode 100644 index 000000000..239e30880 --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryWorkflowRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class QueryWorkflowRequest { + private String domain; + private WorkflowExecution execution; + private WorkflowQuery query; + private QueryRejectCondition queryRejectCondition; + private QueryConsistencyLevel queryConsistencyLevel; +} diff --git a/.gen/com/uber/cadence/entities/QueryWorkflowResponse.java b/.gen/com/uber/cadence/entities/QueryWorkflowResponse.java new file mode 100644 index 000000000..6f58cc2ec --- /dev/null +++ b/.gen/com/uber/cadence/entities/QueryWorkflowResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class QueryWorkflowResponse { + private byte[] queryResult; + private QueryRejected queryRejected; +} diff --git a/.gen/com/uber/cadence/entities/ReapplyEventsRequest.java b/.gen/com/uber/cadence/entities/ReapplyEventsRequest.java new file mode 100644 index 000000000..b9ad7c7e0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ReapplyEventsRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ReapplyEventsRequest { + private String domainName; + private WorkflowExecution workflowExecution; + private DataBlob events; +} diff --git a/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java new file mode 100644 index 000000000..aefb3eba0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java new file mode 100644 index 000000000..b5ca72f9b --- /dev/null +++ b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatRequest { + private byte[] taskToken; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java new file mode 100644 index 000000000..d0db059b8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatResponse { + private boolean cancelRequested; +} diff --git a/.gen/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java b/.gen/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java new file mode 100644 index 000000000..c98a9717d --- /dev/null +++ b/.gen/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RecordMarkerDecisionAttributes { + private String markerName; + private byte[] details; + private Header header; +} diff --git a/.gen/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java b/.gen/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java new file mode 100644 index 000000000..160bf5824 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RefreshWorkflowTasksRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/.gen/com/uber/cadence/entities/RegisterDomainRequest.java b/.gen/com/uber/cadence/entities/RegisterDomainRequest.java new file mode 100644 index 000000000..4580d24e5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RegisterDomainRequest.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RegisterDomainRequest { + private String name; + private String description; + private String ownerEmail; + private int workflowExecutionRetentionPeriodInDays; + private boolean emitMetric; + private List clusters; + private String activeClusterName; + private Map data; + private String securityToken; + private boolean isGlobalDomain; + private ArchivalStatus historyArchivalStatus; + private String historyArchivalURI; + private ArchivalStatus visibilityArchivalStatus; + private String visibilityArchivalURI; +} diff --git a/.gen/com/uber/cadence/entities/RemoteSyncMatchedError.java b/.gen/com/uber/cadence/entities/RemoteSyncMatchedError.java new file mode 100644 index 000000000..146d50198 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RemoteSyncMatchedError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class RemoteSyncMatchedError extends BaseError { + + public RemoteSyncMatchedError() { + super(); + } + + public RemoteSyncMatchedError(String message, Throwable cause) { + super(message, cause); + } + + public RemoteSyncMatchedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/RemoveTaskRequest.java b/.gen/com/uber/cadence/entities/RemoveTaskRequest.java new file mode 100644 index 000000000..7464cf8ae --- /dev/null +++ b/.gen/com/uber/cadence/entities/RemoveTaskRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RemoveTaskRequest { + private int shardID; + private int type; + private long taskID; + private long visibilityTimestamp; + private String clusterName; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java b/.gen/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java new file mode 100644 index 000000000..434a94e31 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelActivityTaskDecisionAttributes { + private String activityId; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java b/.gen/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java new file mode 100644 index 000000000..5ce2cc762 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelActivityTaskFailedEventAttributes { + private String activityId; + private String cause; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..aabe737a6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionDecisionAttributes { + private String domain; + private String workflowId; + private String runId; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..801705dd5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionFailedEventAttributes { + private CancelExternalWorkflowExecutionFailedCause cause; + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private long initiatedEventId; + private byte[] control; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..79c7503a6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/.gen/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java new file mode 100644 index 000000000..9dacbece6 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RequestCancelWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String identity; + private String requestId; + private String cause; + private String firstExecutionRunID; +} diff --git a/.gen/com/uber/cadence/entities/ResetPointInfo.java b/.gen/com/uber/cadence/entities/ResetPointInfo.java new file mode 100644 index 000000000..14b58f61e --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetPointInfo.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetPointInfo { + private String binaryChecksum; + private String runId; + private long firstDecisionCompletedId; + private long createdTimeNano; + private long expiringTimeNano; + private boolean resettable; +} diff --git a/.gen/com/uber/cadence/entities/ResetPoints.java b/.gen/com/uber/cadence/entities/ResetPoints.java new file mode 100644 index 000000000..27a1736fa --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetPoints.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetPoints { + private List points; +} diff --git a/.gen/com/uber/cadence/entities/ResetQueueRequest.java b/.gen/com/uber/cadence/entities/ResetQueueRequest.java new file mode 100644 index 000000000..68a362baf --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetQueueRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetQueueRequest { + private int shardID; + private String clusterName; + private int type; +} diff --git a/.gen/com/uber/cadence/entities/ResetStickyTaskListRequest.java b/.gen/com/uber/cadence/entities/ResetStickyTaskListRequest.java new file mode 100644 index 000000000..a63fbe5e3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetStickyTaskListRequest.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetStickyTaskListRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/.gen/com/uber/cadence/entities/ResetStickyTaskListResponse.java b/.gen/com/uber/cadence/entities/ResetStickyTaskListResponse.java new file mode 100644 index 000000000..63a5edc6b --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetStickyTaskListResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetStickyTaskListResponse {} diff --git a/.gen/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java new file mode 100644 index 000000000..258bc5e73 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private long decisionFinishEventId; + private String requestId; + private boolean skipSignalReapply; +} diff --git a/.gen/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java b/.gen/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java new file mode 100644 index 000000000..5b5a24235 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ResetWorkflowExecutionResponse { + private String runId; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java new file mode 100644 index 000000000..339c8ba4e --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskCanceledByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java new file mode 100644 index 000000000..7b55f28d3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskCanceledRequest { + private byte[] taskToken; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java new file mode 100644 index 000000000..1fb26b920 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskCompletedByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] result; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java new file mode 100644 index 000000000..16f454d1e --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskCompletedRequest { + private byte[] taskToken; + private byte[] result; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java new file mode 100644 index 000000000..8a336845d --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskFailedByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private String reason; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java b/.gen/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java new file mode 100644 index 000000000..5cbe4019c --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondActivityTaskFailedRequest { + private byte[] taskToken; + private String reason; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java b/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java new file mode 100644 index 000000000..8f12aef2b --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondCrossClusterTasksCompletedRequest { + private int shardID; + private String targetCluster; + private List taskResponses; + private boolean fetchNewTasks; +} diff --git a/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java b/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java new file mode 100644 index 000000000..5c05023bd --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondCrossClusterTasksCompletedResponse { + private List tasks; +} diff --git a/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java b/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java new file mode 100644 index 000000000..1b86d63f5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondDecisionTaskCompletedRequest { + private byte[] taskToken; + private List decisions; + private byte[] executionContext; + private String identity; + private StickyExecutionAttributes stickyAttributes; + private boolean returnNewDecisionTask; + private boolean forceCreateNewDecisionTask; + private String binaryChecksum; + private Map queryResults; +} diff --git a/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java b/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java new file mode 100644 index 000000000..a1173aa3f --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondDecisionTaskCompletedResponse { + private PollForDecisionTaskResponse decisionTask; + private Map activitiesToDispatchLocally; +} diff --git a/.gen/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java b/.gen/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java new file mode 100644 index 000000000..ec85b1cd5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondDecisionTaskFailedRequest { + private byte[] taskToken; + private DecisionTaskFailedCause cause; + private byte[] details; + private String identity; + private String binaryChecksum; +} diff --git a/.gen/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java b/.gen/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java new file mode 100644 index 000000000..9807b2689 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RespondQueryTaskCompletedRequest { + private byte[] taskToken; + private QueryTaskCompletedType completedType; + private byte[] queryResult; + private String errorMessage; + private WorkerVersionInfo workerVersionInfo; +} diff --git a/.gen/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java new file mode 100644 index 000000000..5ef3a3f15 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RestartWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java b/.gen/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java new file mode 100644 index 000000000..1ce6fa5db --- /dev/null +++ b/.gen/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RestartWorkflowExecutionResponse { + private String runId; +} diff --git a/.gen/com/uber/cadence/entities/RetryPolicy.java b/.gen/com/uber/cadence/entities/RetryPolicy.java new file mode 100644 index 000000000..bfba5bb81 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RetryPolicy.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class RetryPolicy { + private int initialIntervalInSeconds; + private double backoffCoefficient; + private int maximumIntervalInSeconds; + private int maximumAttempts; + private List nonRetriableErrorReasons; + private int expirationIntervalInSeconds; +} diff --git a/.gen/com/uber/cadence/entities/RetryTaskV2Error.java b/.gen/com/uber/cadence/entities/RetryTaskV2Error.java new file mode 100644 index 000000000..7d3a02797 --- /dev/null +++ b/.gen/com/uber/cadence/entities/RetryTaskV2Error.java @@ -0,0 +1,55 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class RetryTaskV2Error extends BaseError { + private String domainId; + private String workflowId; + private String runId; + private long startEventId; + private long startEventVersion; + private long endEventId; + private long endEventVersion; + + public RetryTaskV2Error() { + super(); + } + + public RetryTaskV2Error(String message, Throwable cause) { + super(message, cause); + } + + public RetryTaskV2Error(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java b/.gen/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java new file mode 100644 index 000000000..82791a034 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java @@ -0,0 +1,44 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class ScheduleActivityTaskDecisionAttributes { + private String activityId; + private ActivityType activityType; + private String domain; + private TaskList taskList; + private byte[] input; + private int scheduleToCloseTimeoutSeconds; + private int scheduleToStartTimeoutSeconds; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private RetryPolicy retryPolicy; + private Header header; + private boolean requestLocalDispatch; +} diff --git a/.gen/com/uber/cadence/entities/SearchAttributes.java b/.gen/com/uber/cadence/entities/SearchAttributes.java new file mode 100644 index 000000000..ab1d99134 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SearchAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SearchAttributes { + private Map indexedFields; +} diff --git a/.gen/com/uber/cadence/entities/ServiceBusyError.java b/.gen/com/uber/cadence/entities/ServiceBusyError.java new file mode 100644 index 000000000..e0a8ec430 --- /dev/null +++ b/.gen/com/uber/cadence/entities/ServiceBusyError.java @@ -0,0 +1,49 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class ServiceBusyError extends BaseError { + private String reason; + + public ServiceBusyError() { + super(); + } + + public ServiceBusyError(String message, Throwable cause) { + super(message, cause); + } + + public ServiceBusyError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..82634d69b --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionDecisionAttributes { + private String domain; + private WorkflowExecution execution; + private String signalName; + private byte[] input; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..c395343f8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum SignalExternalWorkflowExecutionFailedCause { + UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION, + WORKFLOW_ALREADY_COMPLETED, +} diff --git a/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..c20eecef8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionFailedEventAttributes { + private SignalExternalWorkflowExecutionFailedCause cause; + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private long initiatedEventId; + private byte[] control; +} diff --git a/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..651c234b4 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionInitiatedEventAttributes { + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private String signalName; + private byte[] input; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java new file mode 100644 index 000000000..08e1b45d2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionAsyncRequest { + private SignalWithStartWorkflowExecutionRequest request; +} diff --git a/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java new file mode 100644 index 000000000..15a9eda90 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionAsyncResponse {} diff --git a/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java new file mode 100644 index 000000000..70f5f413a --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java @@ -0,0 +1,52 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionRequest { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String identity; + private String requestId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private String signalName; + private byte[] signalInput; + private byte[] control; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Memo memo; + private SearchAttributes searchAttributes; + private Header header; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/.gen/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java new file mode 100644 index 000000000..574ff04f7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SignalWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String signalName; + private byte[] input; + private String identity; + private String requestId; + private byte[] control; +} diff --git a/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..c620aa74c --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,47 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionDecisionAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private ParentClosePolicy parentClosePolicy; + private byte[] control; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; +} diff --git a/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..0b9d9c550 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionFailedEventAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private ChildWorkflowExecutionFailedCause cause; + private byte[] control; + private long initiatedEventId; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..145306b09 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,50 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionInitiatedEventAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private ParentClosePolicy parentClosePolicy; + private byte[] control; + private long decisionTaskCompletedEventId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/.gen/com/uber/cadence/entities/StartTimeFilter.java b/.gen/com/uber/cadence/entities/StartTimeFilter.java new file mode 100644 index 000000000..858a2437a --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartTimeFilter.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartTimeFilter { + private long earliestTime; + private long latestTime; +} diff --git a/.gen/com/uber/cadence/entities/StartTimerDecisionAttributes.java b/.gen/com/uber/cadence/entities/StartTimerDecisionAttributes.java new file mode 100644 index 000000000..b807d6154 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartTimerDecisionAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartTimerDecisionAttributes { + private String timerId; + private long startToFireTimeoutSeconds; +} diff --git a/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java b/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java new file mode 100644 index 000000000..4acda2abe --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionAsyncRequest { + private StartWorkflowExecutionRequest request; +} diff --git a/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java b/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java new file mode 100644 index 000000000..8eefe3042 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionAsyncResponse {} diff --git a/.gen/com/uber/cadence/entities/StartWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/StartWorkflowExecutionRequest.java new file mode 100644 index 000000000..1a77b0d6c --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartWorkflowExecutionRequest.java @@ -0,0 +1,49 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionRequest { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String identity; + private String requestId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Memo memo; + private SearchAttributes searchAttributes; + private Header header; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/.gen/com/uber/cadence/entities/StartWorkflowExecutionResponse.java b/.gen/com/uber/cadence/entities/StartWorkflowExecutionResponse.java new file mode 100644 index 000000000..01d47cfd7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StartWorkflowExecutionResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionResponse { + private String runId; +} diff --git a/.gen/com/uber/cadence/entities/StickyExecutionAttributes.java b/.gen/com/uber/cadence/entities/StickyExecutionAttributes.java new file mode 100644 index 000000000..a8c1241d5 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StickyExecutionAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class StickyExecutionAttributes { + private TaskList workerTaskList; + private int scheduleToStartTimeoutSeconds; +} diff --git a/.gen/com/uber/cadence/entities/StickyWorkerUnavailableError.java b/.gen/com/uber/cadence/entities/StickyWorkerUnavailableError.java new file mode 100644 index 000000000..9c711ca51 --- /dev/null +++ b/.gen/com/uber/cadence/entities/StickyWorkerUnavailableError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class StickyWorkerUnavailableError extends BaseError { + + public StickyWorkerUnavailableError() { + super(); + } + + public StickyWorkerUnavailableError(String message, Throwable cause) { + super(message, cause); + } + + public StickyWorkerUnavailableError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/SupportedClientVersions.java b/.gen/com/uber/cadence/entities/SupportedClientVersions.java new file mode 100644 index 000000000..f6f093be3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/SupportedClientVersions.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class SupportedClientVersions { + private String goSdk; + private String javaSdk; +} diff --git a/.gen/com/uber/cadence/entities/TaskIDBlock.java b/.gen/com/uber/cadence/entities/TaskIDBlock.java new file mode 100644 index 000000000..7d2028c17 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskIDBlock.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TaskIDBlock { + private long startID; + private long endID; +} diff --git a/.gen/com/uber/cadence/entities/TaskList.java b/.gen/com/uber/cadence/entities/TaskList.java new file mode 100644 index 000000000..af1c5ae0e --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskList.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TaskList { + private String name; + private TaskListKind kind; +} diff --git a/.gen/com/uber/cadence/entities/TaskListKind.java b/.gen/com/uber/cadence/entities/TaskListKind.java new file mode 100644 index 000000000..16384c325 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskListKind.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum TaskListKind { + NORMAL, + STICKY, +} diff --git a/.gen/com/uber/cadence/entities/TaskListMetadata.java b/.gen/com/uber/cadence/entities/TaskListMetadata.java new file mode 100644 index 000000000..5bfa6a091 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskListMetadata.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TaskListMetadata { + private double maxTasksPerSecond; +} diff --git a/.gen/com/uber/cadence/entities/TaskListPartitionMetadata.java b/.gen/com/uber/cadence/entities/TaskListPartitionMetadata.java new file mode 100644 index 000000000..f20905ed3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskListPartitionMetadata.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TaskListPartitionMetadata { + private String key; + private String ownerHostName; +} diff --git a/.gen/com/uber/cadence/entities/TaskListStatus.java b/.gen/com/uber/cadence/entities/TaskListStatus.java new file mode 100644 index 000000000..62526f570 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskListStatus.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TaskListStatus { + private long backlogCountHint; + private long readLevel; + private long ackLevel; + private double ratePerSecond; + private TaskIDBlock taskIDBlock; +} diff --git a/.gen/com/uber/cadence/entities/TaskListType.java b/.gen/com/uber/cadence/entities/TaskListType.java new file mode 100644 index 000000000..334a8dc47 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TaskListType.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum TaskListType { + Decision, + Activity, +} diff --git a/.gen/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java b/.gen/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java new file mode 100644 index 000000000..b81aa015b --- /dev/null +++ b/.gen/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TerminateWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private byte[] details; + private String identity; + private String firstExecutionRunID; +} diff --git a/.gen/com/uber/cadence/entities/TimeoutType.java b/.gen/com/uber/cadence/entities/TimeoutType.java new file mode 100644 index 000000000..7957a665a --- /dev/null +++ b/.gen/com/uber/cadence/entities/TimeoutType.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum TimeoutType { + START_TO_CLOSE, + SCHEDULE_TO_START, + SCHEDULE_TO_CLOSE, + HEARTBEAT, +} diff --git a/.gen/com/uber/cadence/entities/TimerCanceledEventAttributes.java b/.gen/com/uber/cadence/entities/TimerCanceledEventAttributes.java new file mode 100644 index 000000000..11792af39 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TimerCanceledEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TimerCanceledEventAttributes { + private String timerId; + private long startedEventId; + private long decisionTaskCompletedEventId; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/TimerFiredEventAttributes.java b/.gen/com/uber/cadence/entities/TimerFiredEventAttributes.java new file mode 100644 index 000000000..87b2161e1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/TimerFiredEventAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TimerFiredEventAttributes { + private String timerId; + private long startedEventId; +} diff --git a/.gen/com/uber/cadence/entities/TimerStartedEventAttributes.java b/.gen/com/uber/cadence/entities/TimerStartedEventAttributes.java new file mode 100644 index 000000000..d1333ec1d --- /dev/null +++ b/.gen/com/uber/cadence/entities/TimerStartedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TimerStartedEventAttributes { + private String timerId; + private long startToFireTimeoutSeconds; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/TransientDecisionInfo.java b/.gen/com/uber/cadence/entities/TransientDecisionInfo.java new file mode 100644 index 000000000..e4eccd11b --- /dev/null +++ b/.gen/com/uber/cadence/entities/TransientDecisionInfo.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class TransientDecisionInfo { + private HistoryEvent scheduledEvent; + private HistoryEvent startedEvent; +} diff --git a/.gen/com/uber/cadence/entities/UpdateDomainInfo.java b/.gen/com/uber/cadence/entities/UpdateDomainInfo.java new file mode 100644 index 000000000..7a4757688 --- /dev/null +++ b/.gen/com/uber/cadence/entities/UpdateDomainInfo.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class UpdateDomainInfo { + private String description; + private String ownerEmail; + private Map data; +} diff --git a/.gen/com/uber/cadence/entities/UpdateDomainRequest.java b/.gen/com/uber/cadence/entities/UpdateDomainRequest.java new file mode 100644 index 000000000..fc7a26804 --- /dev/null +++ b/.gen/com/uber/cadence/entities/UpdateDomainRequest.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class UpdateDomainRequest { + private String name; + private UpdateDomainInfo updatedInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private String securityToken; + private String deleteBadBinary; + private int failoverTimeoutInSeconds; +} diff --git a/.gen/com/uber/cadence/entities/UpdateDomainResponse.java b/.gen/com/uber/cadence/entities/UpdateDomainResponse.java new file mode 100644 index 000000000..a8c386bfc --- /dev/null +++ b/.gen/com/uber/cadence/entities/UpdateDomainResponse.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class UpdateDomainResponse { + private DomainInfo domainInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private long failoverVersion; + private boolean isGlobalDomain; +} diff --git a/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java b/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java new file mode 100644 index 000000000..cb9af76e0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class UpsertWorkflowSearchAttributesDecisionAttributes { + private SearchAttributes searchAttributes; +} diff --git a/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java b/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java new file mode 100644 index 000000000..3ed2b3b96 --- /dev/null +++ b/.gen/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class UpsertWorkflowSearchAttributesEventAttributes { + private long decisionTaskCompletedEventId; + private SearchAttributes searchAttributes; +} diff --git a/.gen/com/uber/cadence/entities/VersionHistories.java b/.gen/com/uber/cadence/entities/VersionHistories.java new file mode 100644 index 000000000..0cf8a7ff3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/VersionHistories.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class VersionHistories { + private int currentVersionHistoryIndex; + private List histories; +} diff --git a/.gen/com/uber/cadence/entities/VersionHistory.java b/.gen/com/uber/cadence/entities/VersionHistory.java new file mode 100644 index 000000000..0c9c2ac73 --- /dev/null +++ b/.gen/com/uber/cadence/entities/VersionHistory.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class VersionHistory { + private byte[] branchToken; + private List items; +} diff --git a/.gen/com/uber/cadence/entities/VersionHistoryItem.java b/.gen/com/uber/cadence/entities/VersionHistoryItem.java new file mode 100644 index 000000000..ffb21a86c --- /dev/null +++ b/.gen/com/uber/cadence/entities/VersionHistoryItem.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class VersionHistoryItem { + private long eventID; + private long version; +} diff --git a/.gen/com/uber/cadence/entities/WorkerVersionInfo.java b/.gen/com/uber/cadence/entities/WorkerVersionInfo.java new file mode 100644 index 000000000..6038ee4e7 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkerVersionInfo.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkerVersionInfo { + private String impl; + private String featureVersion; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecution.java b/.gen/com/uber/cadence/entities/WorkflowExecution.java new file mode 100644 index 000000000..bece219e9 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecution.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecution { + private String workflowId; + private String runId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java b/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java new file mode 100644 index 000000000..e3246ccf3 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java @@ -0,0 +1,46 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +public class WorkflowExecutionAlreadyCompletedError extends BaseError { + + public WorkflowExecutionAlreadyCompletedError() { + super(); + } + + public WorkflowExecutionAlreadyCompletedError(String message, Throwable cause) { + super(message, cause); + } + + public WorkflowExecutionAlreadyCompletedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java b/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java new file mode 100644 index 000000000..ce4b4e3d2 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java @@ -0,0 +1,50 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class WorkflowExecutionAlreadyStartedError extends BaseError { + private String startRequestId; + private String runId; + + public WorkflowExecutionAlreadyStartedError() { + super(); + } + + public WorkflowExecutionAlreadyStartedError(String message, Throwable cause) { + super(message, cause); + } + + public WorkflowExecutionAlreadyStartedError(Throwable cause) { + super(cause); + } +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java new file mode 100644 index 000000000..0829d892f --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java @@ -0,0 +1,37 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionCancelRequestedEventAttributes { + private String cause; + private long externalInitiatedEventId; + private WorkflowExecution externalWorkflowExecution; + private String identity; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java new file mode 100644 index 000000000..f267e02a1 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionCanceledEventAttributes { + private long decisionTaskCompletedEventId; + private byte[] details; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java b/.gen/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java new file mode 100644 index 000000000..1fc84415e --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java @@ -0,0 +1,32 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum WorkflowExecutionCloseStatus { + COMPLETED, + FAILED, + CANCELED, + TERMINATED, + CONTINUED_AS_NEW, + TIMED_OUT, +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java new file mode 100644 index 000000000..9b00e5a67 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionCompletedEventAttributes { + private byte[] result; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionConfiguration.java b/.gen/com/uber/cadence/entities/WorkflowExecutionConfiguration.java new file mode 100644 index 000000000..8fbf37fe0 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionConfiguration.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionConfiguration { + private TaskList taskList; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java new file mode 100644 index 000000000..8c5befd1c --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java @@ -0,0 +1,47 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionContinuedAsNewEventAttributes { + private String newExecutionRunId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private long decisionTaskCompletedEventId; + private int backoffStartIntervalInSeconds; + private ContinueAsNewInitiator initiator; + private String failureReason; + private byte[] failureDetails; + private byte[] lastCompletionResult; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..b54988a38 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionFailedEventAttributes { + private String reason; + private byte[] details; + private long decisionTaskCompletedEventId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionFilter.java b/.gen/com/uber/cadence/entities/WorkflowExecutionFilter.java new file mode 100644 index 000000000..1cca49abb --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionFilter.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionFilter { + private String workflowId; + private String runId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionInfo.java b/.gen/com/uber/cadence/entities/WorkflowExecutionInfo.java new file mode 100644 index 000000000..ec9206782 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionInfo.java @@ -0,0 +1,50 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionInfo { + private WorkflowExecution execution; + private WorkflowType type; + private long startTime; + private long closeTime; + private WorkflowExecutionCloseStatus closeStatus; + private long historyLength; + private String parentDomainId; + private String parentDomainName; + private long parentInitatedId; + private WorkflowExecution parentExecution; + private long executionTime; + private Memo memo; + private SearchAttributes searchAttributes; + private ResetPoints autoResetPoints; + private String taskList; + private boolean isCron; + private long updateTime; + private Map partitionConfig; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java new file mode 100644 index 000000000..994ad2c9d --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionSignaledEventAttributes { + private String signalName; + private byte[] input; + private String identity; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java new file mode 100644 index 000000000..4d95ded35 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java @@ -0,0 +1,60 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionStartedEventAttributes { + private WorkflowType workflowType; + private String parentWorkflowDomain; + private WorkflowExecution parentWorkflowExecution; + private long parentInitiatedEventId; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String continuedExecutionRunId; + private ContinueAsNewInitiator initiator; + private String continuedFailureReason; + private byte[] continuedFailureDetails; + private byte[] lastCompletionResult; + private String originalExecutionRunId; + private String identity; + private String firstExecutionRunId; + private long firstScheduledTimeNano; + private RetryPolicy retryPolicy; + private int attempt; + private long expirationTimestamp; + private String cronSchedule; + private int firstDecisionTaskBackoffSeconds; + private Memo memo; + private SearchAttributes searchAttributes; + private ResetPoints prevAutoResetPoints; + private Header header; + private Map partitionConfig; + private String requestId; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java new file mode 100644 index 000000000..4d582cefe --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionTerminatedEventAttributes { + private String reason; + private byte[] details; + private String identity; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java b/.gen/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java new file mode 100644 index 000000000..51eef95bc --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowExecutionTimedOutEventAttributes { + private TimeoutType timeoutType; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowIdReusePolicy.java b/.gen/com/uber/cadence/entities/WorkflowIdReusePolicy.java new file mode 100644 index 000000000..239a45a94 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowIdReusePolicy.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +public enum WorkflowIdReusePolicy { + AllowDuplicateFailedOnly, + AllowDuplicate, + RejectDuplicate, + TerminateIfRunning, +} diff --git a/.gen/com/uber/cadence/entities/WorkflowQuery.java b/.gen/com/uber/cadence/entities/WorkflowQuery.java new file mode 100644 index 000000000..91287e676 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowQuery.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowQuery { + private String queryType; + private byte[] queryArgs; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowQueryResult.java b/.gen/com/uber/cadence/entities/WorkflowQueryResult.java new file mode 100644 index 000000000..d598717b8 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowQueryResult.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowQueryResult { + private QueryResultType resultType; + private byte[] answer; + private String errorMessage; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowType.java b/.gen/com/uber/cadence/entities/WorkflowType.java new file mode 100644 index 000000000..b0f36a87b --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowType.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowType { + private String name; +} diff --git a/.gen/com/uber/cadence/entities/WorkflowTypeFilter.java b/.gen/com/uber/cadence/entities/WorkflowTypeFilter.java new file mode 100644 index 000000000..509b9c523 --- /dev/null +++ b/.gen/com/uber/cadence/entities/WorkflowTypeFilter.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * DO NOT EDIT THIS FILE. + * + *

This file is generated by cadence-idl custom generator for simple java entity + * + *

If you want to change the code, please modify the generator. + * https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator + */ +@Data +@Accessors(chain = true) +public class WorkflowTypeFilter { + private String name; +} diff --git a/build.gradle b/build.gradle index 22dc4466f..028834d6d 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ googleJavaFormat { exclude '**/generated-sources/*' } -tasks.googleJavaFormat.dependsOn 'license' +tasks.googleJavaFormat.dependsOn 'licenseFormat' group = 'com.uber.cadence' @@ -89,6 +89,10 @@ dependencies { compile group: 'com.google.api.grpc', name: 'proto-google-common-protos', version: '2.10.0' compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.21.9' compile group: 'com.google.oauth-client', name: 'google-oauth-client', version: '1.35.0' + compileOnly 'org.projectlombok:lombok:1.18.30' + annotationProcessor 'org.projectlombok:lombok:1.18.30' + testCompileOnly 'org.projectlombok:lombok:1.18.30' + testAnnotationProcessor 'org.projectlombok:lombok:1.18.30' implementation 'io.grpc:grpc-netty-shaded:1.54.2' implementation 'io.grpc:grpc-protobuf:1.54.2' @@ -139,6 +143,7 @@ sourceSets { } java { srcDir 'src/main' + srcDir 'src/gen/java' } } } diff --git a/scripts/v4_entity_generator/generator.go b/scripts/v4_entity_generator/generator.go new file mode 100644 index 000000000..d6f37373c --- /dev/null +++ b/scripts/v4_entity_generator/generator.go @@ -0,0 +1,304 @@ +package main + +import ( + "fmt" + "log" + "os" + "strings" + "sync" + "text/template" + + "go.uber.org/thriftrw/ast" + "go.uber.org/thriftrw/idl" +) + +const ( + baseExceptionClassName = "BaseError" +) + +type Field struct { + Name string + Type string +} + +type TemplateEntity struct { + PackageName string + ClassName string + Fields []Field +} + +type TemplateEnum struct { + PackageName string + ClassName string + Fields []string +} + +type TemplateException struct { + PackageName string + ClassName string + Fields []Field + BaseExceptionClassName string +} + +type TemplateBaseException struct { + PackageName string + ClassName string +} + +type Generator struct { + tmplStruct *template.Template + tmplEnum *template.Template + tmplException *template.Template + tmplBaseException *template.Template + log *log.Logger +} + +func NewGenerator() *Generator { + return &Generator{ + tmplStruct: template.Must(template.ParseFiles("./template/java_struct.tmpl")), + tmplEnum: template.Must(template.ParseFiles("./template/java_enum.tmpl")), + tmplException: template.Must(template.ParseFiles("./template/java_exception.tmpl")), + tmplBaseException: template.Must(template.ParseFiles("./template/java_base_exception.tmpl")), + log: log.New(os.Stdout, "", log.LstdFlags), + } +} + +func (g *Generator) Generate(input string, outputDir string, packageNameOverride string) error { + config := &idl.Config{} + + content, err := os.ReadFile(input) + if err != nil { + return fmt.Errorf("failed to read file: %w", err) + } + + program, err := config.Parse(content) + if err != nil { + return fmt.Errorf("failed to parse file: %w", err) + } + + packageName := packageNameOverride + if packageName == "" { + packageName, err = getPackageName(program) + if err != nil { + return fmt.Errorf("failed to get package name: %w", err) + } + } + outputDir = fmt.Sprintf("%s/%s", outputDir, strings.ReplaceAll(packageName, ".", "/")) + + err = os.MkdirAll(outputDir, 0755) + if err != nil { + return fmt.Errorf("failed to create output directory: %w", err) + } + + ast.Walk(ast.VisitorFunc(func(w ast.Walker, n ast.Node) { + var err error + switch v:=n.(type) { + case *ast.Struct: + switch v.Type { + case ast.ExceptionType: + err = g.generateException(v, outputDir, packageName) + case ast.StructType: + err = g.generateStruct(v, outputDir, packageName) + } + case *ast.Enum: + err = g.generateEnum(v, outputDir, packageName) + } + if err != nil { + g.log.Fatalf("failed to generate: %v", err) + } + }), program) + return nil +} + +func (g *Generator) generateStruct(v *ast.Struct, outputDir string, packageName string) error { + fields := make([]Field, 0) + for _, field := range v.Fields { + typeStr, err := typeMapper(field.Type, true) + if err != nil { + return fmt.Errorf("failed to map field type: %w", err) + } + + fields = append(fields, Field{ + Name: field.Name, + Type: typeStr, + }) + } + + data := TemplateEntity{ + PackageName: packageName, + ClassName: v.Name, + Fields: fields, + } + + outputFile := fmt.Sprintf("%s/%s.java", outputDir, v.Name) + f, err := os.Create(outputFile) + if err != nil { + return fmt.Errorf("failed to create file: %w", err) + } + defer f.Close() + + if err := g.tmplStruct.Execute(f, data); err != nil { + + return fmt.Errorf("failed to execute template: %w", err) + } + + return nil +} + +func (g *Generator) generateException(v *ast.Struct, outputDir string, packageName string) error { + var once sync.Once + once.Do(func(){ + err := g.generateBaseException(baseExceptionClassName, outputDir, packageName) + if err != nil { + g.log.Fatalf("failed to generate base exception: %v", err) + } + }) + + fields := make([]Field, 0) + for _, field := range v.Fields { + if field.Name == "message" { // skip on message field, it is already in the base exception + continue + } + typeStr, err := typeMapper(field.Type, true) + if err != nil { + return fmt.Errorf("failed to map field type: %w", err) + } + fields = append(fields, Field{ + Name: field.Name, + Type: typeStr, + }) + } + + data := TemplateException{ + PackageName: packageName, + ClassName: v.Name, + Fields: fields, + BaseExceptionClassName: baseExceptionClassName, + } + + outputFile := fmt.Sprintf("%s/%s.java", outputDir, v.Name) + f, err := os.Create(outputFile) + if err != nil { + return fmt.Errorf("failed to create file: %w", err) + } + defer f.Close() + + if err := g.tmplException.Execute(f, data); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + return nil +} + +func (g *Generator) generateBaseException(className string, outputDir string, packageName string) error { + data := TemplateBaseException{ + PackageName: packageName, + ClassName: className, + } + + outputFile := fmt.Sprintf("%s/%s.java", outputDir, className) + f, err := os.Create(outputFile) + if err != nil { + return fmt.Errorf("failed to create file: %w", err) + } + defer f.Close() + + if err := g.tmplBaseException.Execute(f, data); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + return nil +} + +func (g *Generator) generateEnum(v *ast.Enum, outputDir string, packageName string) error { + data := TemplateEnum{ + PackageName: packageName, + ClassName: v.Name, + } + for _, item := range v.Items { + data.Fields = append(data.Fields, item.Name) + } + + outputFile := fmt.Sprintf("%s/%s.java", outputDir, v.Name) + f, err := os.Create(outputFile) + if err != nil { + return fmt.Errorf("failed to create file: %w", err) + } + defer f.Close() + + if err := g.tmplEnum.Execute(f, data); err != nil { + return fmt.Errorf("failed to execute template: %w", err) + } + return nil +} + +func getPackageName(program *ast.Program) (string, error) { + for _, header := range program.Headers { + if header, ok := header.(*ast.Namespace); ok && header.Scope == "java" { + return header.Name, nil + } + } + return "", fmt.Errorf("cannot find package name in the thrift file") +} + +func typeMapper(t ast.Type, usePrimitive bool) (string, error) { + switch tt :=t.(type) { + case ast.BaseType: + return baseTypeMapper(tt, usePrimitive) + case ast.MapType: + keyType, err := typeMapper(tt.KeyType, false) + if err != nil { + return "", fmt.Errorf("failed to map key type: %w", err) + } + valueType, err := typeMapper(tt.ValueType, false) + if err != nil { + return "", fmt.Errorf("failed to map value type: %w", err) + } + return "Map<" + keyType + ", " + valueType + ">", nil + case ast.ListType: + valueType, err := typeMapper(tt.ValueType, false) + if err != nil { + return "", fmt.Errorf("failed to map value type: %w", err) + } + return "List<" + valueType + ">", nil + case ast.SetType: + valueType, err := typeMapper(tt.ValueType, false) + if err != nil { + return "", fmt.Errorf("failed to map value type: %w", err) + } + return "Set<" + valueType + ">", nil + case ast.TypeReference: + return tt.Name, nil + default: + return "", fmt.Errorf("do not support type: %v", tt) + } +} + +func baseTypeMapper(t ast.BaseType, usePrimitive bool) (string, error) { + switch t.ID { + case ast.BoolTypeID: + if usePrimitive { + return "boolean", nil + } + return "Boolean", nil + case ast.I8TypeID, ast.I16TypeID, ast.I32TypeID: + if usePrimitive { + return "int", nil + } + return "Integer", nil + case ast.I64TypeID: + if usePrimitive { + return "long", nil + } + return "Long", nil + case ast.DoubleTypeID: + if usePrimitive { + return "double", nil + } + return "Double", nil + case ast.StringTypeID: + return "String", nil + case ast.BinaryTypeID: + return "byte[]", nil + default: + return "", fmt.Errorf("unknown base type: %v", t.ID) + } +} diff --git a/scripts/v4_entity_generator/go.mod b/scripts/v4_entity_generator/go.mod new file mode 100644 index 000000000..6cc75868b --- /dev/null +++ b/scripts/v4_entity_generator/go.mod @@ -0,0 +1,5 @@ +module github.com/uber/cadence-idl/java/generator + +go 1.18 + +require go.uber.org/thriftrw v1.32.0 diff --git a/scripts/v4_entity_generator/go.sum b/scripts/v4_entity_generator/go.sum new file mode 100644 index 000000000..c69fc06fd --- /dev/null +++ b/scripts/v4_entity_generator/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +go.uber.org/thriftrw v1.32.0 h1:/d9SS3H0V0lwm5cVcPI29V7EGDWHQQARGLYKeyhzRAM= +go.uber.org/thriftrw v1.32.0/go.mod h1:MTXuf4RAB2SbjKgyvt7PF2SnuLJ8IYajpg8yBo3rEUI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/scripts/v4_entity_generator/main.go b/scripts/v4_entity_generator/main.go new file mode 100644 index 000000000..5801c63fb --- /dev/null +++ b/scripts/v4_entity_generator/main.go @@ -0,0 +1,9 @@ +package main + +import "fmt" + +func main() { + if err := NewGenerator().Generate("../../src/main/idls/thrift/shared.thrift", "../../src/gen/java", "com.uber.cadence.entities"); err != nil { + panic(fmt.Sprintf("failed to generate: %v", err)) + } +} diff --git a/scripts/v4_entity_generator/template/java_base_exception.tmpl b/scripts/v4_entity_generator/template/java_base_exception.tmpl new file mode 100644 index 000000000..97c8525fb --- /dev/null +++ b/scripts/v4_entity_generator/template/java_base_exception.tmpl @@ -0,0 +1,19 @@ +package {{.PackageName}}; + +public class {{.ClassName}} extends RuntimeException { + public {{.ClassName}}() { + super(); + } + + public {{.ClassName}}(String message) { + super(message); + } + + public {{.ClassName}}(String message, Throwable cause) { + super(message, cause); + } + + public {{.ClassName}}(Throwable cause) { + super(cause); + } +} diff --git a/scripts/v4_entity_generator/template/java_enum.tmpl b/scripts/v4_entity_generator/template/java_enum.tmpl new file mode 100644 index 000000000..aae6928dc --- /dev/null +++ b/scripts/v4_entity_generator/template/java_enum.tmpl @@ -0,0 +1,7 @@ +package {{.PackageName}}; + +public enum {{.ClassName}} { + {{- range .Fields}} + {{.}}, + {{- end}} +} diff --git a/scripts/v4_entity_generator/template/java_exception.tmpl b/scripts/v4_entity_generator/template/java_exception.tmpl new file mode 100644 index 000000000..55d7f62cb --- /dev/null +++ b/scripts/v4_entity_generator/template/java_exception.tmpl @@ -0,0 +1,29 @@ +package {{.PackageName}}; + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; +import lombok.AllArgsConstructor; +import java.util.*; + +@Getter +@Setter +@Accessors(chain = true) +{{- if .Fields}}@AllArgsConstructor{{- end}} +public class {{.ClassName}} extends {{.BaseExceptionClassName}} { + {{- range .Fields}} + private {{.Type}} {{.Name}}; + {{- end}} + + public {{.ClassName}}() { + super(); + } + + public {{.ClassName}}(String message, Throwable cause) { + super(message, cause); + } + + public {{.ClassName}}(Throwable cause) { + super(cause); + } +} diff --git a/scripts/v4_entity_generator/template/java_struct.tmpl b/scripts/v4_entity_generator/template/java_struct.tmpl new file mode 100644 index 000000000..a99a60a2f --- /dev/null +++ b/scripts/v4_entity_generator/template/java_struct.tmpl @@ -0,0 +1,13 @@ +package {{.PackageName}}; + +import lombok.Data; +import lombok.experimental.Accessors; +import java.util.*; + +@Data +@Accessors(chain = true) +public class {{.ClassName}} { + {{- range .Fields}} + private {{.Type}} {{.Name}}; + {{- end}} +} diff --git a/src/gen/java/com/uber/cadence/entities/AccessDeniedError.java b/src/gen/java/com/uber/cadence/entities/AccessDeniedError.java new file mode 100644 index 000000000..66f62abc7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/AccessDeniedError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class AccessDeniedError extends BaseError { + + public AccessDeniedError() { + super(); + } + + public AccessDeniedError(String message, Throwable cause) { + super(message, cause); + } + + public AccessDeniedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityLocalDispatchInfo.java b/src/gen/java/com/uber/cadence/entities/ActivityLocalDispatchInfo.java new file mode 100644 index 000000000..30f4b5a6f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityLocalDispatchInfo.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityLocalDispatchInfo { + private String activityId; + private long scheduledTimestamp; + private long startedTimestamp; + private long scheduledTimestampOfThisAttempt; + private byte[] taskToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java new file mode 100644 index 000000000..04525b3eb --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskCancelRequestedEventAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskCancelRequestedEventAttributes { + private String activityId; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java new file mode 100644 index 000000000..293153ebe --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskCanceledEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskCanceledEventAttributes { + private byte[] details; + private long latestCancelRequestedEventId; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java new file mode 100644 index 000000000..ef55f7942 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskCompletedEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskCompletedEventAttributes { + private byte[] result; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java new file mode 100644 index 000000000..c44b6a87f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskFailedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskFailedEventAttributes { + private String reason; + private byte[] details; + private long scheduledEventId; + private long startedEventId; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java new file mode 100644 index 000000000..102cb9a79 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskScheduledEventAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskScheduledEventAttributes { + private String activityId; + private ActivityType activityType; + private String domain; + private TaskList taskList; + private byte[] input; + private int scheduleToCloseTimeoutSeconds; + private int scheduleToStartTimeoutSeconds; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private long decisionTaskCompletedEventId; + private RetryPolicy retryPolicy; + private Header header; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java new file mode 100644 index 000000000..544afa33b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskStartedEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskStartedEventAttributes { + private long scheduledEventId; + private String identity; + private String requestId; + private int attempt; + private String lastFailureReason; + private byte[] lastFailureDetails; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java new file mode 100644 index 000000000..a3cac604d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityTaskTimedOutEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityTaskTimedOutEventAttributes { + private byte[] details; + private long scheduledEventId; + private long startedEventId; + private TimeoutType timeoutType; + private String lastFailureReason; + private byte[] lastFailureDetails; +} diff --git a/src/gen/java/com/uber/cadence/entities/ActivityType.java b/src/gen/java/com/uber/cadence/entities/ActivityType.java new file mode 100644 index 000000000..c6bda09c0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ActivityType.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ActivityType { + private String name; +} diff --git a/src/gen/java/com/uber/cadence/entities/Any.java b/src/gen/java/com/uber/cadence/entities/Any.java new file mode 100644 index 000000000..0efcf3e1c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/Any.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class Any { + private String ValueType; + private byte[] Value; +} diff --git a/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java new file mode 100644 index 000000000..c9ea85642 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyAttributes { + private String childDomainID; + private String childWorkflowID; + private String childRunID; + private ParentClosePolicy parentClosePolicy; +} diff --git a/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java new file mode 100644 index 000000000..cbbbdf699 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyRequest { + private ApplyParentClosePolicyAttributes child; + private ApplyParentClosePolicyStatus status; +} diff --git a/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyResult.java b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyResult.java new file mode 100644 index 000000000..d4f7bfd6b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyResult.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyResult { + private ApplyParentClosePolicyAttributes child; + private CrossClusterTaskFailedCause failedCause; +} diff --git a/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java new file mode 100644 index 000000000..346e1e44c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ApplyParentClosePolicyStatus.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ApplyParentClosePolicyStatus { + private boolean completed; + private CrossClusterTaskFailedCause failedCause; +} diff --git a/src/gen/java/com/uber/cadence/entities/ArchivalStatus.java b/src/gen/java/com/uber/cadence/entities/ArchivalStatus.java new file mode 100644 index 000000000..36f862289 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ArchivalStatus.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum ArchivalStatus { + DISABLED, + ENABLED, +} diff --git a/src/gen/java/com/uber/cadence/entities/AsyncWorkflowConfiguration.java b/src/gen/java/com/uber/cadence/entities/AsyncWorkflowConfiguration.java new file mode 100644 index 000000000..16df639a9 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/AsyncWorkflowConfiguration.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class AsyncWorkflowConfiguration { + private boolean enabled; + private String predefinedQueueName; + private String queueType; + private DataBlob queueConfig; +} diff --git a/src/gen/java/com/uber/cadence/entities/BadBinaries.java b/src/gen/java/com/uber/cadence/entities/BadBinaries.java new file mode 100644 index 000000000..57acb8ea4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/BadBinaries.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class BadBinaries { + private Map binaries; +} diff --git a/src/gen/java/com/uber/cadence/entities/BadBinaryInfo.java b/src/gen/java/com/uber/cadence/entities/BadBinaryInfo.java new file mode 100644 index 000000000..68a7cb58b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/BadBinaryInfo.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class BadBinaryInfo { + private String reason; + private String operator; + private long createdTimeNano; +} diff --git a/src/gen/java/com/uber/cadence/entities/BadRequestError.java b/src/gen/java/com/uber/cadence/entities/BadRequestError.java new file mode 100644 index 000000000..18ca2b30e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/BadRequestError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class BadRequestError extends BaseError { + + public BadRequestError() { + super(); + } + + public BadRequestError(String message, Throwable cause) { + super(message, cause); + } + + public BadRequestError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/BaseError.java b/src/gen/java/com/uber/cadence/entities/BaseError.java new file mode 100644 index 000000000..618ac9807 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/BaseError.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public class BaseError extends RuntimeException { + public BaseError() { + super(); + } + + public BaseError(String message) { + super(message); + } + + public BaseError(String message, Throwable cause) { + super(message, cause); + } + + public BaseError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java b/src/gen/java/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..8fab794a0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CancelExternalWorkflowExecutionFailedCause.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum CancelExternalWorkflowExecutionFailedCause { + UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION, + WORKFLOW_ALREADY_COMPLETED, +} diff --git a/src/gen/java/com/uber/cadence/entities/CancelTimerDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/CancelTimerDecisionAttributes.java new file mode 100644 index 000000000..02f18aa26 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CancelTimerDecisionAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CancelTimerDecisionAttributes { + private String timerId; +} diff --git a/src/gen/java/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java new file mode 100644 index 000000000..eafa93f26 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CancelTimerFailedEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CancelTimerFailedEventAttributes { + private String timerId; + private String cause; + private long decisionTaskCompletedEventId; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..47b2167c3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CancelWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CancelWorkflowExecutionDecisionAttributes { + private byte[] details; +} diff --git a/src/gen/java/com/uber/cadence/entities/CancellationAlreadyRequestedError.java b/src/gen/java/com/uber/cadence/entities/CancellationAlreadyRequestedError.java new file mode 100644 index 000000000..9905f150f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CancellationAlreadyRequestedError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class CancellationAlreadyRequestedError extends BaseError { + + public CancellationAlreadyRequestedError() { + super(); + } + + public CancellationAlreadyRequestedError(String message, Throwable cause) { + super(message, cause); + } + + public CancellationAlreadyRequestedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java new file mode 100644 index 000000000..ad3a8ee43 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCanceledEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionCanceledEventAttributes { + private byte[] details; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java new file mode 100644 index 000000000..13df905c6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionCompletedEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionCompletedEventAttributes { + private byte[] result; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..0bf1f8c1a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedCause.java @@ -0,0 +1,19 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum ChildWorkflowExecutionFailedCause { + WORKFLOW_ALREADY_RUNNING, +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..87a90275a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionFailedEventAttributes { + private String reason; + private byte[] details; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java new file mode 100644 index 000000000..068d77392 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionStartedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionStartedEventAttributes { + private String domain; + private long initiatedEventId; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private Header header; +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java new file mode 100644 index 000000000..d20270413 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTerminatedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionTerminatedEventAttributes { + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java new file mode 100644 index 000000000..3bc4c5c30 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ChildWorkflowExecutionTimedOutEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ChildWorkflowExecutionTimedOutEventAttributes { + private TimeoutType timeoutType; + private String domain; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long initiatedEventId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/ClientVersionNotSupportedError.java b/src/gen/java/com/uber/cadence/entities/ClientVersionNotSupportedError.java new file mode 100644 index 000000000..1dc30fb56 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ClientVersionNotSupportedError.java @@ -0,0 +1,43 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class ClientVersionNotSupportedError extends BaseError { + private String featureVersion; + private String clientImpl; + private String supportedVersions; + + public ClientVersionNotSupportedError() { + super(); + } + + public ClientVersionNotSupportedError(String message, Throwable cause) { + super(message, cause); + } + + public ClientVersionNotSupportedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/CloseShardRequest.java b/src/gen/java/com/uber/cadence/entities/CloseShardRequest.java new file mode 100644 index 000000000..1f102d3ee --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CloseShardRequest.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CloseShardRequest { + private int shardID; +} diff --git a/src/gen/java/com/uber/cadence/entities/ClusterInfo.java b/src/gen/java/com/uber/cadence/entities/ClusterInfo.java new file mode 100644 index 000000000..aa7d66da3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ClusterInfo.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ClusterInfo { + private SupportedClientVersions supportedClientVersions; +} diff --git a/src/gen/java/com/uber/cadence/entities/ClusterReplicationConfiguration.java b/src/gen/java/com/uber/cadence/entities/ClusterReplicationConfiguration.java new file mode 100644 index 000000000..d3e010434 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ClusterReplicationConfiguration.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ClusterReplicationConfiguration { + private String clusterName; +} diff --git a/src/gen/java/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..f706284ba --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CompleteWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CompleteWorkflowExecutionDecisionAttributes { + private byte[] result; +} diff --git a/src/gen/java/com/uber/cadence/entities/ContinueAsNewInitiator.java b/src/gen/java/com/uber/cadence/entities/ContinueAsNewInitiator.java new file mode 100644 index 000000000..1a974b6a9 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ContinueAsNewInitiator.java @@ -0,0 +1,21 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum ContinueAsNewInitiator { + Decider, + RetryPolicy, + CronSchedule, +} diff --git a/src/gen/java/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..d5992fb9b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ContinueAsNewWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,40 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ContinueAsNewWorkflowExecutionDecisionAttributes { + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private int backoffStartIntervalInSeconds; + private RetryPolicy retryPolicy; + private ContinueAsNewInitiator initiator; + private String failureReason; + private byte[] failureDetails; + private byte[] lastCompletionResult; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; + private int jitterStartSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java b/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java new file mode 100644 index 000000000..f0f1567a0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CountWorkflowExecutionsRequest { + private String domain; + private String query; +} diff --git a/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java b/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java new file mode 100644 index 000000000..330537c2b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CountWorkflowExecutionsResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CountWorkflowExecutionsResponse { + private long count; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java new file mode 100644 index 000000000..4b46d3556 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyRequestAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterApplyParentClosePolicyRequestAttributes { + private List children; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java new file mode 100644 index 000000000..f53282b7c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterApplyParentClosePolicyResponseAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterApplyParentClosePolicyResponseAttributes { + private List childrenStatus; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java new file mode 100644 index 000000000..993bec585 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionRequestAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterCancelExecutionRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private String requestID; + private long initiatedEventID; + private boolean childWorkflowOnly; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java new file mode 100644 index 000000000..771c9376d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterCancelExecutionResponseAttributes.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterCancelExecutionResponseAttributes {} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java new file mode 100644 index 000000000..e828bd576 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private long initiatedEventID; + private HistoryEvent completionEvent; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java new file mode 100644 index 000000000..cb1fdb3de --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes {} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java new file mode 100644 index 000000000..a1f983f15 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionRequestAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterSignalExecutionRequestAttributes { + private String targetDomainID; + private String targetWorkflowID; + private String targetRunID; + private String requestID; + private long initiatedEventID; + private boolean childWorkflowOnly; + private String signalName; + private byte[] signalInput; + private byte[] control; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java new file mode 100644 index 000000000..3e6ef49d3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterSignalExecutionResponseAttributes.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterSignalExecutionResponseAttributes {} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java new file mode 100644 index 000000000..303729c3c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionRequestAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterStartChildExecutionRequestAttributes { + private String targetDomainID; + private String requestID; + private long initiatedEventID; + private StartChildWorkflowExecutionInitiatedEventAttributes initiatedEventAttributes; + private String targetRunID; + private Map partitionConfig; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java b/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java new file mode 100644 index 000000000..8c21538ec --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterStartChildExecutionResponseAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterStartChildExecutionResponseAttributes { + private String runID; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterTaskFailedCause.java b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskFailedCause.java new file mode 100644 index 000000000..3e4cc3126 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskFailedCause.java @@ -0,0 +1,24 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum CrossClusterTaskFailedCause { + DOMAIN_NOT_ACTIVE, + DOMAIN_NOT_EXISTS, + WORKFLOW_ALREADY_RUNNING, + WORKFLOW_NOT_EXISTS, + WORKFLOW_ALREADY_COMPLETED, + UNCATEGORIZED, +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterTaskInfo.java b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskInfo.java new file mode 100644 index 000000000..a56d7818e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskInfo.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterTaskInfo { + private String domainID; + private String workflowID; + private String runID; + private CrossClusterTaskType taskType; + private int taskState; + private long taskID; + private long visibilityTimestamp; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterTaskRequest.java b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskRequest.java new file mode 100644 index 000000000..ec010c2d7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterTaskRequest { + private CrossClusterTaskInfo taskInfo; + private CrossClusterStartChildExecutionRequestAttributes startChildExecutionAttributes; + private CrossClusterCancelExecutionRequestAttributes cancelExecutionAttributes; + private CrossClusterSignalExecutionRequestAttributes signalExecutionAttributes; + private CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes + recordChildWorkflowExecutionCompleteAttributes; + private CrossClusterApplyParentClosePolicyRequestAttributes applyParentClosePolicyAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterTaskResponse.java b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskResponse.java new file mode 100644 index 000000000..6dae1f0a3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class CrossClusterTaskResponse { + private long taskID; + private CrossClusterTaskType taskType; + private int taskState; + private CrossClusterTaskFailedCause failedCause; + private CrossClusterStartChildExecutionResponseAttributes startChildExecutionAttributes; + private CrossClusterCancelExecutionResponseAttributes cancelExecutionAttributes; + private CrossClusterSignalExecutionResponseAttributes signalExecutionAttributes; + private CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes + recordChildWorkflowExecutionCompleteAttributes; + private CrossClusterApplyParentClosePolicyResponseAttributes applyParentClosePolicyAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/CrossClusterTaskType.java b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskType.java new file mode 100644 index 000000000..e56e4f182 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CrossClusterTaskType.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum CrossClusterTaskType { + StartChildExecution, + CancelExecution, + SignalExecution, + RecordChildWorkflowExecutionComplete, + ApplyParentClosePolicy, +} diff --git a/src/gen/java/com/uber/cadence/entities/CurrentBranchChangedError.java b/src/gen/java/com/uber/cadence/entities/CurrentBranchChangedError.java new file mode 100644 index 000000000..eab2555da --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/CurrentBranchChangedError.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class CurrentBranchChangedError extends BaseError { + private byte[] currentBranchToken; + + public CurrentBranchChangedError() { + super(); + } + + public CurrentBranchChangedError(String message, Throwable cause) { + super(message, cause); + } + + public CurrentBranchChangedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/DataBlob.java b/src/gen/java/com/uber/cadence/entities/DataBlob.java new file mode 100644 index 000000000..9573fdfdf --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DataBlob.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DataBlob { + private EncodingType EncodingType; + private byte[] Data; +} diff --git a/src/gen/java/com/uber/cadence/entities/Decision.java b/src/gen/java/com/uber/cadence/entities/Decision.java new file mode 100644 index 000000000..43618195d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/Decision.java @@ -0,0 +1,43 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class Decision { + private DecisionType decisionType; + private ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes; + private StartTimerDecisionAttributes startTimerDecisionAttributes; + private CompleteWorkflowExecutionDecisionAttributes completeWorkflowExecutionDecisionAttributes; + private FailWorkflowExecutionDecisionAttributes failWorkflowExecutionDecisionAttributes; + private RequestCancelActivityTaskDecisionAttributes requestCancelActivityTaskDecisionAttributes; + private CancelTimerDecisionAttributes cancelTimerDecisionAttributes; + private CancelWorkflowExecutionDecisionAttributes cancelWorkflowExecutionDecisionAttributes; + private RequestCancelExternalWorkflowExecutionDecisionAttributes + requestCancelExternalWorkflowExecutionDecisionAttributes; + private RecordMarkerDecisionAttributes recordMarkerDecisionAttributes; + private ContinueAsNewWorkflowExecutionDecisionAttributes + continueAsNewWorkflowExecutionDecisionAttributes; + private StartChildWorkflowExecutionDecisionAttributes + startChildWorkflowExecutionDecisionAttributes; + private SignalExternalWorkflowExecutionDecisionAttributes + signalExternalWorkflowExecutionDecisionAttributes; + private UpsertWorkflowSearchAttributesDecisionAttributes + upsertWorkflowSearchAttributesDecisionAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java new file mode 100644 index 000000000..769d9a122 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskCompletedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DecisionTaskCompletedEventAttributes { + private byte[] executionContext; + private long scheduledEventId; + private long startedEventId; + private String identity; + private String binaryChecksum; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedCause.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedCause.java new file mode 100644 index 000000000..f733a1b3e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedCause.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum DecisionTaskFailedCause { + UNHANDLED_DECISION, + BAD_SCHEDULE_ACTIVITY_ATTRIBUTES, + BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES, + BAD_START_TIMER_ATTRIBUTES, + BAD_CANCEL_TIMER_ATTRIBUTES, + BAD_RECORD_MARKER_ATTRIBUTES, + BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_CONTINUE_AS_NEW_ATTRIBUTES, + START_TIMER_DUPLICATE_ID, + RESET_STICKY_TASKLIST, + WORKFLOW_WORKER_UNHANDLED_FAILURE, + BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES, + BAD_START_CHILD_EXECUTION_ATTRIBUTES, + FORCE_CLOSE_DECISION, + FAILOVER_CLOSE_DECISION, + BAD_SIGNAL_INPUT_SIZE, + RESET_WORKFLOW, + BAD_BINARY, + SCHEDULE_ACTIVITY_DUPLICATE_ID, + BAD_SEARCH_ATTRIBUTES, +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java new file mode 100644 index 000000000..ebdd81534 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskFailedEventAttributes.java @@ -0,0 +1,35 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DecisionTaskFailedEventAttributes { + private long scheduledEventId; + private long startedEventId; + private DecisionTaskFailedCause cause; + private byte[] details; + private String identity; + private String reason; + private String baseRunId; + private String newRunId; + private long forkEventVersion; + private String binaryChecksum; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java new file mode 100644 index 000000000..782202ab9 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskScheduledEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DecisionTaskScheduledEventAttributes { + private TaskList taskList; + private int startToCloseTimeoutSeconds; + private long attempt; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java new file mode 100644 index 000000000..18a00183b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskStartedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DecisionTaskStartedEventAttributes { + private long scheduledEventId; + private String identity; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutCause.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutCause.java new file mode 100644 index 000000000..e5d02a6ea --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutCause.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum DecisionTaskTimedOutCause { + TIMEOUT, + RESET, +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java b/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java new file mode 100644 index 000000000..51f139cc4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionTaskTimedOutEventAttributes.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DecisionTaskTimedOutEventAttributes { + private long scheduledEventId; + private long startedEventId; + private TimeoutType timeoutType; + private String baseRunId; + private String newRunId; + private long forkEventVersion; + private String reason; + private DecisionTaskTimedOutCause cause; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/DecisionType.java b/src/gen/java/com/uber/cadence/entities/DecisionType.java new file mode 100644 index 000000000..e7f342766 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DecisionType.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum DecisionType { + ScheduleActivityTask, + RequestCancelActivityTask, + StartTimer, + CompleteWorkflowExecution, + FailWorkflowExecution, + CancelTimer, + CancelWorkflowExecution, + RequestCancelExternalWorkflowExecution, + RecordMarker, + ContinueAsNewWorkflowExecution, + StartChildWorkflowExecution, + SignalExternalWorkflowExecution, + UpsertWorkflowSearchAttributes, +} diff --git a/src/gen/java/com/uber/cadence/entities/DeprecateDomainRequest.java b/src/gen/java/com/uber/cadence/entities/DeprecateDomainRequest.java new file mode 100644 index 000000000..06029d940 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DeprecateDomainRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DeprecateDomainRequest { + private String name; + private String securityToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeDomainRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeDomainRequest.java new file mode 100644 index 000000000..c8d4f1d31 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeDomainRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeDomainRequest { + private String name; + private String uuid; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeDomainResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeDomainResponse.java new file mode 100644 index 000000000..e02478b55 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeDomainResponse.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeDomainResponse { + private DomainInfo domainInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private long failoverVersion; + private boolean isGlobalDomain; + private FailoverInfo failoverInfo; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostRequest.java new file mode 100644 index 000000000..ae3ceb5d5 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeHistoryHostRequest { + private String hostAddress; + private int shardIdForHost; + private WorkflowExecution executionForHost; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostResponse.java new file mode 100644 index 000000000..e1438232d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeHistoryHostResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeHistoryHostResponse { + private int numberOfShards; + private List shardIDs; + private DomainCacheInfo domainCache; + private String shardControllerStatus; + private String address; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeQueueRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeQueueRequest.java new file mode 100644 index 000000000..60271f9b6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeQueueRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeQueueRequest { + private int shardID; + private String clusterName; + private int type; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeQueueResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeQueueResponse.java new file mode 100644 index 000000000..be1507171 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeQueueResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeQueueResponse { + private List processingQueueStates; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionRequest.java new file mode 100644 index 000000000..33fb0778b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeShardDistributionRequest { + private int pageSize; + private int pageID; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionResponse.java new file mode 100644 index 000000000..561969e3d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeShardDistributionResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeShardDistributionResponse { + private int numberOfShards; + private Map shards; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeTaskListRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeTaskListRequest.java new file mode 100644 index 000000000..5019e3a1b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeTaskListRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeTaskListRequest { + private String domain; + private TaskList taskList; + private TaskListType taskListType; + private boolean includeTaskListStatus; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeTaskListResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeTaskListResponse.java new file mode 100644 index 000000000..a75b8e95f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeTaskListResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeTaskListResponse { + private List pollers; + private TaskListStatus taskListStatus; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java new file mode 100644 index 000000000..6325a4bbe --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeWorkflowExecutionRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java b/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java new file mode 100644 index 000000000..a3d411521 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DescribeWorkflowExecutionResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DescribeWorkflowExecutionResponse { + private WorkflowExecutionConfiguration executionConfiguration; + private WorkflowExecutionInfo workflowExecutionInfo; + private List pendingActivities; + private List pendingChildren; + private PendingDecisionInfo pendingDecision; +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainAlreadyExistsError.java b/src/gen/java/com/uber/cadence/entities/DomainAlreadyExistsError.java new file mode 100644 index 000000000..852351093 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainAlreadyExistsError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class DomainAlreadyExistsError extends BaseError { + + public DomainAlreadyExistsError() { + super(); + } + + public DomainAlreadyExistsError(String message, Throwable cause) { + super(message, cause); + } + + public DomainAlreadyExistsError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainCacheInfo.java b/src/gen/java/com/uber/cadence/entities/DomainCacheInfo.java new file mode 100644 index 000000000..2fcedf158 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainCacheInfo.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DomainCacheInfo { + private long numOfItemsInCacheByID; + private long numOfItemsInCacheByName; +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainConfiguration.java b/src/gen/java/com/uber/cadence/entities/DomainConfiguration.java new file mode 100644 index 000000000..b9428b7a7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainConfiguration.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DomainConfiguration { + private int workflowExecutionRetentionPeriodInDays; + private boolean emitMetric; + private IsolationGroupConfiguration isolationgroups; + private BadBinaries badBinaries; + private ArchivalStatus historyArchivalStatus; + private String historyArchivalURI; + private ArchivalStatus visibilityArchivalStatus; + private String visibilityArchivalURI; + private AsyncWorkflowConfiguration AsyncWorkflowConfiguration; +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainInfo.java b/src/gen/java/com/uber/cadence/entities/DomainInfo.java new file mode 100644 index 000000000..fe0c2f425 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainInfo.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DomainInfo { + private String name; + private DomainStatus status; + private String description; + private String ownerEmail; + private Map data; + private String uuid; +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainNotActiveError.java b/src/gen/java/com/uber/cadence/entities/DomainNotActiveError.java new file mode 100644 index 000000000..3dd799285 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainNotActiveError.java @@ -0,0 +1,43 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class DomainNotActiveError extends BaseError { + private String domainName; + private String currentCluster; + private String activeCluster; + + public DomainNotActiveError() { + super(); + } + + public DomainNotActiveError(String message, Throwable cause) { + super(message, cause); + } + + public DomainNotActiveError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainReplicationConfiguration.java b/src/gen/java/com/uber/cadence/entities/DomainReplicationConfiguration.java new file mode 100644 index 000000000..5fc78f2aa --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainReplicationConfiguration.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class DomainReplicationConfiguration { + private String activeClusterName; + private List clusters; +} diff --git a/src/gen/java/com/uber/cadence/entities/DomainStatus.java b/src/gen/java/com/uber/cadence/entities/DomainStatus.java new file mode 100644 index 000000000..94be2e772 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/DomainStatus.java @@ -0,0 +1,21 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum DomainStatus { + REGISTERED, + DEPRECATED, + DELETED, +} diff --git a/src/gen/java/com/uber/cadence/entities/EncodingType.java b/src/gen/java/com/uber/cadence/entities/EncodingType.java new file mode 100644 index 000000000..487ec24f2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/EncodingType.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum EncodingType { + ThriftRW, + JSON, +} diff --git a/src/gen/java/com/uber/cadence/entities/EntityNotExistsError.java b/src/gen/java/com/uber/cadence/entities/EntityNotExistsError.java new file mode 100644 index 000000000..c5ccff910 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/EntityNotExistsError.java @@ -0,0 +1,42 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class EntityNotExistsError extends BaseError { + private String currentCluster; + private String activeCluster; + + public EntityNotExistsError() { + super(); + } + + public EntityNotExistsError(String message, Throwable cause) { + super(message, cause); + } + + public EntityNotExistsError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/EventType.java b/src/gen/java/com/uber/cadence/entities/EventType.java new file mode 100644 index 000000000..d9bdd8a0f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/EventType.java @@ -0,0 +1,60 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum EventType { + WorkflowExecutionStarted, + WorkflowExecutionCompleted, + WorkflowExecutionFailed, + WorkflowExecutionTimedOut, + DecisionTaskScheduled, + DecisionTaskStarted, + DecisionTaskCompleted, + DecisionTaskTimedOut, + DecisionTaskFailed, + ActivityTaskScheduled, + ActivityTaskStarted, + ActivityTaskCompleted, + ActivityTaskFailed, + ActivityTaskTimedOut, + ActivityTaskCancelRequested, + RequestCancelActivityTaskFailed, + ActivityTaskCanceled, + TimerStarted, + TimerFired, + CancelTimerFailed, + TimerCanceled, + WorkflowExecutionCancelRequested, + WorkflowExecutionCanceled, + RequestCancelExternalWorkflowExecutionInitiated, + RequestCancelExternalWorkflowExecutionFailed, + ExternalWorkflowExecutionCancelRequested, + MarkerRecorded, + WorkflowExecutionSignaled, + WorkflowExecutionTerminated, + WorkflowExecutionContinuedAsNew, + StartChildWorkflowExecutionInitiated, + StartChildWorkflowExecutionFailed, + ChildWorkflowExecutionStarted, + ChildWorkflowExecutionCompleted, + ChildWorkflowExecutionFailed, + ChildWorkflowExecutionCanceled, + ChildWorkflowExecutionTimedOut, + ChildWorkflowExecutionTerminated, + SignalExternalWorkflowExecutionInitiated, + SignalExternalWorkflowExecutionFailed, + ExternalWorkflowExecutionSignaled, + UpsertWorkflowSearchAttributes, +} diff --git a/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java new file mode 100644 index 000000000..2ce2b3d51 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionCancelRequestedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ExternalWorkflowExecutionCancelRequestedEventAttributes { + private long initiatedEventId; + private String domain; + private WorkflowExecution workflowExecution; +} diff --git a/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java new file mode 100644 index 000000000..8b327a71a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ExternalWorkflowExecutionSignaledEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ExternalWorkflowExecutionSignaledEventAttributes { + private long initiatedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private byte[] control; +} diff --git a/src/gen/java/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..08652cff2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/FailWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class FailWorkflowExecutionDecisionAttributes { + private String reason; + private byte[] details; +} diff --git a/src/gen/java/com/uber/cadence/entities/FailoverInfo.java b/src/gen/java/com/uber/cadence/entities/FailoverInfo.java new file mode 100644 index 000000000..9dcc33f90 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/FailoverInfo.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class FailoverInfo { + private long failoverVersion; + private long failoverStartTimestamp; + private long failoverExpireTimestamp; + private int completedShardCount; + private List pendingShards; +} diff --git a/src/gen/java/com/uber/cadence/entities/FeatureFlags.java b/src/gen/java/com/uber/cadence/entities/FeatureFlags.java new file mode 100644 index 000000000..4c6634da4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/FeatureFlags.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class FeatureFlags { + private boolean WorkflowExecutionAlreadyCompletedErrorEnabled; +} diff --git a/src/gen/java/com/uber/cadence/entities/FeatureNotEnabledError.java b/src/gen/java/com/uber/cadence/entities/FeatureNotEnabledError.java new file mode 100644 index 000000000..b32ff131c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/FeatureNotEnabledError.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class FeatureNotEnabledError extends BaseError { + private String featureFlag; + + public FeatureNotEnabledError() { + super(); + } + + public FeatureNotEnabledError(String message, Throwable cause) { + super(message, cause); + } + + public FeatureNotEnabledError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksRequest.java b/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksRequest.java new file mode 100644 index 000000000..6933b4634 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetCrossClusterTasksRequest { + private List shardIDs; + private String targetCluster; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksResponse.java b/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksResponse.java new file mode 100644 index 000000000..5aeb5aa0f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetCrossClusterTasksResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetCrossClusterTasksResponse { + private Map> tasksByShard; + private Map failedCauseByShard; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetSearchAttributesResponse.java b/src/gen/java/com/uber/cadence/entities/GetSearchAttributesResponse.java new file mode 100644 index 000000000..63f0eb590 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetSearchAttributesResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetSearchAttributesResponse { + private Map keys; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetTaskFailedCause.java b/src/gen/java/com/uber/cadence/entities/GetTaskFailedCause.java new file mode 100644 index 000000000..5cc5791b2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetTaskFailedCause.java @@ -0,0 +1,22 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum GetTaskFailedCause { + SERVICE_BUSY, + TIMEOUT, + SHARD_OWNERSHIP_LOST, + UNCATEGORIZED, +} diff --git a/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainRequest.java b/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainRequest.java new file mode 100644 index 000000000..bc8565926 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainRequest.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetTaskListsByDomainRequest { + private String domainName; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainResponse.java b/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainResponse.java new file mode 100644 index 000000000..9dadaf74c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetTaskListsByDomainResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetTaskListsByDomainResponse { + private Map decisionTaskListMap; + private Map activityTaskListMap; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java b/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java new file mode 100644 index 000000000..c2210b464 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetWorkflowExecutionHistoryRequest { + private String domain; + private WorkflowExecution execution; + private int maximumPageSize; + private byte[] nextPageToken; + private boolean waitForNewEvent; + private HistoryEventFilterType HistoryEventFilterType; + private boolean skipArchival; +} diff --git a/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java b/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java new file mode 100644 index 000000000..641148f58 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/GetWorkflowExecutionHistoryResponse.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class GetWorkflowExecutionHistoryResponse { + private History history; + private List rawHistory; + private byte[] nextPageToken; + private boolean archived; +} diff --git a/src/gen/java/com/uber/cadence/entities/Header.java b/src/gen/java/com/uber/cadence/entities/Header.java new file mode 100644 index 000000000..d0b58ce5e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/Header.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class Header { + private Map fields; +} diff --git a/src/gen/java/com/uber/cadence/entities/History.java b/src/gen/java/com/uber/cadence/entities/History.java new file mode 100644 index 000000000..4cbd32f47 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/History.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class History { + private List events; +} diff --git a/src/gen/java/com/uber/cadence/entities/HistoryBranch.java b/src/gen/java/com/uber/cadence/entities/HistoryBranch.java new file mode 100644 index 000000000..de586cc9a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/HistoryBranch.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class HistoryBranch { + private String treeID; + private String branchID; + private List ancestors; +} diff --git a/src/gen/java/com/uber/cadence/entities/HistoryBranchRange.java b/src/gen/java/com/uber/cadence/entities/HistoryBranchRange.java new file mode 100644 index 000000000..45b08a30d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/HistoryBranchRange.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class HistoryBranchRange { + private String branchID; + private long beginNodeID; + private long endNodeID; +} diff --git a/src/gen/java/com/uber/cadence/entities/HistoryEvent.java b/src/gen/java/com/uber/cadence/entities/HistoryEvent.java new file mode 100644 index 000000000..acab6170b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/HistoryEvent.java @@ -0,0 +1,87 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class HistoryEvent { + private long eventId; + private long timestamp; + private EventType eventType; + private long version; + private long taskId; + private WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes; + private WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes; + private WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes; + private WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes; + private DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes; + private DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes; + private DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes; + private DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes; + private DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes; + private ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes; + private ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes; + private ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes; + private ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes; + private ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes; + private TimerStartedEventAttributes timerStartedEventAttributes; + private TimerFiredEventAttributes timerFiredEventAttributes; + private ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes; + private RequestCancelActivityTaskFailedEventAttributes + requestCancelActivityTaskFailedEventAttributes; + private ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes; + private TimerCanceledEventAttributes timerCanceledEventAttributes; + private CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes; + private MarkerRecordedEventAttributes markerRecordedEventAttributes; + private WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes; + private WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes; + private WorkflowExecutionCancelRequestedEventAttributes + workflowExecutionCancelRequestedEventAttributes; + private WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes; + private RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + requestCancelExternalWorkflowExecutionInitiatedEventAttributes; + private RequestCancelExternalWorkflowExecutionFailedEventAttributes + requestCancelExternalWorkflowExecutionFailedEventAttributes; + private ExternalWorkflowExecutionCancelRequestedEventAttributes + externalWorkflowExecutionCancelRequestedEventAttributes; + private WorkflowExecutionContinuedAsNewEventAttributes + workflowExecutionContinuedAsNewEventAttributes; + private StartChildWorkflowExecutionInitiatedEventAttributes + startChildWorkflowExecutionInitiatedEventAttributes; + private StartChildWorkflowExecutionFailedEventAttributes + startChildWorkflowExecutionFailedEventAttributes; + private ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes; + private ChildWorkflowExecutionCompletedEventAttributes + childWorkflowExecutionCompletedEventAttributes; + private ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes; + private ChildWorkflowExecutionCanceledEventAttributes + childWorkflowExecutionCanceledEventAttributes; + private ChildWorkflowExecutionTimedOutEventAttributes + childWorkflowExecutionTimedOutEventAttributes; + private ChildWorkflowExecutionTerminatedEventAttributes + childWorkflowExecutionTerminatedEventAttributes; + private SignalExternalWorkflowExecutionInitiatedEventAttributes + signalExternalWorkflowExecutionInitiatedEventAttributes; + private SignalExternalWorkflowExecutionFailedEventAttributes + signalExternalWorkflowExecutionFailedEventAttributes; + private ExternalWorkflowExecutionSignaledEventAttributes + externalWorkflowExecutionSignaledEventAttributes; + private UpsertWorkflowSearchAttributesEventAttributes + upsertWorkflowSearchAttributesEventAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/HistoryEventFilterType.java b/src/gen/java/com/uber/cadence/entities/HistoryEventFilterType.java new file mode 100644 index 000000000..e62aa2675 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/HistoryEventFilterType.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum HistoryEventFilterType { + ALL_EVENT, + CLOSE_EVENT, +} diff --git a/src/gen/java/com/uber/cadence/entities/IndexedValueType.java b/src/gen/java/com/uber/cadence/entities/IndexedValueType.java new file mode 100644 index 000000000..7016b4409 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/IndexedValueType.java @@ -0,0 +1,24 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum IndexedValueType { + STRING, + KEYWORD, + INT, + DOUBLE, + BOOL, + DATETIME, +} diff --git a/src/gen/java/com/uber/cadence/entities/InternalDataInconsistencyError.java b/src/gen/java/com/uber/cadence/entities/InternalDataInconsistencyError.java new file mode 100644 index 000000000..110dd93b3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/InternalDataInconsistencyError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class InternalDataInconsistencyError extends BaseError { + + public InternalDataInconsistencyError() { + super(); + } + + public InternalDataInconsistencyError(String message, Throwable cause) { + super(message, cause); + } + + public InternalDataInconsistencyError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/InternalServiceError.java b/src/gen/java/com/uber/cadence/entities/InternalServiceError.java new file mode 100644 index 000000000..5d9040426 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/InternalServiceError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class InternalServiceError extends BaseError { + + public InternalServiceError() { + super(); + } + + public InternalServiceError(String message, Throwable cause) { + super(message, cause); + } + + public InternalServiceError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/IsolationGroupConfiguration.java b/src/gen/java/com/uber/cadence/entities/IsolationGroupConfiguration.java new file mode 100644 index 000000000..1a07810b0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/IsolationGroupConfiguration.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class IsolationGroupConfiguration { + private List isolationGroups; +} diff --git a/src/gen/java/com/uber/cadence/entities/IsolationGroupPartition.java b/src/gen/java/com/uber/cadence/entities/IsolationGroupPartition.java new file mode 100644 index 000000000..ac68a4587 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/IsolationGroupPartition.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class IsolationGroupPartition { + private String name; + private IsolationGroupState state; +} diff --git a/src/gen/java/com/uber/cadence/entities/IsolationGroupState.java b/src/gen/java/com/uber/cadence/entities/IsolationGroupState.java new file mode 100644 index 000000000..e4b59f1fe --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/IsolationGroupState.java @@ -0,0 +1,21 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum IsolationGroupState { + INVALID, + HEALTHY, + DRAINED, +} diff --git a/src/gen/java/com/uber/cadence/entities/LimitExceededError.java b/src/gen/java/com/uber/cadence/entities/LimitExceededError.java new file mode 100644 index 000000000..49cb5ae45 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/LimitExceededError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class LimitExceededError extends BaseError { + + public LimitExceededError() { + super(); + } + + public LimitExceededError(String message, Throwable cause) { + super(message, cause); + } + + public LimitExceededError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java b/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java new file mode 100644 index 000000000..208f42864 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListArchivedWorkflowExecutionsRequest { + private String domain; + private int pageSize; + private byte[] nextPageToken; + private String query; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java b/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java new file mode 100644 index 000000000..8ffde7384 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListArchivedWorkflowExecutionsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListArchivedWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java b/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java new file mode 100644 index 000000000..62e580d05 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListClosedWorkflowExecutionsRequest { + private String domain; + private int maximumPageSize; + private byte[] nextPageToken; + private StartTimeFilter StartTimeFilter; + private WorkflowExecutionFilter executionFilter; + private WorkflowTypeFilter typeFilter; + private WorkflowExecutionCloseStatus statusFilter; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java b/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java new file mode 100644 index 000000000..235868481 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListClosedWorkflowExecutionsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListClosedWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListDomainsRequest.java b/src/gen/java/com/uber/cadence/entities/ListDomainsRequest.java new file mode 100644 index 000000000..743a98721 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListDomainsRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListDomainsRequest { + private int pageSize; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListDomainsResponse.java b/src/gen/java/com/uber/cadence/entities/ListDomainsResponse.java new file mode 100644 index 000000000..8739c8f9f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListDomainsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListDomainsResponse { + private List domains; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java b/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java new file mode 100644 index 000000000..c49077ad4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListOpenWorkflowExecutionsRequest { + private String domain; + private int maximumPageSize; + private byte[] nextPageToken; + private StartTimeFilter StartTimeFilter; + private WorkflowExecutionFilter executionFilter; + private WorkflowTypeFilter typeFilter; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java b/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java new file mode 100644 index 000000000..a00215dba --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListOpenWorkflowExecutionsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListOpenWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsRequest.java b/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsRequest.java new file mode 100644 index 000000000..9c043b0b1 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListTaskListPartitionsRequest { + private String domain; + private TaskList taskList; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsResponse.java b/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsResponse.java new file mode 100644 index 000000000..0e829d0a6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListTaskListPartitionsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListTaskListPartitionsResponse { + private List activityTaskListPartitions; + private List decisionTaskListPartitions; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java b/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java new file mode 100644 index 000000000..4c0f6566e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListWorkflowExecutionsRequest { + private String domain; + private int pageSize; + private byte[] nextPageToken; + private String query; +} diff --git a/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java b/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java new file mode 100644 index 000000000..2fe35436b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ListWorkflowExecutionsResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ListWorkflowExecutionsResponse { + private List executions; + private byte[] nextPageToken; +} diff --git a/src/gen/java/com/uber/cadence/entities/MarkerRecordedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/MarkerRecordedEventAttributes.java new file mode 100644 index 000000000..d42f810e2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/MarkerRecordedEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class MarkerRecordedEventAttributes { + private String markerName; + private byte[] details; + private long decisionTaskCompletedEventId; + private Header header; +} diff --git a/src/gen/java/com/uber/cadence/entities/Memo.java b/src/gen/java/com/uber/cadence/entities/Memo.java new file mode 100644 index 000000000..72468f63d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/Memo.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class Memo { + private Map fields; +} diff --git a/src/gen/java/com/uber/cadence/entities/ParentClosePolicy.java b/src/gen/java/com/uber/cadence/entities/ParentClosePolicy.java new file mode 100644 index 000000000..947e9041d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ParentClosePolicy.java @@ -0,0 +1,21 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum ParentClosePolicy { + ABANDON, + REQUEST_CANCEL, + TERMINATE, +} diff --git a/src/gen/java/com/uber/cadence/entities/PendingActivityInfo.java b/src/gen/java/com/uber/cadence/entities/PendingActivityInfo.java new file mode 100644 index 000000000..3784502de --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PendingActivityInfo.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PendingActivityInfo { + private String activityID; + private ActivityType activityType; + private PendingActivityState state; + private byte[] heartbeatDetails; + private long lastHeartbeatTimestamp; + private long lastStartedTimestamp; + private int attempt; + private int maximumAttempts; + private long scheduledTimestamp; + private long expirationTimestamp; + private String lastFailureReason; + private String lastWorkerIdentity; + private byte[] lastFailureDetails; + private String startedWorkerIdentity; +} diff --git a/src/gen/java/com/uber/cadence/entities/PendingActivityState.java b/src/gen/java/com/uber/cadence/entities/PendingActivityState.java new file mode 100644 index 000000000..f8cca0547 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PendingActivityState.java @@ -0,0 +1,21 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum PendingActivityState { + SCHEDULED, + STARTED, + CANCEL_REQUESTED, +} diff --git a/src/gen/java/com/uber/cadence/entities/PendingChildExecutionInfo.java b/src/gen/java/com/uber/cadence/entities/PendingChildExecutionInfo.java new file mode 100644 index 000000000..7285a71f2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PendingChildExecutionInfo.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PendingChildExecutionInfo { + private String domain; + private String workflowID; + private String runID; + private String workflowTypName; + private long initiatedID; + private ParentClosePolicy parentClosePolicy; +} diff --git a/src/gen/java/com/uber/cadence/entities/PendingDecisionInfo.java b/src/gen/java/com/uber/cadence/entities/PendingDecisionInfo.java new file mode 100644 index 000000000..13607acc0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PendingDecisionInfo.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PendingDecisionInfo { + private PendingDecisionState state; + private long scheduledTimestamp; + private long startedTimestamp; + private long attempt; + private long originalScheduledTimestamp; +} diff --git a/src/gen/java/com/uber/cadence/entities/PendingDecisionState.java b/src/gen/java/com/uber/cadence/entities/PendingDecisionState.java new file mode 100644 index 000000000..66919f790 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PendingDecisionState.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum PendingDecisionState { + SCHEDULED, + STARTED, +} diff --git a/src/gen/java/com/uber/cadence/entities/PollForActivityTaskRequest.java b/src/gen/java/com/uber/cadence/entities/PollForActivityTaskRequest.java new file mode 100644 index 000000000..01ef2bd2d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PollForActivityTaskRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PollForActivityTaskRequest { + private String domain; + private TaskList taskList; + private String identity; + private TaskListMetadata taskListMetadata; +} diff --git a/src/gen/java/com/uber/cadence/entities/PollForActivityTaskResponse.java b/src/gen/java/com/uber/cadence/entities/PollForActivityTaskResponse.java new file mode 100644 index 000000000..11a7fd5fd --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PollForActivityTaskResponse.java @@ -0,0 +1,40 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PollForActivityTaskResponse { + private byte[] taskToken; + private WorkflowExecution workflowExecution; + private String activityId; + private ActivityType activityType; + private byte[] input; + private long scheduledTimestamp; + private int scheduleToCloseTimeoutSeconds; + private long startedTimestamp; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private int attempt; + private long scheduledTimestampOfThisAttempt; + private byte[] heartbeatDetails; + private WorkflowType workflowType; + private String workflowDomain; + private Header header; +} diff --git a/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskRequest.java b/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskRequest.java new file mode 100644 index 000000000..b4fb66e53 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PollForDecisionTaskRequest { + private String domain; + private TaskList taskList; + private String identity; + private String binaryChecksum; +} diff --git a/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskResponse.java b/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskResponse.java new file mode 100644 index 000000000..3912c7fd1 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PollForDecisionTaskResponse.java @@ -0,0 +1,40 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PollForDecisionTaskResponse { + private byte[] taskToken; + private WorkflowExecution workflowExecution; + private WorkflowType workflowType; + private long previousStartedEventId; + private long startedEventId; + private long attempt; + private long backlogCountHint; + private History history; + private byte[] nextPageToken; + private WorkflowQuery query; + private TaskList WorkflowExecutionTaskList; + private long scheduledTimestamp; + private long startedTimestamp; + private Map queries; + private long nextEventId; + private long totalHistoryBytes; +} diff --git a/src/gen/java/com/uber/cadence/entities/PollerInfo.java b/src/gen/java/com/uber/cadence/entities/PollerInfo.java new file mode 100644 index 000000000..956bc9ced --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/PollerInfo.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class PollerInfo { + private long lastAccessTime; + private String identity; + private double ratePerSecond; +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryConsistencyLevel.java b/src/gen/java/com/uber/cadence/entities/QueryConsistencyLevel.java new file mode 100644 index 000000000..5cb643493 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryConsistencyLevel.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum QueryConsistencyLevel { + EVENTUAL, + STRONG, +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryFailedError.java b/src/gen/java/com/uber/cadence/entities/QueryFailedError.java new file mode 100644 index 000000000..ab4dbae0a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryFailedError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class QueryFailedError extends BaseError { + + public QueryFailedError() { + super(); + } + + public QueryFailedError(String message, Throwable cause) { + super(message, cause); + } + + public QueryFailedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryRejectCondition.java b/src/gen/java/com/uber/cadence/entities/QueryRejectCondition.java new file mode 100644 index 000000000..e377588c7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryRejectCondition.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum QueryRejectCondition { + NOT_OPEN, + NOT_COMPLETED_CLEANLY, +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryRejected.java b/src/gen/java/com/uber/cadence/entities/QueryRejected.java new file mode 100644 index 000000000..81779e1cc --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryRejected.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class QueryRejected { + private WorkflowExecutionCloseStatus closeStatus; +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryResultType.java b/src/gen/java/com/uber/cadence/entities/QueryResultType.java new file mode 100644 index 000000000..b58ca7441 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryResultType.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum QueryResultType { + ANSWERED, + FAILED, +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryTaskCompletedType.java b/src/gen/java/com/uber/cadence/entities/QueryTaskCompletedType.java new file mode 100644 index 000000000..5f4b18135 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryTaskCompletedType.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum QueryTaskCompletedType { + COMPLETED, + FAILED, +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryWorkflowRequest.java b/src/gen/java/com/uber/cadence/entities/QueryWorkflowRequest.java new file mode 100644 index 000000000..b8c6623dc --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryWorkflowRequest.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class QueryWorkflowRequest { + private String domain; + private WorkflowExecution execution; + private WorkflowQuery query; + private QueryRejectCondition queryRejectCondition; + private QueryConsistencyLevel queryConsistencyLevel; +} diff --git a/src/gen/java/com/uber/cadence/entities/QueryWorkflowResponse.java b/src/gen/java/com/uber/cadence/entities/QueryWorkflowResponse.java new file mode 100644 index 000000000..6eaa724be --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/QueryWorkflowResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class QueryWorkflowResponse { + private byte[] queryResult; + private QueryRejected queryRejected; +} diff --git a/src/gen/java/com/uber/cadence/entities/ReapplyEventsRequest.java b/src/gen/java/com/uber/cadence/entities/ReapplyEventsRequest.java new file mode 100644 index 000000000..991759fc8 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ReapplyEventsRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ReapplyEventsRequest { + private String domainName; + private WorkflowExecution workflowExecution; + private DataBlob events; +} diff --git a/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java new file mode 100644 index 000000000..f1e0cf342 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatByIDRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java new file mode 100644 index 000000000..a41e01816 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatRequest { + private byte[] taskToken; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java new file mode 100644 index 000000000..18f84f637 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RecordActivityTaskHeartbeatResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RecordActivityTaskHeartbeatResponse { + private boolean cancelRequested; +} diff --git a/src/gen/java/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java new file mode 100644 index 000000000..480294070 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RecordMarkerDecisionAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RecordMarkerDecisionAttributes { + private String markerName; + private byte[] details; + private Header header; +} diff --git a/src/gen/java/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java b/src/gen/java/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java new file mode 100644 index 000000000..264724115 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RefreshWorkflowTasksRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RefreshWorkflowTasksRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/src/gen/java/com/uber/cadence/entities/RegisterDomainRequest.java b/src/gen/java/com/uber/cadence/entities/RegisterDomainRequest.java new file mode 100644 index 000000000..a16c903d5 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RegisterDomainRequest.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RegisterDomainRequest { + private String name; + private String description; + private String ownerEmail; + private int workflowExecutionRetentionPeriodInDays; + private boolean emitMetric; + private List clusters; + private String activeClusterName; + private Map data; + private String securityToken; + private boolean isGlobalDomain; + private ArchivalStatus historyArchivalStatus; + private String historyArchivalURI; + private ArchivalStatus visibilityArchivalStatus; + private String visibilityArchivalURI; +} diff --git a/src/gen/java/com/uber/cadence/entities/RemoteSyncMatchedError.java b/src/gen/java/com/uber/cadence/entities/RemoteSyncMatchedError.java new file mode 100644 index 000000000..d1e5ab71c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RemoteSyncMatchedError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class RemoteSyncMatchedError extends BaseError { + + public RemoteSyncMatchedError() { + super(); + } + + public RemoteSyncMatchedError(String message, Throwable cause) { + super(message, cause); + } + + public RemoteSyncMatchedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/RemoveTaskRequest.java b/src/gen/java/com/uber/cadence/entities/RemoveTaskRequest.java new file mode 100644 index 000000000..ce2c21e4e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RemoveTaskRequest.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RemoveTaskRequest { + private int shardID; + private int type; + private long taskID; + private long visibilityTimestamp; + private String clusterName; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java new file mode 100644 index 000000000..57e914705 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskDecisionAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelActivityTaskDecisionAttributes { + private String activityId; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java new file mode 100644 index 000000000..f600c7fa6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelActivityTaskFailedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelActivityTaskFailedEventAttributes { + private String activityId; + private String cause; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..4e23c4fb3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionDecisionAttributes { + private String domain; + private String workflowId; + private String runId; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..819152af7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionFailedEventAttributes { + private CancelExternalWorkflowExecutionFailedCause cause; + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private long initiatedEventId; + private byte[] control; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..118ee99c9 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/src/gen/java/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java new file mode 100644 index 000000000..65626a6f6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RequestCancelWorkflowExecutionRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RequestCancelWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String identity; + private String requestId; + private String cause; + private String firstExecutionRunID; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetPointInfo.java b/src/gen/java/com/uber/cadence/entities/ResetPointInfo.java new file mode 100644 index 000000000..33f71666d --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetPointInfo.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetPointInfo { + private String binaryChecksum; + private String runId; + private long firstDecisionCompletedId; + private long createdTimeNano; + private long expiringTimeNano; + private boolean resettable; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetPoints.java b/src/gen/java/com/uber/cadence/entities/ResetPoints.java new file mode 100644 index 000000000..be0aaa02b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetPoints.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetPoints { + private List points; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetQueueRequest.java b/src/gen/java/com/uber/cadence/entities/ResetQueueRequest.java new file mode 100644 index 000000000..5d36842d0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetQueueRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetQueueRequest { + private int shardID; + private String clusterName; + private int type; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListRequest.java b/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListRequest.java new file mode 100644 index 000000000..ea6fc0cb1 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListRequest.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetStickyTaskListRequest { + private String domain; + private WorkflowExecution execution; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListResponse.java b/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListResponse.java new file mode 100644 index 000000000..695ea3619 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetStickyTaskListResponse.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetStickyTaskListResponse {} diff --git a/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java new file mode 100644 index 000000000..fe9896dae --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private long decisionFinishEventId; + private String requestId; + private boolean skipSignalReapply; +} diff --git a/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java b/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java new file mode 100644 index 000000000..787cf0483 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ResetWorkflowExecutionResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ResetWorkflowExecutionResponse { + private String runId; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java new file mode 100644 index 000000000..bbee5b422 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledByIDRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskCanceledByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java new file mode 100644 index 000000000..4d801e5dc --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCanceledRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskCanceledRequest { + private byte[] taskToken; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java new file mode 100644 index 000000000..47e8fe317 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedByIDRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskCompletedByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private byte[] result; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java new file mode 100644 index 000000000..1c0951787 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskCompletedRequest.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskCompletedRequest { + private byte[] taskToken; + private byte[] result; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java new file mode 100644 index 000000000..0a3c2c8c5 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedByIDRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskFailedByIDRequest { + private String domain; + private String workflowID; + private String runID; + private String activityID; + private String reason; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java new file mode 100644 index 000000000..4325718aa --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondActivityTaskFailedRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondActivityTaskFailedRequest { + private byte[] taskToken; + private String reason; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java new file mode 100644 index 000000000..34856bdab --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondCrossClusterTasksCompletedRequest { + private int shardID; + private String targetCluster; + private List taskResponses; + private boolean fetchNewTasks; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java b/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java new file mode 100644 index 000000000..1710ce1f7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondCrossClusterTasksCompletedResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondCrossClusterTasksCompletedResponse { + private List tasks; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java new file mode 100644 index 000000000..47ee31f62 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedRequest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondDecisionTaskCompletedRequest { + private byte[] taskToken; + private List decisions; + private byte[] executionContext; + private String identity; + private StickyExecutionAttributes stickyAttributes; + private boolean returnNewDecisionTask; + private boolean forceCreateNewDecisionTask; + private String binaryChecksum; + private Map queryResults; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java new file mode 100644 index 000000000..81ec13e54 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskCompletedResponse.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondDecisionTaskCompletedResponse { + private PollForDecisionTaskResponse decisionTask; + private Map activitiesToDispatchLocally; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java new file mode 100644 index 000000000..2d01de52a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondDecisionTaskFailedRequest.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondDecisionTaskFailedRequest { + private byte[] taskToken; + private DecisionTaskFailedCause cause; + private byte[] details; + private String identity; + private String binaryChecksum; +} diff --git a/src/gen/java/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java b/src/gen/java/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java new file mode 100644 index 000000000..7b83d5f56 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RespondQueryTaskCompletedRequest.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RespondQueryTaskCompletedRequest { + private byte[] taskToken; + private QueryTaskCompletedType completedType; + private byte[] queryResult; + private String errorMessage; + private WorkerVersionInfo workerVersionInfo; +} diff --git a/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java new file mode 100644 index 000000000..fad0b63d9 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionRequest.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RestartWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java b/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java new file mode 100644 index 000000000..8413b47af --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RestartWorkflowExecutionResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RestartWorkflowExecutionResponse { + private String runId; +} diff --git a/src/gen/java/com/uber/cadence/entities/RetryPolicy.java b/src/gen/java/com/uber/cadence/entities/RetryPolicy.java new file mode 100644 index 000000000..d0a749d9e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RetryPolicy.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class RetryPolicy { + private int initialIntervalInSeconds; + private double backoffCoefficient; + private int maximumIntervalInSeconds; + private int maximumAttempts; + private List nonRetriableErrorReasons; + private int expirationIntervalInSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/RetryTaskV2Error.java b/src/gen/java/com/uber/cadence/entities/RetryTaskV2Error.java new file mode 100644 index 000000000..a213b1407 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/RetryTaskV2Error.java @@ -0,0 +1,47 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class RetryTaskV2Error extends BaseError { + private String domainId; + private String workflowId; + private String runId; + private long startEventId; + private long startEventVersion; + private long endEventId; + private long endEventVersion; + + public RetryTaskV2Error() { + super(); + } + + public RetryTaskV2Error(String message, Throwable cause) { + super(message, cause); + } + + public RetryTaskV2Error(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java new file mode 100644 index 000000000..da92ad5e5 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ScheduleActivityTaskDecisionAttributes.java @@ -0,0 +1,36 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class ScheduleActivityTaskDecisionAttributes { + private String activityId; + private ActivityType activityType; + private String domain; + private TaskList taskList; + private byte[] input; + private int scheduleToCloseTimeoutSeconds; + private int scheduleToStartTimeoutSeconds; + private int startToCloseTimeoutSeconds; + private int heartbeatTimeoutSeconds; + private RetryPolicy retryPolicy; + private Header header; + private boolean requestLocalDispatch; +} diff --git a/src/gen/java/com/uber/cadence/entities/SearchAttributes.java b/src/gen/java/com/uber/cadence/entities/SearchAttributes.java new file mode 100644 index 000000000..5359deb2c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SearchAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SearchAttributes { + private Map indexedFields; +} diff --git a/src/gen/java/com/uber/cadence/entities/ServiceBusyError.java b/src/gen/java/com/uber/cadence/entities/ServiceBusyError.java new file mode 100644 index 000000000..274900264 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/ServiceBusyError.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class ServiceBusyError extends BaseError { + private String reason; + + public ServiceBusyError() { + super(); + } + + public ServiceBusyError(String message, Throwable cause) { + super(message, cause); + } + + public ServiceBusyError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..cd8564879 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionDecisionAttributes { + private String domain; + private WorkflowExecution execution; + private String signalName; + private byte[] input; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java new file mode 100644 index 000000000..94864c4a5 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedCause.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum SignalExternalWorkflowExecutionFailedCause { + UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION, + WORKFLOW_ALREADY_COMPLETED, +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..595c4f1c2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionFailedEventAttributes { + private SignalExternalWorkflowExecutionFailedCause cause; + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private long initiatedEventId; + private byte[] control; +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..b8d7b53f7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalExternalWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalExternalWorkflowExecutionInitiatedEventAttributes { + private long decisionTaskCompletedEventId; + private String domain; + private WorkflowExecution workflowExecution; + private String signalName; + private byte[] input; + private byte[] control; + private boolean childWorkflowOnly; +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java new file mode 100644 index 000000000..8725d974a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncRequest.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionAsyncRequest { + private SignalWithStartWorkflowExecutionRequest request; +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java new file mode 100644 index 000000000..ee2248341 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionAsyncResponse.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionAsyncResponse {} diff --git a/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java new file mode 100644 index 000000000..32fea45d6 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalWithStartWorkflowExecutionRequest.java @@ -0,0 +1,44 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalWithStartWorkflowExecutionRequest { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String identity; + private String requestId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private String signalName; + private byte[] signalInput; + private byte[] control; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Memo memo; + private SearchAttributes searchAttributes; + private Header header; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java new file mode 100644 index 000000000..b89784e5c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SignalWorkflowExecutionRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SignalWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String signalName; + private byte[] input; + private String identity; + private String requestId; + private byte[] control; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java new file mode 100644 index 000000000..2b28bfdfc --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionDecisionAttributes.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionDecisionAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private ParentClosePolicy parentClosePolicy; + private byte[] control; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..02178c801 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionFailedEventAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private ChildWorkflowExecutionFailedCause cause; + private byte[] control; + private long initiatedEventId; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java new file mode 100644 index 000000000..f5898c20a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartChildWorkflowExecutionInitiatedEventAttributes.java @@ -0,0 +1,42 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartChildWorkflowExecutionInitiatedEventAttributes { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private ParentClosePolicy parentClosePolicy; + private byte[] control; + private long decisionTaskCompletedEventId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartTimeFilter.java b/src/gen/java/com/uber/cadence/entities/StartTimeFilter.java new file mode 100644 index 000000000..6aa897999 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartTimeFilter.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartTimeFilter { + private long earliestTime; + private long latestTime; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartTimerDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/StartTimerDecisionAttributes.java new file mode 100644 index 000000000..213e38c76 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartTimerDecisionAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartTimerDecisionAttributes { + private String timerId; + private long startToFireTimeoutSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java new file mode 100644 index 000000000..fc3743bd7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncRequest.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionAsyncRequest { + private StartWorkflowExecutionRequest request; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java new file mode 100644 index 000000000..5828dfafe --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionAsyncResponse.java @@ -0,0 +1,23 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionAsyncResponse {} diff --git a/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionRequest.java new file mode 100644 index 000000000..29c6fbcea --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionRequest.java @@ -0,0 +1,41 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionRequest { + private String domain; + private String workflowId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String identity; + private String requestId; + private WorkflowIdReusePolicy workflowIdReusePolicy; + private RetryPolicy retryPolicy; + private String cronSchedule; + private Memo memo; + private SearchAttributes searchAttributes; + private Header header; + private int delayStartSeconds; + private int jitterStartSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionResponse.java b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionResponse.java new file mode 100644 index 000000000..a396a9d30 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StartWorkflowExecutionResponse.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StartWorkflowExecutionResponse { + private String runId; +} diff --git a/src/gen/java/com/uber/cadence/entities/StickyExecutionAttributes.java b/src/gen/java/com/uber/cadence/entities/StickyExecutionAttributes.java new file mode 100644 index 000000000..2a1960a3f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StickyExecutionAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class StickyExecutionAttributes { + private TaskList workerTaskList; + private int scheduleToStartTimeoutSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/StickyWorkerUnavailableError.java b/src/gen/java/com/uber/cadence/entities/StickyWorkerUnavailableError.java new file mode 100644 index 000000000..dbdf9df9f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/StickyWorkerUnavailableError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class StickyWorkerUnavailableError extends BaseError { + + public StickyWorkerUnavailableError() { + super(); + } + + public StickyWorkerUnavailableError(String message, Throwable cause) { + super(message, cause); + } + + public StickyWorkerUnavailableError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/SupportedClientVersions.java b/src/gen/java/com/uber/cadence/entities/SupportedClientVersions.java new file mode 100644 index 000000000..e002784ca --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/SupportedClientVersions.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class SupportedClientVersions { + private String goSdk; + private String javaSdk; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskIDBlock.java b/src/gen/java/com/uber/cadence/entities/TaskIDBlock.java new file mode 100644 index 000000000..bb89d4120 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskIDBlock.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TaskIDBlock { + private long startID; + private long endID; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskList.java b/src/gen/java/com/uber/cadence/entities/TaskList.java new file mode 100644 index 000000000..3cb07a190 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskList.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TaskList { + private String name; + private TaskListKind kind; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskListKind.java b/src/gen/java/com/uber/cadence/entities/TaskListKind.java new file mode 100644 index 000000000..d169c18c0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskListKind.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum TaskListKind { + NORMAL, + STICKY, +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskListMetadata.java b/src/gen/java/com/uber/cadence/entities/TaskListMetadata.java new file mode 100644 index 000000000..bb6a3fd24 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskListMetadata.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TaskListMetadata { + private double maxTasksPerSecond; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskListPartitionMetadata.java b/src/gen/java/com/uber/cadence/entities/TaskListPartitionMetadata.java new file mode 100644 index 000000000..4b81abbf8 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskListPartitionMetadata.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TaskListPartitionMetadata { + private String key; + private String ownerHostName; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskListStatus.java b/src/gen/java/com/uber/cadence/entities/TaskListStatus.java new file mode 100644 index 000000000..760c83011 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskListStatus.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TaskListStatus { + private long backlogCountHint; + private long readLevel; + private long ackLevel; + private double ratePerSecond; + private TaskIDBlock taskIDBlock; +} diff --git a/src/gen/java/com/uber/cadence/entities/TaskListType.java b/src/gen/java/com/uber/cadence/entities/TaskListType.java new file mode 100644 index 000000000..96a79c9fc --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TaskListType.java @@ -0,0 +1,20 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum TaskListType { + Decision, + Activity, +} diff --git a/src/gen/java/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java b/src/gen/java/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java new file mode 100644 index 000000000..fbcf9935c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TerminateWorkflowExecutionRequest.java @@ -0,0 +1,30 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TerminateWorkflowExecutionRequest { + private String domain; + private WorkflowExecution workflowExecution; + private String reason; + private byte[] details; + private String identity; + private String firstExecutionRunID; +} diff --git a/src/gen/java/com/uber/cadence/entities/TimeoutType.java b/src/gen/java/com/uber/cadence/entities/TimeoutType.java new file mode 100644 index 000000000..7453e23d2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TimeoutType.java @@ -0,0 +1,22 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum TimeoutType { + START_TO_CLOSE, + SCHEDULE_TO_START, + SCHEDULE_TO_CLOSE, + HEARTBEAT, +} diff --git a/src/gen/java/com/uber/cadence/entities/TimerCanceledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/TimerCanceledEventAttributes.java new file mode 100644 index 000000000..800c1bfb3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TimerCanceledEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TimerCanceledEventAttributes { + private String timerId; + private long startedEventId; + private long decisionTaskCompletedEventId; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/TimerFiredEventAttributes.java b/src/gen/java/com/uber/cadence/entities/TimerFiredEventAttributes.java new file mode 100644 index 000000000..56bc00350 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TimerFiredEventAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TimerFiredEventAttributes { + private String timerId; + private long startedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/TimerStartedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/TimerStartedEventAttributes.java new file mode 100644 index 000000000..e07fcf604 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TimerStartedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TimerStartedEventAttributes { + private String timerId; + private long startToFireTimeoutSeconds; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/TransientDecisionInfo.java b/src/gen/java/com/uber/cadence/entities/TransientDecisionInfo.java new file mode 100644 index 000000000..90a586168 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/TransientDecisionInfo.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class TransientDecisionInfo { + private HistoryEvent scheduledEvent; + private HistoryEvent startedEvent; +} diff --git a/src/gen/java/com/uber/cadence/entities/UpdateDomainInfo.java b/src/gen/java/com/uber/cadence/entities/UpdateDomainInfo.java new file mode 100644 index 000000000..405b1c662 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/UpdateDomainInfo.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class UpdateDomainInfo { + private String description; + private String ownerEmail; + private Map data; +} diff --git a/src/gen/java/com/uber/cadence/entities/UpdateDomainRequest.java b/src/gen/java/com/uber/cadence/entities/UpdateDomainRequest.java new file mode 100644 index 000000000..605d15926 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/UpdateDomainRequest.java @@ -0,0 +1,31 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class UpdateDomainRequest { + private String name; + private UpdateDomainInfo updatedInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private String securityToken; + private String deleteBadBinary; + private int failoverTimeoutInSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/UpdateDomainResponse.java b/src/gen/java/com/uber/cadence/entities/UpdateDomainResponse.java new file mode 100644 index 000000000..dbe650401 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/UpdateDomainResponse.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class UpdateDomainResponse { + private DomainInfo domainInfo; + private DomainConfiguration configuration; + private DomainReplicationConfiguration replicationConfiguration; + private long failoverVersion; + private boolean isGlobalDomain; +} diff --git a/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java b/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java new file mode 100644 index 000000000..fed5e2e1b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesDecisionAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class UpsertWorkflowSearchAttributesDecisionAttributes { + private SearchAttributes searchAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java b/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java new file mode 100644 index 000000000..be525f6c3 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/UpsertWorkflowSearchAttributesEventAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class UpsertWorkflowSearchAttributesEventAttributes { + private long decisionTaskCompletedEventId; + private SearchAttributes searchAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/VersionHistories.java b/src/gen/java/com/uber/cadence/entities/VersionHistories.java new file mode 100644 index 000000000..e2d06be99 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/VersionHistories.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class VersionHistories { + private int currentVersionHistoryIndex; + private List histories; +} diff --git a/src/gen/java/com/uber/cadence/entities/VersionHistory.java b/src/gen/java/com/uber/cadence/entities/VersionHistory.java new file mode 100644 index 000000000..d7bfbd368 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/VersionHistory.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class VersionHistory { + private byte[] branchToken; + private List items; +} diff --git a/src/gen/java/com/uber/cadence/entities/VersionHistoryItem.java b/src/gen/java/com/uber/cadence/entities/VersionHistoryItem.java new file mode 100644 index 000000000..b351a8e8f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/VersionHistoryItem.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class VersionHistoryItem { + private long eventID; + private long version; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkerVersionInfo.java b/src/gen/java/com/uber/cadence/entities/WorkerVersionInfo.java new file mode 100644 index 000000000..2cf4ff2d4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkerVersionInfo.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkerVersionInfo { + private String impl; + private String featureVersion; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecution.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecution.java new file mode 100644 index 000000000..4de2905e8 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecution.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecution { + private String workflowId; + private String runId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java new file mode 100644 index 000000000..ba5e38864 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyCompletedError.java @@ -0,0 +1,38 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +public class WorkflowExecutionAlreadyCompletedError extends BaseError { + + public WorkflowExecutionAlreadyCompletedError() { + super(); + } + + public WorkflowExecutionAlreadyCompletedError(String message, Throwable cause) { + super(message, cause); + } + + public WorkflowExecutionAlreadyCompletedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java new file mode 100644 index 000000000..77605ded4 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionAlreadyStartedError.java @@ -0,0 +1,42 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +@Getter +@Setter +@Accessors(chain = true) +@AllArgsConstructor +public class WorkflowExecutionAlreadyStartedError extends BaseError { + private String startRequestId; + private String runId; + + public WorkflowExecutionAlreadyStartedError() { + super(); + } + + public WorkflowExecutionAlreadyStartedError(String message, Throwable cause) { + super(message, cause); + } + + public WorkflowExecutionAlreadyStartedError(Throwable cause) { + super(cause); + } +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java new file mode 100644 index 000000000..7bac607f2 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCancelRequestedEventAttributes.java @@ -0,0 +1,29 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionCancelRequestedEventAttributes { + private String cause; + private long externalInitiatedEventId; + private WorkflowExecution externalWorkflowExecution; + private String identity; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java new file mode 100644 index 000000000..01969a7c0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCanceledEventAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionCanceledEventAttributes { + private long decisionTaskCompletedEventId; + private byte[] details; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java new file mode 100644 index 000000000..141c073d8 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCloseStatus.java @@ -0,0 +1,24 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum WorkflowExecutionCloseStatus { + COMPLETED, + FAILED, + CANCELED, + TERMINATED, + CONTINUED_AS_NEW, + TIMED_OUT, +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java new file mode 100644 index 000000000..a08a206cf --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionCompletedEventAttributes.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionCompletedEventAttributes { + private byte[] result; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionConfiguration.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionConfiguration.java new file mode 100644 index 000000000..ccd0f5529 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionConfiguration.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionConfiguration { + private TaskList taskList; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java new file mode 100644 index 000000000..3cf96e0aa --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionContinuedAsNewEventAttributes.java @@ -0,0 +1,39 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionContinuedAsNewEventAttributes { + private String newExecutionRunId; + private WorkflowType workflowType; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private long decisionTaskCompletedEventId; + private int backoffStartIntervalInSeconds; + private ContinueAsNewInitiator initiator; + private String failureReason; + private byte[] failureDetails; + private byte[] lastCompletionResult; + private Header header; + private Memo memo; + private SearchAttributes searchAttributes; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java new file mode 100644 index 000000000..d5d07e90b --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFailedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionFailedEventAttributes { + private String reason; + private byte[] details; + private long decisionTaskCompletedEventId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFilter.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFilter.java new file mode 100644 index 000000000..f7a3cddc0 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionFilter.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionFilter { + private String workflowId; + private String runId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionInfo.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionInfo.java new file mode 100644 index 000000000..d0b25e7ac --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionInfo.java @@ -0,0 +1,42 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionInfo { + private WorkflowExecution execution; + private WorkflowType type; + private long startTime; + private long closeTime; + private WorkflowExecutionCloseStatus closeStatus; + private long historyLength; + private String parentDomainId; + private String parentDomainName; + private long parentInitatedId; + private WorkflowExecution parentExecution; + private long executionTime; + private Memo memo; + private SearchAttributes searchAttributes; + private ResetPoints autoResetPoints; + private String taskList; + private boolean isCron; + private long updateTime; + private Map partitionConfig; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java new file mode 100644 index 000000000..5db032c51 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionSignaledEventAttributes.java @@ -0,0 +1,28 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionSignaledEventAttributes { + private String signalName; + private byte[] input; + private String identity; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java new file mode 100644 index 000000000..1dc0d9733 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionStartedEventAttributes.java @@ -0,0 +1,52 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionStartedEventAttributes { + private WorkflowType workflowType; + private String parentWorkflowDomain; + private WorkflowExecution parentWorkflowExecution; + private long parentInitiatedEventId; + private TaskList taskList; + private byte[] input; + private int executionStartToCloseTimeoutSeconds; + private int taskStartToCloseTimeoutSeconds; + private String continuedExecutionRunId; + private ContinueAsNewInitiator initiator; + private String continuedFailureReason; + private byte[] continuedFailureDetails; + private byte[] lastCompletionResult; + private String originalExecutionRunId; + private String identity; + private String firstExecutionRunId; + private long firstScheduledTimeNano; + private RetryPolicy retryPolicy; + private int attempt; + private long expirationTimestamp; + private String cronSchedule; + private int firstDecisionTaskBackoffSeconds; + private Memo memo; + private SearchAttributes searchAttributes; + private ResetPoints prevAutoResetPoints; + private Header header; + private Map partitionConfig; + private String requestId; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java new file mode 100644 index 000000000..0f4e3c78f --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTerminatedEventAttributes.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionTerminatedEventAttributes { + private String reason; + private byte[] details; + private String identity; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java new file mode 100644 index 000000000..5d802a36c --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowExecutionTimedOutEventAttributes.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowExecutionTimedOutEventAttributes { + private TimeoutType timeoutType; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowIdReusePolicy.java b/src/gen/java/com/uber/cadence/entities/WorkflowIdReusePolicy.java new file mode 100644 index 000000000..23ddc9b44 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowIdReusePolicy.java @@ -0,0 +1,22 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +public enum WorkflowIdReusePolicy { + AllowDuplicateFailedOnly, + AllowDuplicate, + RejectDuplicate, + TerminateIfRunning, +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowQuery.java b/src/gen/java/com/uber/cadence/entities/WorkflowQuery.java new file mode 100644 index 000000000..d8bc4e56e --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowQuery.java @@ -0,0 +1,26 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowQuery { + private String queryType; + private byte[] queryArgs; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowQueryResult.java b/src/gen/java/com/uber/cadence/entities/WorkflowQueryResult.java new file mode 100644 index 000000000..8f577547a --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowQueryResult.java @@ -0,0 +1,27 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowQueryResult { + private QueryResultType resultType; + private byte[] answer; + private String errorMessage; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowType.java b/src/gen/java/com/uber/cadence/entities/WorkflowType.java new file mode 100644 index 000000000..88b8565aa --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowType.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowType { + private String name; +} diff --git a/src/gen/java/com/uber/cadence/entities/WorkflowTypeFilter.java b/src/gen/java/com/uber/cadence/entities/WorkflowTypeFilter.java new file mode 100644 index 000000000..57b2584a7 --- /dev/null +++ b/src/gen/java/com/uber/cadence/entities/WorkflowTypeFilter.java @@ -0,0 +1,25 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.entities; + +import java.util.*; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Accessors(chain = true) +public class WorkflowTypeFilter { + private String name; +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/DecisionMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/DecisionMapper.java index a3d5e5ca5..e26c75ad2 100644 --- a/src/main/java/com/uber/cadence/internal/compatibility/proto/DecisionMapper.java +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/DecisionMapper.java @@ -55,7 +55,7 @@ class DecisionMapper { static List decisionArray(List t) { if (t == null) { - return null; + return new ArrayList<>(); } List v = new ArrayList<>(); diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapper.java new file mode 100644 index 000000000..71ca1b14f --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapper.java @@ -0,0 +1,274 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.continueAsNewInitiator; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.parentClosePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.workflowIdReusePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.arrayToByteString; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.longToInt; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.secondsToDuration; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.activityType; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.failure; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.header; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.memo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.payload; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.retryPolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.searchAttributes; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskList; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowRunPair; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowType; + +import com.uber.cadence.api.v1.CancelTimerDecisionAttributes; +import com.uber.cadence.api.v1.CancelWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.CompleteWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.ContinueAsNewWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.Decision; +import com.uber.cadence.api.v1.Decision.Builder; +import com.uber.cadence.api.v1.FailWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.RecordMarkerDecisionAttributes; +import com.uber.cadence.api.v1.RequestCancelActivityTaskDecisionAttributes; +import com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.ScheduleActivityTaskDecisionAttributes; +import com.uber.cadence.api.v1.SignalExternalWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.StartChildWorkflowExecutionDecisionAttributes; +import com.uber.cadence.api.v1.StartTimerDecisionAttributes; +import com.uber.cadence.api.v1.UpsertWorkflowSearchAttributesDecisionAttributes; +import java.util.ArrayList; +import java.util.List; + +class DecisionMapper { + static List decisionArray(List t) { + if (t == null) { + return null; + } + + List v = new ArrayList<>(); + for (int i = 0; i < t.size(); i++) { + v.add(decision(t.get(i))); + } + return v; + } + + static Decision decision(com.uber.cadence.entities.Decision d) { + if (d == null) { + return null; + } + Builder decision = Decision.newBuilder(); + switch (d.getDecisionType()) { + case ScheduleActivityTask: + { + com.uber.cadence.entities.ScheduleActivityTaskDecisionAttributes attr = + d.getScheduleActivityTaskDecisionAttributes(); + ScheduleActivityTaskDecisionAttributes.Builder builder = + ScheduleActivityTaskDecisionAttributes.newBuilder() + .setActivityId(attr.getActivityId()) + .setActivityType(activityType(attr.getActivityType())) + .setTaskList(taskList(attr.getTaskList())) + .setInput(payload(attr.getInput())) + .setScheduleToCloseTimeout( + secondsToDuration(attr.getScheduleToCloseTimeoutSeconds())) + .setScheduleToStartTimeout( + secondsToDuration(attr.getScheduleToStartTimeoutSeconds())) + .setStartToCloseTimeout(secondsToDuration(attr.getStartToCloseTimeoutSeconds())) + .setHeartbeatTimeout(secondsToDuration(attr.getHeartbeatTimeoutSeconds())) + .setHeader(header(attr.getHeader())) + .setRequestLocalDispatch(attr.isRequestLocalDispatch()); + if (attr.getRetryPolicy() != null) { + builder.setRetryPolicy(retryPolicy(attr.getRetryPolicy())); + } + if (attr.getDomain() != null) { + builder.setDomain(attr.getDomain()); + } + decision.setScheduleActivityTaskDecisionAttributes(builder); + } + break; + case RequestCancelActivityTask: + { + com.uber.cadence.entities.RequestCancelActivityTaskDecisionAttributes attr = + d.getRequestCancelActivityTaskDecisionAttributes(); + decision.setRequestCancelActivityTaskDecisionAttributes( + RequestCancelActivityTaskDecisionAttributes.newBuilder() + .setActivityId(attr.getActivityId())); + } + break; + case StartTimer: + { + com.uber.cadence.entities.StartTimerDecisionAttributes attr = + d.getStartTimerDecisionAttributes(); + decision.setStartTimerDecisionAttributes( + StartTimerDecisionAttributes.newBuilder() + .setTimerId(attr.getTimerId()) + .setStartToFireTimeout( + secondsToDuration(longToInt(attr.getStartToFireTimeoutSeconds())))); + } + break; + case CompleteWorkflowExecution: + { + com.uber.cadence.entities.CompleteWorkflowExecutionDecisionAttributes attr = + d.getCompleteWorkflowExecutionDecisionAttributes(); + decision.setCompleteWorkflowExecutionDecisionAttributes( + CompleteWorkflowExecutionDecisionAttributes.newBuilder() + .setResult(payload(attr.getResult()))); + } + break; + case FailWorkflowExecution: + { + com.uber.cadence.entities.FailWorkflowExecutionDecisionAttributes attr = + d.getFailWorkflowExecutionDecisionAttributes(); + decision.setFailWorkflowExecutionDecisionAttributes( + FailWorkflowExecutionDecisionAttributes.newBuilder() + .setFailure(failure(attr.getReason(), attr.getDetails()))); + } + break; + case CancelTimer: + { + com.uber.cadence.entities.CancelTimerDecisionAttributes attr = + d.getCancelTimerDecisionAttributes(); + decision.setCancelTimerDecisionAttributes( + CancelTimerDecisionAttributes.newBuilder().setTimerId(attr.getTimerId())); + } + break; + case CancelWorkflowExecution: + { + com.uber.cadence.entities.CancelWorkflowExecutionDecisionAttributes attr = + d.getCancelWorkflowExecutionDecisionAttributes(); + decision.setCancelWorkflowExecutionDecisionAttributes( + CancelWorkflowExecutionDecisionAttributes.newBuilder() + .setDetails(payload(attr.getDetails()))); + } + break; + case RequestCancelExternalWorkflowExecution: + { + com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionDecisionAttributes attr = + d.getRequestCancelExternalWorkflowExecutionDecisionAttributes(); + RequestCancelExternalWorkflowExecutionDecisionAttributes.Builder builder = + RequestCancelExternalWorkflowExecutionDecisionAttributes.newBuilder() + .setDomain(attr.getDomain()) + .setWorkflowExecution(workflowRunPair(attr.getWorkflowId(), attr.getRunId())) + .setChildWorkflowOnly(attr.isChildWorkflowOnly()); + if (attr.getControl() != null) { + builder.setControl(arrayToByteString(attr.getControl())); + } + decision.setRequestCancelExternalWorkflowExecutionDecisionAttributes(builder); + } + break; + case ContinueAsNewWorkflowExecution: + { + com.uber.cadence.entities.ContinueAsNewWorkflowExecutionDecisionAttributes attr = + d.getContinueAsNewWorkflowExecutionDecisionAttributes(); + ContinueAsNewWorkflowExecutionDecisionAttributes.Builder builder = + ContinueAsNewWorkflowExecutionDecisionAttributes.newBuilder() + .setWorkflowType(workflowType(attr.getWorkflowType())) + .setTaskList(taskList(attr.getTaskList())) + .setInput(payload(attr.getInput())) + .setExecutionStartToCloseTimeout( + secondsToDuration(attr.getExecutionStartToCloseTimeoutSeconds())) + .setTaskStartToCloseTimeout( + secondsToDuration(attr.getTaskStartToCloseTimeoutSeconds())) + .setBackoffStartInterval( + secondsToDuration(attr.getBackoffStartIntervalInSeconds())) + .setInitiator(continueAsNewInitiator(attr.getInitiator())) + .setFailure(failure(attr.getFailureReason(), attr.getFailureDetails())) + .setLastCompletionResult(payload(attr.getLastCompletionResult())) + .setHeader(header(attr.getHeader())) + .setMemo(memo(attr.getMemo())) + .setSearchAttributes(searchAttributes(attr.getSearchAttributes())); + if (attr.getRetryPolicy() != null) { + builder.setRetryPolicy(retryPolicy(attr.getRetryPolicy())); + } + if (attr.getCronSchedule() != null) { + builder.setCronSchedule(attr.getCronSchedule()); + } + decision.setContinueAsNewWorkflowExecutionDecisionAttributes(builder); + } + break; + case StartChildWorkflowExecution: + { + com.uber.cadence.entities.StartChildWorkflowExecutionDecisionAttributes attr = + d.getStartChildWorkflowExecutionDecisionAttributes(); + StartChildWorkflowExecutionDecisionAttributes.Builder builder = + StartChildWorkflowExecutionDecisionAttributes.newBuilder() + .setDomain(attr.getDomain()) + .setWorkflowId(attr.getWorkflowId()) + .setWorkflowType(workflowType(attr.getWorkflowType())) + .setTaskList(taskList(attr.getTaskList())) + .setInput(payload(attr.getInput())) + .setExecutionStartToCloseTimeout( + secondsToDuration(attr.getExecutionStartToCloseTimeoutSeconds())) + .setTaskStartToCloseTimeout( + secondsToDuration(attr.getTaskStartToCloseTimeoutSeconds())) + .setParentClosePolicy(parentClosePolicy(attr.getParentClosePolicy())) + .setWorkflowIdReusePolicy(workflowIdReusePolicy(attr.getWorkflowIdReusePolicy())) + .setHeader(header(attr.getHeader())) + .setMemo(memo(attr.getMemo())) + .setSearchAttributes(searchAttributes(attr.getSearchAttributes())); + if (attr.getRetryPolicy() != null) { + builder.setRetryPolicy(retryPolicy(attr.getRetryPolicy())); + } + if (attr.getControl() != null) { + builder.setControl(arrayToByteString(attr.getControl())); + } + if (attr.getCronSchedule() != null) { + builder.setCronSchedule(attr.getCronSchedule()); + } + decision.setStartChildWorkflowExecutionDecisionAttributes(builder); + } + break; + case SignalExternalWorkflowExecution: + { + com.uber.cadence.entities.SignalExternalWorkflowExecutionDecisionAttributes attr = + d.getSignalExternalWorkflowExecutionDecisionAttributes(); + SignalExternalWorkflowExecutionDecisionAttributes.Builder builder = + SignalExternalWorkflowExecutionDecisionAttributes.newBuilder() + .setDomain(attr.getDomain()) + .setWorkflowExecution(workflowExecution(attr.getExecution())) + .setSignalName(attr.getSignalName()) + .setInput(payload(attr.getInput())) + .setChildWorkflowOnly(attr.isChildWorkflowOnly()); + if (attr.getControl() != null) { + builder.setControl(arrayToByteString(attr.getControl())); + } + decision.setSignalExternalWorkflowExecutionDecisionAttributes(builder); + } + break; + case UpsertWorkflowSearchAttributes: + { + com.uber.cadence.entities.UpsertWorkflowSearchAttributesDecisionAttributes attr = + d.getUpsertWorkflowSearchAttributesDecisionAttributes(); + decision.setUpsertWorkflowSearchAttributesDecisionAttributes( + UpsertWorkflowSearchAttributesDecisionAttributes.newBuilder() + .setSearchAttributes(searchAttributes(attr.getSearchAttributes()))); + } + break; + case RecordMarker: + { + com.uber.cadence.entities.RecordMarkerDecisionAttributes attr = + d.getRecordMarkerDecisionAttributes(); + decision.setRecordMarkerDecisionAttributes( + RecordMarkerDecisionAttributes.newBuilder() + .setMarkerName(attr.getMarkerName()) + .setDetails(payload(attr.getDetails())) + .setHeader(header(attr.getHeader()))); + } + break; + default: + throw new IllegalArgumentException("unknown decision type"); + } + return decision.build(); + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/EnumMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/EnumMapper.java new file mode 100644 index 000000000..9970aa889 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/EnumMapper.java @@ -0,0 +1,599 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_BINARY; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_INVALID; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_RESET_STICKY_TASK_LIST; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_RESET_WORKFLOW; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_UNHANDLED_DECISION; +import static com.uber.cadence.api.v1.DecisionTaskFailedCause.DECISION_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE; +import static com.uber.cadence.api.v1.QueryResultType.QUERY_RESULT_TYPE_ANSWERED; +import static com.uber.cadence.api.v1.QueryResultType.QUERY_RESULT_TYPE_FAILED; +import static com.uber.cadence.api.v1.QueryResultType.QUERY_RESULT_TYPE_INVALID; + +import com.uber.cadence.api.v1.*; + +public final class EnumMapper { + + private EnumMapper() {} + + public static TaskListKind taskListKind(com.uber.cadence.entities.TaskListKind t) { + if (t == null) { + return TaskListKind.TASK_LIST_KIND_INVALID; + } + switch (t) { + case NORMAL: + return TaskListKind.TASK_LIST_KIND_NORMAL; + case STICKY: + return TaskListKind.TASK_LIST_KIND_STICKY; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static TaskListType taskListType(com.uber.cadence.entities.TaskListType t) { + if (t == null) { + return TaskListType.TASK_LIST_TYPE_INVALID; + } + switch (t) { + case Decision: + return TaskListType.TASK_LIST_TYPE_DECISION; + case Activity: + return TaskListType.TASK_LIST_TYPE_ACTIVITY; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static EventFilterType eventFilterType( + com.uber.cadence.entities.HistoryEventFilterType t) { + if (t == null) { + return EventFilterType.EVENT_FILTER_TYPE_INVALID; + } + switch (t) { + case ALL_EVENT: + return EventFilterType.EVENT_FILTER_TYPE_ALL_EVENT; + case CLOSE_EVENT: + return EventFilterType.EVENT_FILTER_TYPE_CLOSE_EVENT; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static QueryRejectCondition queryRejectCondition( + com.uber.cadence.entities.QueryRejectCondition t) { + if (t == null) { + return QueryRejectCondition.QUERY_REJECT_CONDITION_INVALID; + } + switch (t) { + case NOT_OPEN: + return QueryRejectCondition.QUERY_REJECT_CONDITION_NOT_OPEN; + case NOT_COMPLETED_CLEANLY: + return QueryRejectCondition.QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static QueryConsistencyLevel queryConsistencyLevel( + com.uber.cadence.entities.QueryConsistencyLevel t) { + if (t == null) { + return QueryConsistencyLevel.QUERY_CONSISTENCY_LEVEL_INVALID; + } + switch (t) { + case EVENTUAL: + return QueryConsistencyLevel.QUERY_CONSISTENCY_LEVEL_EVENTUAL; + case STRONG: + return QueryConsistencyLevel.QUERY_CONSISTENCY_LEVEL_STRONG; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static ContinueAsNewInitiator continueAsNewInitiator( + com.uber.cadence.entities.ContinueAsNewInitiator t) { + if (t == null) { + return ContinueAsNewInitiator.CONTINUE_AS_NEW_INITIATOR_INVALID; + } + switch (t) { + case Decider: + return ContinueAsNewInitiator.CONTINUE_AS_NEW_INITIATOR_DECIDER; + case RetryPolicy: + return ContinueAsNewInitiator.CONTINUE_AS_NEW_INITIATOR_RETRY_POLICY; + case CronSchedule: + return ContinueAsNewInitiator.CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static WorkflowIdReusePolicy workflowIdReusePolicy( + com.uber.cadence.entities.WorkflowIdReusePolicy t) { + if (t == null) { + return WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_INVALID; + } + switch (t) { + case AllowDuplicateFailedOnly: + return WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY; + case AllowDuplicate: + return WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE; + case RejectDuplicate: + return WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE; + case TerminateIfRunning: + return WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static QueryResultType queryResultType(com.uber.cadence.entities.QueryResultType t) { + if (t == null) { + return QUERY_RESULT_TYPE_INVALID; + } + switch (t) { + case ANSWERED: + return QUERY_RESULT_TYPE_ANSWERED; + case FAILED: + return QUERY_RESULT_TYPE_FAILED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static ArchivalStatus archivalStatus(com.uber.cadence.entities.ArchivalStatus t) { + if (t == null) { + return ArchivalStatus.ARCHIVAL_STATUS_INVALID; + } + switch (t) { + case DISABLED: + return ArchivalStatus.ARCHIVAL_STATUS_DISABLED; + case ENABLED: + return ArchivalStatus.ARCHIVAL_STATUS_ENABLED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static ParentClosePolicy parentClosePolicy(com.uber.cadence.entities.ParentClosePolicy t) { + if (t == null) { + return ParentClosePolicy.PARENT_CLOSE_POLICY_INVALID; + } + switch (t) { + case ABANDON: + return ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON; + case REQUEST_CANCEL: + return ParentClosePolicy.PARENT_CLOSE_POLICY_REQUEST_CANCEL; + case TERMINATE: + return ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static DecisionTaskFailedCause decisionTaskFailedCause( + com.uber.cadence.entities.DecisionTaskFailedCause t) { + if (t == null) { + return DECISION_TASK_FAILED_CAUSE_INVALID; + } + switch (t) { + case UNHANDLED_DECISION: + return DECISION_TASK_FAILED_CAUSE_UNHANDLED_DECISION; + case BAD_SCHEDULE_ACTIVITY_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES; + case BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES; + case BAD_START_TIMER_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES; + case BAD_CANCEL_TIMER_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES; + case BAD_RECORD_MARKER_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES; + case BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES; + case BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES; + case BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES; + case BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES; + case BAD_CONTINUE_AS_NEW_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES; + case START_TIMER_DUPLICATE_ID: + return DECISION_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID; + case RESET_STICKY_TASKLIST: + return DECISION_TASK_FAILED_CAUSE_RESET_STICKY_TASK_LIST; + case WORKFLOW_WORKER_UNHANDLED_FAILURE: + return DECISION_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE; + case BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES; + case BAD_START_CHILD_EXECUTION_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES; + case FORCE_CLOSE_DECISION: + return DECISION_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION; + case FAILOVER_CLOSE_DECISION: + return DECISION_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION; + case BAD_SIGNAL_INPUT_SIZE: + return DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE; + case RESET_WORKFLOW: + return DECISION_TASK_FAILED_CAUSE_RESET_WORKFLOW; + case BAD_BINARY: + return DECISION_TASK_FAILED_CAUSE_BAD_BINARY; + case SCHEDULE_ACTIVITY_DUPLICATE_ID: + return DECISION_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID; + case BAD_SEARCH_ATTRIBUTES: + return DECISION_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static WorkflowExecutionCloseStatus workflowExecutionCloseStatus( + com.uber.cadence.entities.WorkflowExecutionCloseStatus t) { + if (t == null) { + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_INVALID; + } + switch (t) { + case COMPLETED: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_COMPLETED; + case FAILED: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_FAILED; + case CANCELED: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_CANCELED; + case TERMINATED: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_TERMINATED; + case CONTINUED_AS_NEW: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_CONTINUED_AS_NEW; + case TIMED_OUT: + return WorkflowExecutionCloseStatus.WORKFLOW_EXECUTION_CLOSE_STATUS_TIMED_OUT; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static QueryResultType queryTaskCompletedType( + com.uber.cadence.entities.QueryTaskCompletedType t) { + if (t == null) { + return QUERY_RESULT_TYPE_INVALID; + } + switch (t) { + case COMPLETED: + return QUERY_RESULT_TYPE_ANSWERED; + case FAILED: + return QUERY_RESULT_TYPE_FAILED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.TaskListKind taskListKind(TaskListKind t) { + switch (t) { + case TASK_LIST_KIND_INVALID: + return null; + case TASK_LIST_KIND_NORMAL: + return com.uber.cadence.entities.TaskListKind.NORMAL; + case TASK_LIST_KIND_STICKY: + return com.uber.cadence.entities.TaskListKind.STICKY; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.QueryRejectCondition queryRejectCondition( + QueryRejectCondition t) { + if (t == QueryRejectCondition.QUERY_REJECT_CONDITION_INVALID) { + return null; + } + switch (t) { + case QUERY_REJECT_CONDITION_NOT_OPEN: + return com.uber.cadence.entities.QueryRejectCondition.NOT_OPEN; + case QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY: + return com.uber.cadence.entities.QueryRejectCondition.NOT_COMPLETED_CLEANLY; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.ContinueAsNewInitiator continueAsNewInitiator( + ContinueAsNewInitiator t) { + switch (t) { + case CONTINUE_AS_NEW_INITIATOR_INVALID: + return null; + case CONTINUE_AS_NEW_INITIATOR_DECIDER: + return com.uber.cadence.entities.ContinueAsNewInitiator.Decider; + case CONTINUE_AS_NEW_INITIATOR_RETRY_POLICY: + return com.uber.cadence.entities.ContinueAsNewInitiator.RetryPolicy; + case CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE: + return com.uber.cadence.entities.ContinueAsNewInitiator.CronSchedule; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.WorkflowIdReusePolicy workflowIdReusePolicy( + WorkflowIdReusePolicy t) { + switch (t) { + case WORKFLOW_ID_REUSE_POLICY_INVALID: + return null; + case WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: + return com.uber.cadence.entities.WorkflowIdReusePolicy.AllowDuplicateFailedOnly; + case WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: + return com.uber.cadence.entities.WorkflowIdReusePolicy.AllowDuplicate; + case WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: + return com.uber.cadence.entities.WorkflowIdReusePolicy.RejectDuplicate; + case WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: + return com.uber.cadence.entities.WorkflowIdReusePolicy.TerminateIfRunning; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.ArchivalStatus archivalStatus(ArchivalStatus t) { + switch (t) { + case ARCHIVAL_STATUS_INVALID: + return null; + case ARCHIVAL_STATUS_DISABLED: + return com.uber.cadence.entities.ArchivalStatus.DISABLED; + case ARCHIVAL_STATUS_ENABLED: + return com.uber.cadence.entities.ArchivalStatus.ENABLED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.ParentClosePolicy parentClosePolicy(ParentClosePolicy t) { + switch (t) { + case PARENT_CLOSE_POLICY_INVALID: + return null; + case PARENT_CLOSE_POLICY_ABANDON: + return com.uber.cadence.entities.ParentClosePolicy.ABANDON; + case PARENT_CLOSE_POLICY_REQUEST_CANCEL: + return com.uber.cadence.entities.ParentClosePolicy.REQUEST_CANCEL; + case PARENT_CLOSE_POLICY_TERMINATE: + return com.uber.cadence.entities.ParentClosePolicy.TERMINATE; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.DecisionTaskFailedCause decisionTaskFailedCause( + DecisionTaskFailedCause t) { + switch (t) { + case DECISION_TASK_FAILED_CAUSE_INVALID: + return null; + case DECISION_TASK_FAILED_CAUSE_UNHANDLED_DECISION: + return com.uber.cadence.entities.DecisionTaskFailedCause.UNHANDLED_DECISION; + case DECISION_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_SCHEDULE_ACTIVITY_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_START_TIMER_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_CANCEL_TIMER_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_RECORD_MARKER_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_CONTINUE_AS_NEW_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID: + return com.uber.cadence.entities.DecisionTaskFailedCause.START_TIMER_DUPLICATE_ID; + case DECISION_TASK_FAILED_CAUSE_RESET_STICKY_TASK_LIST: + return com.uber.cadence.entities.DecisionTaskFailedCause.RESET_STICKY_TASKLIST; + case DECISION_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE: + return com.uber.cadence.entities.DecisionTaskFailedCause.WORKFLOW_WORKER_UNHANDLED_FAILURE; + case DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause + .BAD_START_CHILD_EXECUTION_ATTRIBUTES; + case DECISION_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION: + return com.uber.cadence.entities.DecisionTaskFailedCause.FORCE_CLOSE_DECISION; + case DECISION_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION: + return com.uber.cadence.entities.DecisionTaskFailedCause.FAILOVER_CLOSE_DECISION; + case DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_SIGNAL_INPUT_SIZE; + case DECISION_TASK_FAILED_CAUSE_RESET_WORKFLOW: + return com.uber.cadence.entities.DecisionTaskFailedCause.RESET_WORKFLOW; + case DECISION_TASK_FAILED_CAUSE_BAD_BINARY: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_BINARY; + case DECISION_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID: + return com.uber.cadence.entities.DecisionTaskFailedCause.SCHEDULE_ACTIVITY_DUPLICATE_ID; + case DECISION_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES: + return com.uber.cadence.entities.DecisionTaskFailedCause.BAD_SEARCH_ATTRIBUTES; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.WorkflowExecutionCloseStatus workflowExecutionCloseStatus( + WorkflowExecutionCloseStatus t) { + switch (t) { + case WORKFLOW_EXECUTION_CLOSE_STATUS_INVALID: + return null; + case WORKFLOW_EXECUTION_CLOSE_STATUS_COMPLETED: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.COMPLETED; + case WORKFLOW_EXECUTION_CLOSE_STATUS_FAILED: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.FAILED; + case WORKFLOW_EXECUTION_CLOSE_STATUS_CANCELED: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.CANCELED; + case WORKFLOW_EXECUTION_CLOSE_STATUS_TERMINATED: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.TERMINATED; + case WORKFLOW_EXECUTION_CLOSE_STATUS_CONTINUED_AS_NEW: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.CONTINUED_AS_NEW; + case WORKFLOW_EXECUTION_CLOSE_STATUS_TIMED_OUT: + return com.uber.cadence.entities.WorkflowExecutionCloseStatus.TIMED_OUT; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.DomainStatus domainStatus(DomainStatus t) { + switch (t) { + case DOMAIN_STATUS_INVALID: + return null; + case DOMAIN_STATUS_REGISTERED: + return com.uber.cadence.entities.DomainStatus.REGISTERED; + case DOMAIN_STATUS_DEPRECATED: + return com.uber.cadence.entities.DomainStatus.DEPRECATED; + case DOMAIN_STATUS_DELETED: + return com.uber.cadence.entities.DomainStatus.DELETED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.PendingActivityState pendingActivityState( + PendingActivityState t) { + switch (t) { + case PENDING_ACTIVITY_STATE_INVALID: + return null; + case PENDING_ACTIVITY_STATE_SCHEDULED: + return com.uber.cadence.entities.PendingActivityState.SCHEDULED; + case PENDING_ACTIVITY_STATE_STARTED: + return com.uber.cadence.entities.PendingActivityState.STARTED; + case PENDING_ACTIVITY_STATE_CANCEL_REQUESTED: + return com.uber.cadence.entities.PendingActivityState.CANCEL_REQUESTED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.PendingDecisionState pendingDecisionState( + PendingDecisionState t) { + switch (t) { + case PENDING_DECISION_STATE_INVALID: + return null; + case PENDING_DECISION_STATE_SCHEDULED: + return com.uber.cadence.entities.PendingDecisionState.SCHEDULED; + case PENDING_DECISION_STATE_STARTED: + return com.uber.cadence.entities.PendingDecisionState.STARTED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.IndexedValueType indexedValueType(IndexedValueType t) { + switch (t) { + case INDEXED_VALUE_TYPE_INVALID: + throw new IllegalArgumentException("received IndexedValueType_INDEXED_VALUE_TYPE_INVALID"); + case INDEXED_VALUE_TYPE_STRING: + return com.uber.cadence.entities.IndexedValueType.STRING; + case INDEXED_VALUE_TYPE_KEYWORD: + return com.uber.cadence.entities.IndexedValueType.KEYWORD; + case INDEXED_VALUE_TYPE_INT: + return com.uber.cadence.entities.IndexedValueType.INT; + case INDEXED_VALUE_TYPE_DOUBLE: + return com.uber.cadence.entities.IndexedValueType.DOUBLE; + case INDEXED_VALUE_TYPE_BOOL: + return com.uber.cadence.entities.IndexedValueType.BOOL; + case INDEXED_VALUE_TYPE_DATETIME: + return com.uber.cadence.entities.IndexedValueType.DATETIME; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.EncodingType encodingType(EncodingType t) { + switch (t) { + case ENCODING_TYPE_INVALID: + return null; + case ENCODING_TYPE_THRIFTRW: + return com.uber.cadence.entities.EncodingType.ThriftRW; + case ENCODING_TYPE_JSON: + return com.uber.cadence.entities.EncodingType.JSON; + case ENCODING_TYPE_PROTO3: + throw new UnsupportedOperationException(); + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.TimeoutType timeoutType(TimeoutType t) { + switch (t) { + case TIMEOUT_TYPE_INVALID: + return null; + case TIMEOUT_TYPE_START_TO_CLOSE: + return com.uber.cadence.entities.TimeoutType.START_TO_CLOSE; + case TIMEOUT_TYPE_SCHEDULE_TO_START: + return com.uber.cadence.entities.TimeoutType.SCHEDULE_TO_START; + case TIMEOUT_TYPE_SCHEDULE_TO_CLOSE: + return com.uber.cadence.entities.TimeoutType.SCHEDULE_TO_CLOSE; + case TIMEOUT_TYPE_HEARTBEAT: + return com.uber.cadence.entities.TimeoutType.HEARTBEAT; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.DecisionTaskTimedOutCause decisionTaskTimedOutCause( + DecisionTaskTimedOutCause t) { + switch (t) { + case DECISION_TASK_TIMED_OUT_CAUSE_INVALID: + return null; + case DECISION_TASK_TIMED_OUT_CAUSE_TIMEOUT: + return com.uber.cadence.entities.DecisionTaskTimedOutCause.TIMEOUT; + case DECISION_TASK_TIMED_OUT_CAUSE_RESET: + return com.uber.cadence.entities.DecisionTaskTimedOutCause.RESET; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.CancelExternalWorkflowExecutionFailedCause + cancelExternalWorkflowExecutionFailedCause(CancelExternalWorkflowExecutionFailedCause t) { + switch (t) { + case CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID: + return null; + case CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION: + return com.uber.cadence.entities.CancelExternalWorkflowExecutionFailedCause + .UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION; + case CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_COMPLETED: + return com.uber.cadence.entities.CancelExternalWorkflowExecutionFailedCause + .WORKFLOW_ALREADY_COMPLETED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedCause + signalExternalWorkflowExecutionFailedCause(SignalExternalWorkflowExecutionFailedCause t) { + switch (t) { + case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID: + return null; + case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION: + return com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedCause + .UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION; + case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_COMPLETED: + return com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedCause + .WORKFLOW_ALREADY_COMPLETED; + } + throw new IllegalArgumentException("unexpected enum value"); + } + + public static com.uber.cadence.entities.ChildWorkflowExecutionFailedCause + childWorkflowExecutionFailedCause(ChildWorkflowExecutionFailedCause t) { + switch (t) { + case CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID: + return null; + case CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_RUNNING: + return com.uber.cadence.entities.ChildWorkflowExecutionFailedCause.WORKFLOW_ALREADY_RUNNING; + } + throw new IllegalArgumentException("unexpected enum value"); + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapper.java new file mode 100644 index 000000000..2e39a6050 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapper.java @@ -0,0 +1,109 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.uber.cadence.internal.compatibility.proto.mappers; + +import com.google.protobuf.Any; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.rpc.Status; +import com.uber.cadence.entities.AccessDeniedError; +import com.uber.cadence.entities.BaseError; +import com.uber.cadence.entities.CancellationAlreadyRequestedError; +import com.uber.cadence.entities.ClientVersionNotSupportedError; +import com.uber.cadence.entities.DomainAlreadyExistsError; +import com.uber.cadence.entities.DomainNotActiveError; +import com.uber.cadence.entities.EntityNotExistsError; +import com.uber.cadence.entities.FeatureNotEnabledError; +import com.uber.cadence.entities.InternalDataInconsistencyError; +import com.uber.cadence.entities.InternalServiceError; +import com.uber.cadence.entities.LimitExceededError; +import com.uber.cadence.entities.ServiceBusyError; +import com.uber.cadence.entities.WorkflowExecutionAlreadyCompletedError; +import com.uber.cadence.entities.WorkflowExecutionAlreadyStartedError; +import io.grpc.StatusRuntimeException; +import io.grpc.protobuf.StatusProto; + +public class ErrorMapper { + public static BaseError Error(StatusRuntimeException e) { + + Status status = StatusProto.fromThrowable(e); + if (status == null) { + return new BaseError("empty status", e); + } + + Any detail = Any.getDefaultInstance(); + if (status.getDetailsCount() > 0) { + detail = status.getDetails(0); + } + + try { + switch (e.getStatus().getCode()) { + case PERMISSION_DENIED: + return new AccessDeniedError(e); + case INTERNAL: + return new InternalServiceError(e); + case NOT_FOUND: + if (detail.is(com.uber.cadence.api.v1.WorkflowExecutionAlreadyCompletedError.class)) { + return new WorkflowExecutionAlreadyCompletedError(e); + } else { + return new EntityNotExistsError(e); + } + case ALREADY_EXISTS: + if (detail.is(com.uber.cadence.api.v1.CancellationAlreadyRequestedError.class)) { + return new CancellationAlreadyRequestedError(e); + } else if (detail.is(com.uber.cadence.api.v1.DomainAlreadyExistsError.class)) { + return new DomainAlreadyExistsError(e); + } else if (detail.is( + com.uber.cadence.api.v1.WorkflowExecutionAlreadyStartedError.class)) { + com.uber.cadence.api.v1.WorkflowExecutionAlreadyStartedError error = + detail.unpack(com.uber.cadence.api.v1.WorkflowExecutionAlreadyStartedError.class); + return new WorkflowExecutionAlreadyStartedError( + error.getStartRequestId(), error.getRunId()); + } + case DATA_LOSS: + return new InternalDataInconsistencyError(e); + case FAILED_PRECONDITION: + if (detail.is(com.uber.cadence.api.v1.ClientVersionNotSupportedError.class)) { + com.uber.cadence.api.v1.ClientVersionNotSupportedError error = + detail.unpack(com.uber.cadence.api.v1.ClientVersionNotSupportedError.class); + return new ClientVersionNotSupportedError( + error.getFeatureVersion(), error.getClientImpl(), error.getSupportedVersions()); + } else if (detail.is(com.uber.cadence.api.v1.FeatureNotEnabledError.class)) { + com.uber.cadence.api.v1.FeatureNotEnabledError error = + detail.unpack(com.uber.cadence.api.v1.FeatureNotEnabledError.class); + return new FeatureNotEnabledError(error.getFeatureFlag()); + } else if (detail.is(com.uber.cadence.api.v1.DomainNotActiveError.class)) { + com.uber.cadence.api.v1.DomainNotActiveError error = + detail.unpack(com.uber.cadence.api.v1.DomainNotActiveError.class); + return new DomainNotActiveError( + error.getDomain(), error.getCurrentCluster(), error.getActiveCluster()); + } + case RESOURCE_EXHAUSTED: + if (detail.is(com.uber.cadence.api.v1.LimitExceededError.class)) { + return new LimitExceededError(e); + } else { + return new ServiceBusyError(e); + } + case UNKNOWN: + default: + return new BaseError(e); + } + } catch (InvalidProtocolBufferException ex) { + return new BaseError(ex); + } + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/Helpers.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/Helpers.java new file mode 100644 index 000000000..8128fbc66 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/Helpers.java @@ -0,0 +1,99 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Strings; +import com.google.protobuf.ByteString; +import com.google.protobuf.DoubleValue; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Int64Value; +import com.google.protobuf.Timestamp; +import com.google.protobuf.util.Durations; +import com.google.protobuf.util.Timestamps; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +class Helpers { + + static DoubleValue fromDoubleValue(double v) { + return DoubleValue.newBuilder().setValue(v).build(); + } + + static Timestamp unixNanoToTime(long t) { + return Timestamps.fromNanos(t); + } + + static Duration secondsToDuration(int d) { + return Duration.newBuilder().setSeconds(d).build(); + } + + static int longToInt(long v) { + return (int) v; + } + + static FieldMask newFieldMask(List fields) { + return FieldMask.newBuilder().addAllPaths(fields).build(); + } + + static Duration daysToDuration(int days) { + return Durations.fromDays(days); + } + + static Map nullToEmpty(Map t) { + return MoreObjects.firstNonNull(t, Collections.emptyMap()); + } + + static String nullToEmpty(String t) { + return Strings.nullToEmpty(t); + } + + static boolean nullToEmpty(boolean t) { + return MoreObjects.firstNonNull(t, false); + } + + static ByteString arrayToByteString(byte[] t) { + if (t == null) { + return null; + } + return ByteString.copyFrom(t); + } + + static long toInt64Value(Int64Value v) { + return v.getValue(); + } + + static long timeToUnixNano(Timestamp t) { + return Timestamps.toNanos(t); + } + + static int durationToDays(Duration d) { + return (int) Durations.toDays(d); + } + + static int durationToSeconds(Duration d) { + return (int) Durations.toSeconds(d); + } + + static byte[] byteStringToArray(ByteString t) { + if (t == null || t.size() == 0) { + return null; + } + return t.toByteArray(); + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/HistoryMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/HistoryMapper.java new file mode 100644 index 000000000..e0f27e1a3 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/HistoryMapper.java @@ -0,0 +1,1140 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.entities.EventType.*; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.cancelExternalWorkflowExecutionFailedCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.childWorkflowExecutionFailedCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.continueAsNewInitiator; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.decisionTaskFailedCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.decisionTaskTimedOutCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.parentClosePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.signalExternalWorkflowExecutionFailedCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.timeoutType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.workflowIdReusePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.byteStringToArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.durationToSeconds; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.timeToUnixNano; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.activityType; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.externalInitiatedId; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.externalWorkflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.failureDetails; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.failureReason; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.header; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.memo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.parentDomainName; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.parentInitiatedId; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.parentWorkflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.payload; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.resetPoints; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.retryPolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.searchAttributes; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskList; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowType; + +import java.util.ArrayList; +import java.util.List; + +class HistoryMapper { + + static com.uber.cadence.entities.History history(com.uber.cadence.api.v1.History t) { + if (t == null || t == com.uber.cadence.api.v1.History.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.History history = new com.uber.cadence.entities.History(); + history.setEvents(historyEventArray(t.getEventsList())); + return history; + } + + static List historyEventArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (int i = 0; i < t.size(); i++) { + v.add(historyEvent(t.get(i))); + } + return v; + } + + static com.uber.cadence.entities.HistoryEvent historyEvent( + com.uber.cadence.api.v1.HistoryEvent e) { + if (e == null || e == com.uber.cadence.api.v1.HistoryEvent.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.HistoryEvent event = new com.uber.cadence.entities.HistoryEvent(); + event.setEventId(e.getEventId()); + event.setTimestamp(timeToUnixNano(e.getEventTime())); + event.setVersion(e.getVersion()); + event.setTaskId(e.getTaskId()); + + if (e.getWorkflowExecutionStartedEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionStartedEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionStarted); + event.setWorkflowExecutionStartedEventAttributes( + workflowExecutionStartedEventAttributes(e.getWorkflowExecutionStartedEventAttributes())); + } else if (e.getWorkflowExecutionCompletedEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionCompletedEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionCompleted); + event.setWorkflowExecutionCompletedEventAttributes( + workflowExecutionCompletedEventAttributes( + e.getWorkflowExecutionCompletedEventAttributes())); + } else if (e.getWorkflowExecutionFailedEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionFailedEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionFailed); + event.setWorkflowExecutionFailedEventAttributes( + workflowExecutionFailedEventAttributes(e.getWorkflowExecutionFailedEventAttributes())); + } else if (e.getWorkflowExecutionTimedOutEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionTimedOutEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionTimedOut); + event.setWorkflowExecutionTimedOutEventAttributes( + workflowExecutionTimedOutEventAttributes( + e.getWorkflowExecutionTimedOutEventAttributes())); + } else if (e.getDecisionTaskScheduledEventAttributes() + != com.uber.cadence.api.v1.DecisionTaskScheduledEventAttributes.getDefaultInstance()) { + event.setEventType(DecisionTaskScheduled); + event.setDecisionTaskScheduledEventAttributes( + decisionTaskScheduledEventAttributes(e.getDecisionTaskScheduledEventAttributes())); + } else if (e.getDecisionTaskStartedEventAttributes() + != com.uber.cadence.api.v1.DecisionTaskStartedEventAttributes.getDefaultInstance()) { + event.setEventType(DecisionTaskStarted); + event.setDecisionTaskStartedEventAttributes( + decisionTaskStartedEventAttributes(e.getDecisionTaskStartedEventAttributes())); + } else if (e.getDecisionTaskCompletedEventAttributes() + != com.uber.cadence.api.v1.DecisionTaskCompletedEventAttributes.getDefaultInstance()) { + event.setEventType(DecisionTaskCompleted); + event.setDecisionTaskCompletedEventAttributes( + decisionTaskCompletedEventAttributes(e.getDecisionTaskCompletedEventAttributes())); + } else if (e.getDecisionTaskTimedOutEventAttributes() + != com.uber.cadence.api.v1.DecisionTaskTimedOutEventAttributes.getDefaultInstance()) { + event.setEventType(DecisionTaskTimedOut); + event.setDecisionTaskTimedOutEventAttributes( + decisionTaskTimedOutEventAttributes(e.getDecisionTaskTimedOutEventAttributes())); + } else if (e.getDecisionTaskFailedEventAttributes() + != com.uber.cadence.api.v1.DecisionTaskFailedEventAttributes.getDefaultInstance()) { + event.setEventType(DecisionTaskFailed); + event.setDecisionTaskFailedEventAttributes( + decisionTaskFailedEventAttributes(e.getDecisionTaskFailedEventAttributes())); + } else if (e.getActivityTaskScheduledEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskScheduledEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskScheduled); + event.setActivityTaskScheduledEventAttributes( + activityTaskScheduledEventAttributes(e.getActivityTaskScheduledEventAttributes())); + } else if (e.getActivityTaskStartedEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskStartedEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskStarted); + event.setActivityTaskStartedEventAttributes( + activityTaskStartedEventAttributes(e.getActivityTaskStartedEventAttributes())); + } else if (e.getActivityTaskCompletedEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskCompletedEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskCompleted); + event.setActivityTaskCompletedEventAttributes( + activityTaskCompletedEventAttributes(e.getActivityTaskCompletedEventAttributes())); + } else if (e.getActivityTaskFailedEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskFailedEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskFailed); + event.setActivityTaskFailedEventAttributes( + activityTaskFailedEventAttributes(e.getActivityTaskFailedEventAttributes())); + } else if (e.getActivityTaskTimedOutEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskTimedOutEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskTimedOut); + event.setActivityTaskTimedOutEventAttributes( + activityTaskTimedOutEventAttributes(e.getActivityTaskTimedOutEventAttributes())); + } else if (e.getTimerStartedEventAttributes() + != com.uber.cadence.api.v1.TimerStartedEventAttributes.getDefaultInstance()) { + event.setEventType(TimerStarted); + event.setTimerStartedEventAttributes( + timerStartedEventAttributes(e.getTimerStartedEventAttributes())); + } else if (e.getTimerFiredEventAttributes() + != com.uber.cadence.api.v1.TimerFiredEventAttributes.getDefaultInstance()) { + event.setEventType(TimerFired); + event.setTimerFiredEventAttributes( + timerFiredEventAttributes(e.getTimerFiredEventAttributes())); + } else if (e.getActivityTaskCancelRequestedEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskCancelRequestedEventAttributes + .getDefaultInstance()) { + event.setEventType(ActivityTaskCancelRequested); + event.setActivityTaskCancelRequestedEventAttributes( + activityTaskCancelRequestedEventAttributes( + e.getActivityTaskCancelRequestedEventAttributes())); + } else if (e.getRequestCancelActivityTaskFailedEventAttributes() + != com.uber.cadence.api.v1.RequestCancelActivityTaskFailedEventAttributes + .getDefaultInstance()) { + event.setEventType(RequestCancelActivityTaskFailed); + event.setRequestCancelActivityTaskFailedEventAttributes( + requestCancelActivityTaskFailedEventAttributes( + e.getRequestCancelActivityTaskFailedEventAttributes())); + } else if (e.getActivityTaskCanceledEventAttributes() + != com.uber.cadence.api.v1.ActivityTaskCanceledEventAttributes.getDefaultInstance()) { + event.setEventType(ActivityTaskCanceled); + event.setActivityTaskCanceledEventAttributes( + activityTaskCanceledEventAttributes(e.getActivityTaskCanceledEventAttributes())); + } else if (e.getTimerCanceledEventAttributes() + != com.uber.cadence.api.v1.TimerCanceledEventAttributes.getDefaultInstance()) { + event.setEventType(TimerCanceled); + event.setTimerCanceledEventAttributes( + timerCanceledEventAttributes(e.getTimerCanceledEventAttributes())); + } else if (e.getCancelTimerFailedEventAttributes() + != com.uber.cadence.api.v1.CancelTimerFailedEventAttributes.getDefaultInstance()) { + event.setEventType(CancelTimerFailed); + event.setCancelTimerFailedEventAttributes( + cancelTimerFailedEventAttributes(e.getCancelTimerFailedEventAttributes())); + } else if (e.getMarkerRecordedEventAttributes() + != com.uber.cadence.api.v1.MarkerRecordedEventAttributes.getDefaultInstance()) { + event.setEventType(MarkerRecorded); + event.setMarkerRecordedEventAttributes( + markerRecordedEventAttributes(e.getMarkerRecordedEventAttributes())); + } else if (e.getWorkflowExecutionSignaledEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionSignaledEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionSignaled); + event.setWorkflowExecutionSignaledEventAttributes( + workflowExecutionSignaledEventAttributes( + e.getWorkflowExecutionSignaledEventAttributes())); + } else if (e.getWorkflowExecutionTerminatedEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionTerminatedEventAttributes + .getDefaultInstance()) { + event.setEventType(WorkflowExecutionTerminated); + event.setWorkflowExecutionTerminatedEventAttributes( + workflowExecutionTerminatedEventAttributes( + e.getWorkflowExecutionTerminatedEventAttributes())); + } else if (e.getWorkflowExecutionCancelRequestedEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionCancelRequestedEventAttributes + .getDefaultInstance()) { + event.setEventType(WorkflowExecutionCancelRequested); + event.setWorkflowExecutionCancelRequestedEventAttributes( + workflowExecutionCancelRequestedEventAttributes( + e.getWorkflowExecutionCancelRequestedEventAttributes())); + } else if (e.getWorkflowExecutionCanceledEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionCanceledEventAttributes.getDefaultInstance()) { + event.setEventType(WorkflowExecutionCanceled); + event.setWorkflowExecutionCanceledEventAttributes( + workflowExecutionCanceledEventAttributes( + e.getWorkflowExecutionCanceledEventAttributes())); + } else if (e.getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() + != com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + event.setEventType(RequestCancelExternalWorkflowExecutionInitiated); + event.setRequestCancelExternalWorkflowExecutionInitiatedEventAttributes( + requestCancelExternalWorkflowExecutionInitiatedEventAttributes( + e.getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes())); + } else if (e.getRequestCancelExternalWorkflowExecutionFailedEventAttributes() + != com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + event.setEventType(RequestCancelExternalWorkflowExecutionFailed); + event.setRequestCancelExternalWorkflowExecutionFailedEventAttributes( + requestCancelExternalWorkflowExecutionFailedEventAttributes( + e.getRequestCancelExternalWorkflowExecutionFailedEventAttributes())); + } else if (e.getExternalWorkflowExecutionCancelRequestedEventAttributes() + != com.uber.cadence.api.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes + .getDefaultInstance()) { + event.setEventType(ExternalWorkflowExecutionCancelRequested); + event.setExternalWorkflowExecutionCancelRequestedEventAttributes( + externalWorkflowExecutionCancelRequestedEventAttributes( + e.getExternalWorkflowExecutionCancelRequestedEventAttributes())); + } else if (e.getWorkflowExecutionContinuedAsNewEventAttributes() + != com.uber.cadence.api.v1.WorkflowExecutionContinuedAsNewEventAttributes + .getDefaultInstance()) { + event.setEventType(WorkflowExecutionContinuedAsNew); + event.setWorkflowExecutionContinuedAsNewEventAttributes( + workflowExecutionContinuedAsNewEventAttributes( + e.getWorkflowExecutionContinuedAsNewEventAttributes())); + } else if (e.getStartChildWorkflowExecutionInitiatedEventAttributes() + != com.uber.cadence.api.v1.StartChildWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + event.setEventType(StartChildWorkflowExecutionInitiated); + event.setStartChildWorkflowExecutionInitiatedEventAttributes( + startChildWorkflowExecutionInitiatedEventAttributes( + e.getStartChildWorkflowExecutionInitiatedEventAttributes())); + } else if (e.getStartChildWorkflowExecutionFailedEventAttributes() + != com.uber.cadence.api.v1.StartChildWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + event.setEventType(StartChildWorkflowExecutionFailed); + event.setStartChildWorkflowExecutionFailedEventAttributes( + startChildWorkflowExecutionFailedEventAttributes( + e.getStartChildWorkflowExecutionFailedEventAttributes())); + } else if (e.getChildWorkflowExecutionStartedEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionStartedEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionStarted); + event.setChildWorkflowExecutionStartedEventAttributes( + childWorkflowExecutionStartedEventAttributes( + e.getChildWorkflowExecutionStartedEventAttributes())); + } else if (e.getChildWorkflowExecutionCompletedEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionCompletedEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionCompleted); + event.setChildWorkflowExecutionCompletedEventAttributes( + childWorkflowExecutionCompletedEventAttributes( + e.getChildWorkflowExecutionCompletedEventAttributes())); + } else if (e.getChildWorkflowExecutionFailedEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionFailed); + event.setChildWorkflowExecutionFailedEventAttributes( + childWorkflowExecutionFailedEventAttributes( + e.getChildWorkflowExecutionFailedEventAttributes())); + } else if (e.getChildWorkflowExecutionCanceledEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionCanceledEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionCanceled); + event.setChildWorkflowExecutionCanceledEventAttributes( + childWorkflowExecutionCanceledEventAttributes( + e.getChildWorkflowExecutionCanceledEventAttributes())); + } else if (e.getChildWorkflowExecutionTimedOutEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionTimedOutEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionTimedOut); + event.setChildWorkflowExecutionTimedOutEventAttributes( + childWorkflowExecutionTimedOutEventAttributes( + e.getChildWorkflowExecutionTimedOutEventAttributes())); + } else if (e.getChildWorkflowExecutionTerminatedEventAttributes() + != com.uber.cadence.api.v1.ChildWorkflowExecutionTerminatedEventAttributes + .getDefaultInstance()) { + event.setEventType(ChildWorkflowExecutionTerminated); + event.setChildWorkflowExecutionTerminatedEventAttributes( + childWorkflowExecutionTerminatedEventAttributes( + e.getChildWorkflowExecutionTerminatedEventAttributes())); + } else if (e.getSignalExternalWorkflowExecutionInitiatedEventAttributes() + != com.uber.cadence.api.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + event.setEventType(SignalExternalWorkflowExecutionInitiated); + event.setSignalExternalWorkflowExecutionInitiatedEventAttributes( + signalExternalWorkflowExecutionInitiatedEventAttributes( + e.getSignalExternalWorkflowExecutionInitiatedEventAttributes())); + } else if (e.getSignalExternalWorkflowExecutionFailedEventAttributes() + != com.uber.cadence.api.v1.SignalExternalWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + event.setEventType(SignalExternalWorkflowExecutionFailed); + event.setSignalExternalWorkflowExecutionFailedEventAttributes( + signalExternalWorkflowExecutionFailedEventAttributes( + e.getSignalExternalWorkflowExecutionFailedEventAttributes())); + } else if (e.getExternalWorkflowExecutionSignaledEventAttributes() + != com.uber.cadence.api.v1.ExternalWorkflowExecutionSignaledEventAttributes + .getDefaultInstance()) { + event.setEventType(ExternalWorkflowExecutionSignaled); + event.setExternalWorkflowExecutionSignaledEventAttributes( + externalWorkflowExecutionSignaledEventAttributes( + e.getExternalWorkflowExecutionSignaledEventAttributes())); + } else if (e.getUpsertWorkflowSearchAttributesEventAttributes() + != com.uber.cadence.api.v1.UpsertWorkflowSearchAttributesEventAttributes + .getDefaultInstance()) { + event.setEventType(UpsertWorkflowSearchAttributes); + event.setUpsertWorkflowSearchAttributesEventAttributes( + upsertWorkflowSearchAttributesEventAttributes( + e.getUpsertWorkflowSearchAttributesEventAttributes())); + } else { + throw new IllegalArgumentException("unknown event type"); + } + return event; + } + + static com.uber.cadence.entities.ActivityTaskCancelRequestedEventAttributes + activityTaskCancelRequestedEventAttributes( + com.uber.cadence.api.v1.ActivityTaskCancelRequestedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ActivityTaskCancelRequestedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskCancelRequestedEventAttributes res = + new com.uber.cadence.entities.ActivityTaskCancelRequestedEventAttributes(); + res.setActivityId(t.getActivityId()); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.ActivityTaskCanceledEventAttributes + activityTaskCanceledEventAttributes( + com.uber.cadence.api.v1.ActivityTaskCanceledEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskCanceledEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskCanceledEventAttributes res = + new com.uber.cadence.entities.ActivityTaskCanceledEventAttributes(); + res.setDetails(payload(t.getDetails())); + res.setLatestCancelRequestedEventId(t.getLatestCancelRequestedEventId()); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.ActivityTaskCompletedEventAttributes + activityTaskCompletedEventAttributes( + com.uber.cadence.api.v1.ActivityTaskCompletedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskCompletedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskCompletedEventAttributes res = + new com.uber.cadence.entities.ActivityTaskCompletedEventAttributes(); + res.setResult(payload(t.getResult())); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.ActivityTaskFailedEventAttributes + activityTaskFailedEventAttributes( + com.uber.cadence.api.v1.ActivityTaskFailedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskFailedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskFailedEventAttributes res = + new com.uber.cadence.entities.ActivityTaskFailedEventAttributes(); + res.setReason(failureReason(t.getFailure())); + res.setDetails(failureDetails(t.getFailure())); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.ActivityTaskScheduledEventAttributes + activityTaskScheduledEventAttributes( + com.uber.cadence.api.v1.ActivityTaskScheduledEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskScheduledEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskScheduledEventAttributes res = + new com.uber.cadence.entities.ActivityTaskScheduledEventAttributes(); + res.setActivityId(t.getActivityId()); + res.setActivityType(activityType(t.getActivityType())); + res.setDomain(t.getDomain()); + res.setTaskList(taskList(t.getTaskList())); + res.setInput(payload(t.getInput())); + res.setScheduleToCloseTimeoutSeconds(durationToSeconds(t.getScheduleToCloseTimeout())); + res.setScheduleToStartTimeoutSeconds(durationToSeconds(t.getScheduleToStartTimeout())); + res.setStartToCloseTimeoutSeconds(durationToSeconds(t.getStartToCloseTimeout())); + res.setHeartbeatTimeoutSeconds(durationToSeconds(t.getHeartbeatTimeout())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setRetryPolicy(retryPolicy(t.getRetryPolicy())); + res.setHeader(header(t.getHeader())); + return res; + } + + static com.uber.cadence.entities.ActivityTaskStartedEventAttributes + activityTaskStartedEventAttributes( + com.uber.cadence.api.v1.ActivityTaskStartedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskStartedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskStartedEventAttributes res = + new com.uber.cadence.entities.ActivityTaskStartedEventAttributes(); + res.setScheduledEventId(t.getScheduledEventId()); + res.setIdentity(t.getIdentity()); + res.setRequestId(t.getRequestId()); + res.setAttempt(t.getAttempt()); + res.setLastFailureReason(failureReason(t.getLastFailure())); + res.setLastFailureDetails(failureDetails(t.getLastFailure())); + return res; + } + + static com.uber.cadence.entities.ActivityTaskTimedOutEventAttributes + activityTaskTimedOutEventAttributes( + com.uber.cadence.api.v1.ActivityTaskTimedOutEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.ActivityTaskTimedOutEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityTaskTimedOutEventAttributes res = + new com.uber.cadence.entities.ActivityTaskTimedOutEventAttributes(); + res.setDetails(payload(t.getDetails())); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setTimeoutType(EnumMapper.timeoutType(t.getTimeoutType())); + res.setLastFailureReason(failureReason(t.getLastFailure())); + res.setLastFailureDetails(failureDetails(t.getLastFailure())); + return res; + } + + static com.uber.cadence.entities.CancelTimerFailedEventAttributes + cancelTimerFailedEventAttributes(com.uber.cadence.api.v1.CancelTimerFailedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.CancelTimerFailedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.CancelTimerFailedEventAttributes res = + new com.uber.cadence.entities.CancelTimerFailedEventAttributes(); + res.setTimerId(t.getTimerId()); + res.setCause(t.getCause()); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionCanceledEventAttributes + childWorkflowExecutionCanceledEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionCanceledEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionCanceledEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionCanceledEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionCanceledEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setDetails(payload(t.getDetails())); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionCompletedEventAttributes + childWorkflowExecutionCompletedEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionCompletedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionCompletedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionCompletedEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionCompletedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setResult(payload(t.getResult())); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionFailedEventAttributes + childWorkflowExecutionFailedEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionFailedEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionFailedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setReason(failureReason(t.getFailure())); + res.setDetails(failureDetails(t.getFailure())); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionStartedEventAttributes + childWorkflowExecutionStartedEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionStartedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionStartedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionStartedEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionStartedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setHeader(header(t.getHeader())); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionTerminatedEventAttributes + childWorkflowExecutionTerminatedEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionTerminatedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionTerminatedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionTerminatedEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionTerminatedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setStartedEventId(t.getStartedEventId()); + return res; + } + + static com.uber.cadence.entities.ChildWorkflowExecutionTimedOutEventAttributes + childWorkflowExecutionTimedOutEventAttributes( + com.uber.cadence.api.v1.ChildWorkflowExecutionTimedOutEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ChildWorkflowExecutionTimedOutEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ChildWorkflowExecutionTimedOutEventAttributes res = + new com.uber.cadence.entities.ChildWorkflowExecutionTimedOutEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setTimeoutType(EnumMapper.timeoutType(t.getTimeoutType())); + return res; + } + + static com.uber.cadence.entities.DecisionTaskFailedEventAttributes + decisionTaskFailedEventAttributes( + com.uber.cadence.api.v1.DecisionTaskFailedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.DecisionTaskFailedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DecisionTaskFailedEventAttributes res = + new com.uber.cadence.entities.DecisionTaskFailedEventAttributes(); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setCause(decisionTaskFailedCause(t.getCause())); + res.setReason(failureReason(t.getFailure())); + res.setDetails(failureDetails(t.getFailure())); + res.setIdentity(t.getIdentity()); + res.setBaseRunId(t.getBaseRunId()); + res.setNewRunId(t.getNewRunId()); + res.setForkEventVersion(t.getForkEventVersion()); + res.setBinaryChecksum(t.getBinaryChecksum()); + return res; + } + + static com.uber.cadence.entities.DecisionTaskScheduledEventAttributes + decisionTaskScheduledEventAttributes( + com.uber.cadence.api.v1.DecisionTaskScheduledEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.DecisionTaskScheduledEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DecisionTaskScheduledEventAttributes res = + new com.uber.cadence.entities.DecisionTaskScheduledEventAttributes(); + res.setTaskList(taskList(t.getTaskList())); + res.setStartToCloseTimeoutSeconds(durationToSeconds(t.getStartToCloseTimeout())); + res.setAttempt(t.getAttempt()); + return res; + } + + static com.uber.cadence.entities.DecisionTaskStartedEventAttributes + decisionTaskStartedEventAttributes( + com.uber.cadence.api.v1.DecisionTaskStartedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.DecisionTaskStartedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DecisionTaskStartedEventAttributes res = + new com.uber.cadence.entities.DecisionTaskStartedEventAttributes(); + res.setScheduledEventId(t.getScheduledEventId()); + res.setIdentity(t.getIdentity()); + res.setRequestId(t.getRequestId()); + return res; + } + + static com.uber.cadence.entities.DecisionTaskCompletedEventAttributes + decisionTaskCompletedEventAttributes( + com.uber.cadence.api.v1.DecisionTaskCompletedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.DecisionTaskCompletedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DecisionTaskCompletedEventAttributes res = + new com.uber.cadence.entities.DecisionTaskCompletedEventAttributes(); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setIdentity(t.getIdentity()); + res.setBinaryChecksum(t.getBinaryChecksum()); + res.setExecutionContext(byteStringToArray(t.getExecutionContext())); + return res; + } + + static com.uber.cadence.entities.DecisionTaskTimedOutEventAttributes + decisionTaskTimedOutEventAttributes( + com.uber.cadence.api.v1.DecisionTaskTimedOutEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.DecisionTaskTimedOutEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DecisionTaskTimedOutEventAttributes res = + new com.uber.cadence.entities.DecisionTaskTimedOutEventAttributes(); + res.setScheduledEventId(t.getScheduledEventId()); + res.setStartedEventId(t.getStartedEventId()); + res.setTimeoutType(timeoutType(t.getTimeoutType())); + res.setBaseRunId(t.getBaseRunId()); + res.setNewRunId(t.getNewRunId()); + res.setForkEventVersion(t.getForkEventVersion()); + res.setReason(t.getReason()); + res.setCause(decisionTaskTimedOutCause(t.getCause())); + return res; + } + + static com.uber.cadence.entities.ExternalWorkflowExecutionCancelRequestedEventAttributes + externalWorkflowExecutionCancelRequestedEventAttributes( + com.uber.cadence.api.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ExternalWorkflowExecutionCancelRequestedEventAttributes res = + new com.uber.cadence.entities.ExternalWorkflowExecutionCancelRequestedEventAttributes(); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + return res; + } + + static com.uber.cadence.entities.ExternalWorkflowExecutionSignaledEventAttributes + externalWorkflowExecutionSignaledEventAttributes( + com.uber.cadence.api.v1.ExternalWorkflowExecutionSignaledEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.ExternalWorkflowExecutionSignaledEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ExternalWorkflowExecutionSignaledEventAttributes res = + new com.uber.cadence.entities.ExternalWorkflowExecutionSignaledEventAttributes(); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setControl(byteStringToArray(t.getControl())); + return res; + } + + static com.uber.cadence.entities.MarkerRecordedEventAttributes markerRecordedEventAttributes( + com.uber.cadence.api.v1.MarkerRecordedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.MarkerRecordedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.MarkerRecordedEventAttributes res = + new com.uber.cadence.entities.MarkerRecordedEventAttributes(); + res.setMarkerName(t.getMarkerName()); + res.setDetails(payload(t.getDetails())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setHeader(header(t.getHeader())); + return res; + } + + static com.uber.cadence.entities.RequestCancelActivityTaskFailedEventAttributes + requestCancelActivityTaskFailedEventAttributes( + com.uber.cadence.api.v1.RequestCancelActivityTaskFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.RequestCancelActivityTaskFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.RequestCancelActivityTaskFailedEventAttributes res = + new com.uber.cadence.entities.RequestCancelActivityTaskFailedEventAttributes(); + res.setActivityId(t.getActivityId()); + res.setCause(t.getCause()); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionFailedEventAttributes + requestCancelExternalWorkflowExecutionFailedEventAttributes( + com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionFailedEventAttributes res = + new com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionFailedEventAttributes(); + res.setCause(cancelExternalWorkflowExecutionFailedCause(t.getCause())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setControl(byteStringToArray(t.getControl())); + return res; + } + + static com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + requestCancelExternalWorkflowExecutionInitiatedEventAttributes( + com.uber.cadence.api.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + t) { + if (t == null + || t + == com.uber.cadence.api.v1 + .RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes res = + new com.uber.cadence.entities + .RequestCancelExternalWorkflowExecutionInitiatedEventAttributes(); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setControl(byteStringToArray(t.getControl())); + res.setChildWorkflowOnly(t.getChildWorkflowOnly()); + return res; + } + + static com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedEventAttributes + signalExternalWorkflowExecutionFailedEventAttributes( + com.uber.cadence.api.v1.SignalExternalWorkflowExecutionFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.SignalExternalWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedEventAttributes res = + new com.uber.cadence.entities.SignalExternalWorkflowExecutionFailedEventAttributes(); + res.setCause(signalExternalWorkflowExecutionFailedCause(t.getCause())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setControl(byteStringToArray(t.getControl())); + return res; + } + + static com.uber.cadence.entities.SignalExternalWorkflowExecutionInitiatedEventAttributes + signalExternalWorkflowExecutionInitiatedEventAttributes( + com.uber.cadence.api.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.SignalExternalWorkflowExecutionInitiatedEventAttributes res = + new com.uber.cadence.entities.SignalExternalWorkflowExecutionInitiatedEventAttributes(); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setDomain(t.getDomain()); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setSignalName(t.getSignalName()); + res.setInput(payload(t.getInput())); + res.setControl(byteStringToArray(t.getControl())); + res.setChildWorkflowOnly(t.getChildWorkflowOnly()); + return res; + } + + static com.uber.cadence.entities.StartChildWorkflowExecutionFailedEventAttributes + startChildWorkflowExecutionFailedEventAttributes( + com.uber.cadence.api.v1.StartChildWorkflowExecutionFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.StartChildWorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.StartChildWorkflowExecutionFailedEventAttributes res = + new com.uber.cadence.entities.StartChildWorkflowExecutionFailedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowId(t.getWorkflowId()); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setCause(childWorkflowExecutionFailedCause(t.getCause())); + res.setControl(byteStringToArray(t.getControl())); + res.setInitiatedEventId(t.getInitiatedEventId()); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.StartChildWorkflowExecutionInitiatedEventAttributes + startChildWorkflowExecutionInitiatedEventAttributes( + com.uber.cadence.api.v1.StartChildWorkflowExecutionInitiatedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.StartChildWorkflowExecutionInitiatedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.StartChildWorkflowExecutionInitiatedEventAttributes res = + new com.uber.cadence.entities.StartChildWorkflowExecutionInitiatedEventAttributes(); + res.setDomain(t.getDomain()); + res.setWorkflowId(t.getWorkflowId()); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setTaskList(taskList(t.getTaskList())); + res.setInput(payload(t.getInput())); + res.setExecutionStartToCloseTimeoutSeconds( + durationToSeconds(t.getExecutionStartToCloseTimeout())); + res.setTaskStartToCloseTimeoutSeconds(durationToSeconds(t.getTaskStartToCloseTimeout())); + res.setParentClosePolicy(parentClosePolicy(t.getParentClosePolicy())); + res.setControl(byteStringToArray(t.getControl())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setWorkflowIdReusePolicy(workflowIdReusePolicy(t.getWorkflowIdReusePolicy())); + res.setRetryPolicy(retryPolicy(t.getRetryPolicy())); + res.setCronSchedule(t.getCronSchedule()); + res.setHeader(header(t.getHeader())); + res.setMemo(memo(t.getMemo())); + res.setSearchAttributes(searchAttributes(t.getSearchAttributes())); + res.setDelayStartSeconds(durationToSeconds(t.getDelayStart())); + return res; + } + + static com.uber.cadence.entities.TimerCanceledEventAttributes timerCanceledEventAttributes( + com.uber.cadence.api.v1.TimerCanceledEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.TimerCanceledEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TimerCanceledEventAttributes res = + new com.uber.cadence.entities.TimerCanceledEventAttributes(); + res.setTimerId(t.getTimerId()); + res.setStartedEventId(t.getStartedEventId()); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.TimerFiredEventAttributes timerFiredEventAttributes( + com.uber.cadence.api.v1.TimerFiredEventAttributes t) { + if (t == null || t == com.uber.cadence.api.v1.TimerFiredEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TimerFiredEventAttributes res = + new com.uber.cadence.entities.TimerFiredEventAttributes(); + res.setTimerId(t.getTimerId()); + res.setStartedEventId(t.getStartedEventId()); + return res; + } + + static com.uber.cadence.entities.TimerStartedEventAttributes timerStartedEventAttributes( + com.uber.cadence.api.v1.TimerStartedEventAttributes t) { + if (t == null + || t == com.uber.cadence.api.v1.TimerStartedEventAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TimerStartedEventAttributes res = + new com.uber.cadence.entities.TimerStartedEventAttributes(); + res.setTimerId(t.getTimerId()); + res.setStartToFireTimeoutSeconds(durationToSeconds(t.getStartToFireTimeout())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.UpsertWorkflowSearchAttributesEventAttributes + upsertWorkflowSearchAttributesEventAttributes( + com.uber.cadence.api.v1.UpsertWorkflowSearchAttributesEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.UpsertWorkflowSearchAttributesEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.UpsertWorkflowSearchAttributesEventAttributes res = + new com.uber.cadence.entities.UpsertWorkflowSearchAttributesEventAttributes(); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setSearchAttributes(searchAttributes(t.getSearchAttributes())); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionCancelRequestedEventAttributes + workflowExecutionCancelRequestedEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionCancelRequestedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionCancelRequestedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionCancelRequestedEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionCancelRequestedEventAttributes(); + res.setCause(t.getCause()); + res.setExternalInitiatedEventId(externalInitiatedId(t.getExternalExecutionInfo())); + res.setExternalWorkflowExecution(externalWorkflowExecution(t.getExternalExecutionInfo())); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionCanceledEventAttributes + workflowExecutionCanceledEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionCanceledEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionCanceledEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionCanceledEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionCanceledEventAttributes(); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setDetails(payload(t.getDetails())); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionCompletedEventAttributes + workflowExecutionCompletedEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionCompletedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionCompletedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionCompletedEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionCompletedEventAttributes(); + res.setResult(payload(t.getResult())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionContinuedAsNewEventAttributes + workflowExecutionContinuedAsNewEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionContinuedAsNewEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionContinuedAsNewEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionContinuedAsNewEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionContinuedAsNewEventAttributes(); + res.setNewExecutionRunId(t.getNewExecutionRunId()); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setTaskList(taskList(t.getTaskList())); + res.setInput(payload(t.getInput())); + res.setExecutionStartToCloseTimeoutSeconds( + durationToSeconds(t.getExecutionStartToCloseTimeout())); + res.setTaskStartToCloseTimeoutSeconds(durationToSeconds(t.getTaskStartToCloseTimeout())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + res.setBackoffStartIntervalInSeconds(durationToSeconds(t.getBackoffStartInterval())); + res.setInitiator(continueAsNewInitiator(t.getInitiator())); + res.setFailureReason(failureReason(t.getFailure())); + res.setFailureDetails(failureDetails(t.getFailure())); + res.setLastCompletionResult(payload(t.getLastCompletionResult())); + res.setHeader(header(t.getHeader())); + res.setMemo(memo(t.getMemo())); + res.setSearchAttributes(searchAttributes(t.getSearchAttributes())); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionFailedEventAttributes + workflowExecutionFailedEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionFailedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionFailedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionFailedEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionFailedEventAttributes(); + res.setReason(failureReason(t.getFailure())); + res.setDetails(failureDetails(t.getFailure())); + res.setDecisionTaskCompletedEventId(t.getDecisionTaskCompletedEventId()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionSignaledEventAttributes + workflowExecutionSignaledEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionSignaledEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionSignaledEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionSignaledEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionSignaledEventAttributes(); + res.setSignalName(t.getSignalName()); + res.setInput(payload(t.getInput())); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionStartedEventAttributes + workflowExecutionStartedEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionStartedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionStartedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionStartedEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionStartedEventAttributes(); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setParentWorkflowDomain(parentDomainName(t.getParentExecutionInfo())); + res.setParentWorkflowExecution(parentWorkflowExecution(t.getParentExecutionInfo())); + res.setParentInitiatedEventId(parentInitiatedId(t.getParentExecutionInfo())); + res.setTaskList(taskList(t.getTaskList())); + res.setInput(payload(t.getInput())); + res.setExecutionStartToCloseTimeoutSeconds( + durationToSeconds(t.getExecutionStartToCloseTimeout())); + res.setTaskStartToCloseTimeoutSeconds(durationToSeconds(t.getTaskStartToCloseTimeout())); + res.setContinuedExecutionRunId(t.getContinuedExecutionRunId()); + res.setInitiator(continueAsNewInitiator(t.getInitiator())); + res.setContinuedFailureReason(failureReason(t.getContinuedFailure())); + res.setContinuedFailureDetails(failureDetails(t.getContinuedFailure())); + res.setLastCompletionResult(payload(t.getLastCompletionResult())); + res.setOriginalExecutionRunId(t.getOriginalExecutionRunId()); + res.setIdentity(t.getIdentity()); + res.setFirstExecutionRunId(t.getFirstExecutionRunId()); + res.setRetryPolicy(retryPolicy(t.getRetryPolicy())); + res.setAttempt(t.getAttempt()); + res.setExpirationTimestamp(timeToUnixNano(t.getExpirationTime())); + res.setCronSchedule(t.getCronSchedule()); + res.setFirstDecisionTaskBackoffSeconds(durationToSeconds(t.getFirstDecisionTaskBackoff())); + res.setMemo(memo(t.getMemo())); + res.setSearchAttributes(searchAttributes(t.getSearchAttributes())); + res.setPrevAutoResetPoints(resetPoints(t.getPrevAutoResetPoints())); + res.setHeader(header(t.getHeader())); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionTerminatedEventAttributes + workflowExecutionTerminatedEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionTerminatedEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionTerminatedEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionTerminatedEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionTerminatedEventAttributes(); + res.setReason(t.getReason()); + res.setDetails(payload(t.getDetails())); + res.setIdentity(t.getIdentity()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionTimedOutEventAttributes + workflowExecutionTimedOutEventAttributes( + com.uber.cadence.api.v1.WorkflowExecutionTimedOutEventAttributes t) { + if (t == null + || t + == com.uber.cadence.api.v1.WorkflowExecutionTimedOutEventAttributes + .getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionTimedOutEventAttributes res = + new com.uber.cadence.entities.WorkflowExecutionTimedOutEventAttributes(); + res.setTimeoutType(timeoutType(t.getTimeoutType())); + return res; + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapper.java new file mode 100644 index 000000000..c4c034385 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapper.java @@ -0,0 +1,982 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.proto.mappers.DecisionMapper.decisionArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.archivalStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.decisionTaskFailedCause; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.eventFilterType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.queryConsistencyLevel; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.queryRejectCondition; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.queryTaskCompletedType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.taskListType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.workflowIdReusePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.arrayToByteString; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.daysToDuration; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.newFieldMask; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.nullToEmpty; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.secondsToDuration; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.badBinaries; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.clusterReplicationConfigurationArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.failure; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.header; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.memo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.payload; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.retryPolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.searchAttributes; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.startTimeFilter; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.statusFilter; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.stickyExecutionAttributes; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskList; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskListMetadata; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workerVersionInfo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecutionFilter; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowQuery; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowQueryResultMap; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowType; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowTypeFilter; + +import com.uber.cadence.api.v1.CountWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.DeprecateDomainRequest; +import com.uber.cadence.api.v1.DescribeDomainRequest; +import com.uber.cadence.api.v1.DescribeTaskListRequest; +import com.uber.cadence.api.v1.DescribeWorkflowExecutionRequest; +import com.uber.cadence.api.v1.GetTaskListsByDomainRequest; +import com.uber.cadence.api.v1.GetWorkflowExecutionHistoryRequest; +import com.uber.cadence.api.v1.ListArchivedWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.ListClosedWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.ListDomainsRequest; +import com.uber.cadence.api.v1.ListOpenWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.ListTaskListPartitionsRequest; +import com.uber.cadence.api.v1.ListWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.PollForActivityTaskRequest; +import com.uber.cadence.api.v1.PollForDecisionTaskRequest; +import com.uber.cadence.api.v1.QueryWorkflowRequest; +import com.uber.cadence.api.v1.RecordActivityTaskHeartbeatByIDRequest; +import com.uber.cadence.api.v1.RecordActivityTaskHeartbeatRequest; +import com.uber.cadence.api.v1.RefreshWorkflowTasksRequest; +import com.uber.cadence.api.v1.RegisterDomainRequest; +import com.uber.cadence.api.v1.RequestCancelWorkflowExecutionRequest; +import com.uber.cadence.api.v1.ResetStickyTaskListRequest; +import com.uber.cadence.api.v1.ResetWorkflowExecutionRequest; +import com.uber.cadence.api.v1.RespondActivityTaskCanceledByIDRequest; +import com.uber.cadence.api.v1.RespondActivityTaskCanceledRequest; +import com.uber.cadence.api.v1.RespondActivityTaskCompletedByIDRequest; +import com.uber.cadence.api.v1.RespondActivityTaskCompletedRequest; +import com.uber.cadence.api.v1.RespondActivityTaskFailedByIDRequest; +import com.uber.cadence.api.v1.RespondActivityTaskFailedRequest; +import com.uber.cadence.api.v1.RespondDecisionTaskCompletedRequest; +import com.uber.cadence.api.v1.RespondDecisionTaskFailedRequest; +import com.uber.cadence.api.v1.RespondQueryTaskCompletedRequest; +import com.uber.cadence.api.v1.RestartWorkflowExecutionRequest; +import com.uber.cadence.api.v1.ScanWorkflowExecutionsRequest; +import com.uber.cadence.api.v1.SignalWithStartWorkflowExecutionAsyncRequest; +import com.uber.cadence.api.v1.SignalWithStartWorkflowExecutionRequest; +import com.uber.cadence.api.v1.SignalWorkflowExecutionRequest; +import com.uber.cadence.api.v1.StartWorkflowExecutionAsyncRequest; +import com.uber.cadence.api.v1.StartWorkflowExecutionRequest; +import com.uber.cadence.api.v1.TerminateWorkflowExecutionRequest; +import com.uber.cadence.api.v1.UpdateDomainRequest; +import com.uber.cadence.api.v1.UpdateDomainRequest.Builder; +import com.uber.cadence.api.v1.WorkflowQueryResult; +import java.util.ArrayList; +import java.util.List; + +public class RequestMapper { + + private static final String DomainUpdateDescriptionField = "description"; + private static final String DomainUpdateOwnerEmailField = "owner_email"; + private static final String DomainUpdateDataField = "data"; + private static final String DomainUpdateRetentionPeriodField = + "workflow_execution_retention_period"; + + private static final String DomainUpdateBadBinariesField = "bad_binaries"; + private static final String DomainUpdateHistoryArchivalStatusField = "history_archival_status"; + private static final String DomainUpdateHistoryArchivalURIField = "history_archival_uri"; + private static final String DomainUpdateVisibilityArchivalStatusField = + "visibility_archival_status"; + private static final String DomainUpdateVisibilityArchivalURIField = "visibility_archival_uri"; + private static final String DomainUpdateActiveClusterNameField = "active_cluster_name"; + private static final String DomainUpdateClustersField = "clusters"; + private static final String DomainUpdateDeleteBadBinaryField = "delete_bad_binary"; + private static final String DomainUpdateFailoverTimeoutField = "failover_timeout"; + + public static CountWorkflowExecutionsRequest countWorkflowExecutionsRequest( + com.uber.cadence.entities.CountWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + CountWorkflowExecutionsRequest.Builder request = + CountWorkflowExecutionsRequest.newBuilder().setDomain(t.getDomain()); + if (t.getQuery() != null) { + request.setQuery(t.getQuery()); + } + return request.build(); + } + + public static DescribeTaskListRequest describeTaskListRequest( + com.uber.cadence.entities.DescribeTaskListRequest t) { + if (t == null) { + return null; + } + return DescribeTaskListRequest.newBuilder() + .setDomain(t.getDomain()) + .setTaskList(taskList(t.getTaskList())) + .setTaskListType(taskListType(t.getTaskListType())) + .setIncludeTaskListStatus(t.isIncludeTaskListStatus()) + .build(); + } + + public static ListArchivedWorkflowExecutionsRequest listArchivedWorkflowExecutionsRequest( + com.uber.cadence.entities.ListArchivedWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + ListArchivedWorkflowExecutionsRequest.Builder request = + ListArchivedWorkflowExecutionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setPageSize(t.getPageSize()); + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + if (t.getQuery() != null) { + request.setQuery(t.getQuery()); + } + return request.build(); + } + + public static RequestCancelWorkflowExecutionRequest requestCancelWorkflowExecutionRequest( + com.uber.cadence.entities.RequestCancelWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + RequestCancelWorkflowExecutionRequest.Builder builder = + RequestCancelWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getWorkflowExecution())) + .setRequestId(t.getRequestId()); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + if (t.getFirstExecutionRunID() != null) { + builder.setFirstExecutionRunId(t.getFirstExecutionRunID()); + } + if (t.getCause() != null) { + builder.setCause(t.getCause()); + } + return builder.build(); + } + + public static ResetStickyTaskListRequest resetStickyTaskListRequest( + com.uber.cadence.entities.ResetStickyTaskListRequest t) { + if (t == null) { + return null; + } + return ResetStickyTaskListRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getExecution())) + .build(); + } + + public static ResetWorkflowExecutionRequest resetWorkflowExecutionRequest( + com.uber.cadence.entities.ResetWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + return ResetWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getWorkflowExecution())) + .setReason(t.getReason()) + .setDecisionFinishEventId(t.getDecisionFinishEventId()) + .setRequestId(t.getRequestId()) + .setSkipSignalReapply(t.isSkipSignalReapply()) + .build(); + } + + public static RespondActivityTaskCanceledByIDRequest respondActivityTaskCanceledByIdRequest( + com.uber.cadence.entities.RespondActivityTaskCanceledByIDRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskCanceledByIDRequest.Builder builder = + RespondActivityTaskCanceledByIDRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(TypeMapper.workflowRunPair(t.getWorkflowID(), t.getRunID())) + .setActivityId(t.getActivityID()) + .setDetails(payload(t.getDetails())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondActivityTaskCanceledRequest respondActivityTaskCanceledRequest( + com.uber.cadence.entities.RespondActivityTaskCanceledRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskCanceledRequest.Builder builder = + RespondActivityTaskCanceledRequest.newBuilder().setDetails(payload(t.getDetails())); + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondActivityTaskCompletedByIDRequest respondActivityTaskCompletedByIdRequest( + com.uber.cadence.entities.RespondActivityTaskCompletedByIDRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskCompletedByIDRequest.Builder builder = + RespondActivityTaskCompletedByIDRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(TypeMapper.workflowRunPair(t.getWorkflowID(), t.getRunID())) + .setActivityId(t.getActivityID()) + .setResult(payload(t.getResult())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondActivityTaskCompletedRequest respondActivityTaskCompletedRequest( + com.uber.cadence.entities.RespondActivityTaskCompletedRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskCompletedRequest.Builder builder = + RespondActivityTaskCompletedRequest.newBuilder().setResult(payload(t.getResult())); + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondActivityTaskFailedByIDRequest respondActivityTaskFailedByIdRequest( + com.uber.cadence.entities.RespondActivityTaskFailedByIDRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskFailedByIDRequest.Builder builder = + RespondActivityTaskFailedByIDRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(TypeMapper.workflowRunPair(t.getWorkflowID(), t.getRunID())) + .setActivityId(t.getActivityID()) + .setFailure(failure(t.getReason(), t.getDetails())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondActivityTaskFailedRequest respondActivityTaskFailedRequest( + com.uber.cadence.entities.RespondActivityTaskFailedRequest t) { + if (t == null) { + return null; + } + RespondActivityTaskFailedRequest.Builder builder = + RespondActivityTaskFailedRequest.newBuilder() + .setFailure(failure(t.getReason(), t.getDetails())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + return builder.build(); + } + + public static RespondDecisionTaskCompletedRequest respondDecisionTaskCompletedRequest( + com.uber.cadence.entities.RespondDecisionTaskCompletedRequest t) { + if (t == null) { + return null; + } + RespondDecisionTaskCompletedRequest.Builder builder = + RespondDecisionTaskCompletedRequest.newBuilder() + .addAllDecisions(decisionArray(t.getDecisions())) + .setStickyAttributes(stickyExecutionAttributes(t.getStickyAttributes())) + .setReturnNewDecisionTask(t.isReturnNewDecisionTask()) + .setForceCreateNewDecisionTask(t.isForceCreateNewDecisionTask()) + .putAllQueryResults(workflowQueryResultMap(t.getQueryResults())); + if (t.getExecutionContext() != null) { + builder.setExecutionContext(arrayToByteString(t.getExecutionContext())); + } + if (t.getBinaryChecksum() != null) { + builder.setBinaryChecksum(t.getBinaryChecksum()); + } + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondDecisionTaskFailedRequest respondDecisionTaskFailedRequest( + com.uber.cadence.entities.RespondDecisionTaskFailedRequest t) { + if (t == null) { + return null; + } + RespondDecisionTaskFailedRequest.Builder builder = + RespondDecisionTaskFailedRequest.newBuilder() + .setCause(decisionTaskFailedCause(t.getCause())) + .setDetails(payload(t.getDetails())); + if (t.getBinaryChecksum() != null) { + builder.setBinaryChecksum(t.getBinaryChecksum()); + } + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RespondQueryTaskCompletedRequest respondQueryTaskCompletedRequest( + com.uber.cadence.entities.RespondQueryTaskCompletedRequest t) { + if (t == null) { + return null; + } + WorkflowQueryResult.Builder wqBuilder = + WorkflowQueryResult.newBuilder() + .setResultType(queryTaskCompletedType(t.getCompletedType())) + .setAnswer(payload(t.getQueryResult())); + if (t.getErrorMessage() != null) { + wqBuilder.setErrorMessage(t.getErrorMessage()); + } + RespondQueryTaskCompletedRequest.Builder builder = + RespondQueryTaskCompletedRequest.newBuilder() + .setResult(wqBuilder.build()) + .setWorkerVersionInfo(workerVersionInfo(t.getWorkerVersionInfo())); + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + return builder.build(); + } + + public static ScanWorkflowExecutionsRequest scanWorkflowExecutionsRequest( + com.uber.cadence.entities.ListWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + ScanWorkflowExecutionsRequest.Builder request = + ScanWorkflowExecutionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setPageSize(t.getPageSize()); + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + if (t.getQuery() != null) { + request.setQuery(t.getQuery()); + } + return request.build(); + } + + public static DescribeWorkflowExecutionRequest describeWorkflowExecutionRequest( + com.uber.cadence.entities.DescribeWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + return DescribeWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getExecution())) + .build(); + } + + public static GetWorkflowExecutionHistoryRequest getWorkflowExecutionHistoryRequest( + com.uber.cadence.entities.GetWorkflowExecutionHistoryRequest t) { + if (t == null) { + return null; + } + GetWorkflowExecutionHistoryRequest.Builder builder = + GetWorkflowExecutionHistoryRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getExecution())) + .setPageSize(t.getMaximumPageSize()) + .setWaitForNewEvent(t.isWaitForNewEvent()) + .setHistoryEventFilterType(eventFilterType(t.getHistoryEventFilterType())) + .setSkipArchival(t.isSkipArchival()); + if (t.getNextPageToken() != null) { + builder.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + return builder.build(); + } + + public static SignalWithStartWorkflowExecutionRequest signalWithStartWorkflowExecutionRequest( + com.uber.cadence.entities.SignalWithStartWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + StartWorkflowExecutionRequest.Builder builder = + StartWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowId(t.getWorkflowId()) + .setWorkflowType(workflowType(t.getWorkflowType())) + .setTaskList(taskList(t.getTaskList())) + .setInput(payload(t.getInput())) + .setExecutionStartToCloseTimeout( + secondsToDuration(t.getExecutionStartToCloseTimeoutSeconds())) + .setTaskStartToCloseTimeout(secondsToDuration(t.getTaskStartToCloseTimeoutSeconds())) + .setRequestId(t.getRequestId()) + .setMemo(memo(t.getMemo())) + .setSearchAttributes(searchAttributes(t.getSearchAttributes())) + .setHeader(header(t.getHeader())); + if (t.getRetryPolicy() != null) { + builder.setRetryPolicy(retryPolicy(t.getRetryPolicy())); + } + builder.setWorkflowIdReusePolicy(workflowIdReusePolicy(t.getWorkflowIdReusePolicy())); + if (t.getWorkflowIdReusePolicy() != null) { + builder.setWorkflowIdReusePolicy(workflowIdReusePolicy(t.getWorkflowIdReusePolicy())); + } + if (t.getCronSchedule() != null) { + builder.setCronSchedule(t.getCronSchedule()); + } + if (t.getDelayStartSeconds() > 0) { + builder.setDelayStart(secondsToDuration(t.getDelayStartSeconds())); + } + builder.setJitterStart(secondsToDuration(t.getJitterStartSeconds())); + + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + SignalWithStartWorkflowExecutionRequest.Builder sb = + SignalWithStartWorkflowExecutionRequest.newBuilder() + .setStartRequest(builder.build()) + .setSignalName(t.getSignalName()) + .setSignalInput(payload(t.getSignalInput())); + if (t.getControl() != null) { + sb.setControl(arrayToByteString(t.getControl())); + } + return sb.build(); + } + + public static SignalWithStartWorkflowExecutionAsyncRequest + signalWithStartWorkflowExecutionAsyncRequest( + com.uber.cadence.entities.SignalWithStartWorkflowExecutionAsyncRequest t) { + if (t == null) { + return null; + } + SignalWithStartWorkflowExecutionAsyncRequest.Builder builder = + SignalWithStartWorkflowExecutionAsyncRequest.newBuilder(); + if (t.getRequest() != null) { + builder.setRequest(signalWithStartWorkflowExecutionRequest(t.getRequest())); + } + return builder.build(); + } + + public static SignalWorkflowExecutionRequest signalWorkflowExecutionRequest( + com.uber.cadence.entities.SignalWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + SignalWorkflowExecutionRequest.Builder builder = + SignalWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getWorkflowExecution())) + .setSignalName(t.getSignalName()) + .setSignalInput(payload(t.getInput())) + .setRequestId(t.getRequestId()); + if (t.getControl() != null) { + builder.setControl(arrayToByteString(t.getControl())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static StartWorkflowExecutionRequest startWorkflowExecutionRequest( + com.uber.cadence.entities.StartWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + StartWorkflowExecutionRequest.Builder request = + StartWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowId(t.getWorkflowId()) + .setWorkflowType(workflowType(t.getWorkflowType())) + .setTaskList(taskList(t.getTaskList())) + .setInput(payload(t.getInput())) + .setRequestId(t.getRequestId()) + .setExecutionStartToCloseTimeout( + secondsToDuration(t.getExecutionStartToCloseTimeoutSeconds())) + .setTaskStartToCloseTimeout(secondsToDuration(t.getTaskStartToCloseTimeoutSeconds())) + .setWorkflowIdReusePolicy(workflowIdReusePolicy(t.getWorkflowIdReusePolicy())) + .setMemo(memo(t.getMemo())) + .setSearchAttributes(searchAttributes(t.getSearchAttributes())) + .setHeader(header(t.getHeader())) + .setDelayStart(secondsToDuration(t.getDelayStartSeconds())) + .setJitterStart(secondsToDuration(t.getJitterStartSeconds())); + if (t.getRetryPolicy() != null) { + request.setRetryPolicy(retryPolicy(t.getRetryPolicy())); + } + if (t.getCronSchedule() != null) { + request.setCronSchedule(t.getCronSchedule()); + } + if (t.getIdentity() != null) { + request.setIdentity(t.getIdentity()); + } + return request.build(); + } + + public static StartWorkflowExecutionAsyncRequest startWorkflowExecutionAsyncRequest( + com.uber.cadence.entities.StartWorkflowExecutionAsyncRequest t) { + if (t == null) { + return null; + } + StartWorkflowExecutionAsyncRequest.Builder builder = + StartWorkflowExecutionAsyncRequest.newBuilder(); + if (t.getRequest() != null) { + builder.setRequest(startWorkflowExecutionRequest(t.getRequest())); + } + return builder.build(); + } + + public static TerminateWorkflowExecutionRequest terminateWorkflowExecutionRequest( + com.uber.cadence.entities.TerminateWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + TerminateWorkflowExecutionRequest.Builder builder = + TerminateWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getWorkflowExecution())) + .setReason(t.getReason()) + .setDetails(payload(t.getDetails())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + if (t.getFirstExecutionRunID() != null) { + builder.setFirstExecutionRunId(t.getFirstExecutionRunID()); + } + return builder.build(); + } + + public static DeprecateDomainRequest deprecateDomainRequest( + com.uber.cadence.entities.DeprecateDomainRequest t) { + if (t == null) { + return null; + } + return DeprecateDomainRequest.newBuilder() + .setName(t.getName()) + .setSecurityToken(t.getSecurityToken()) + .build(); + } + + public static DescribeDomainRequest describeDomainRequest( + com.uber.cadence.entities.DescribeDomainRequest t) { + if (t == null) { + return null; + } + if (t.getUuid() != null) { + return DescribeDomainRequest.newBuilder().setId(t.getUuid()).build(); + } + if (t.getName() != null) { + return DescribeDomainRequest.newBuilder().setName(t.getName()).build(); + } + throw new IllegalArgumentException("neither one of field is set for DescribeDomainRequest"); + } + + public static ListDomainsRequest listDomainsRequest( + com.uber.cadence.entities.ListDomainsRequest t) { + if (t == null) { + return null; + } + ListDomainsRequest.Builder request = + ListDomainsRequest.newBuilder().setPageSize(t.getPageSize()); + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + return request.build(); + } + + public static ListTaskListPartitionsRequest listTaskListPartitionsRequest( + com.uber.cadence.entities.ListTaskListPartitionsRequest t) { + if (t == null) { + return null; + } + return ListTaskListPartitionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setTaskList(taskList(t.getTaskList())) + .build(); + } + + public static ListWorkflowExecutionsRequest listWorkflowExecutionsRequest( + com.uber.cadence.entities.ListWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + ListWorkflowExecutionsRequest.Builder request = + ListWorkflowExecutionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setPageSize(t.getPageSize()); + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + if (t.getQuery() != null) { + request.setQuery(t.getQuery()); + } + return request.build(); + } + + public static PollForActivityTaskRequest pollForActivityTaskRequest( + com.uber.cadence.entities.PollForActivityTaskRequest t) { + if (t == null) { + return null; + } + PollForActivityTaskRequest.Builder builder = + PollForActivityTaskRequest.newBuilder() + .setDomain(t.getDomain()) + .setTaskList(taskList(t.getTaskList())) + .setTaskListMetadata(taskListMetadata(t.getTaskListMetadata())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static PollForDecisionTaskRequest pollForDecisionTaskRequest( + com.uber.cadence.entities.PollForDecisionTaskRequest t) { + if (t == null) { + return null; + } + PollForDecisionTaskRequest.Builder builder = + PollForDecisionTaskRequest.newBuilder() + .setDomain(t.getDomain()) + .setTaskList(taskList(t.getTaskList())); + if (t.getBinaryChecksum() != null) { + builder.setBinaryChecksum(t.getBinaryChecksum()); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static QueryWorkflowRequest queryWorkflowRequest( + com.uber.cadence.entities.QueryWorkflowRequest t) { + if (t == null) { + return null; + } + return QueryWorkflowRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getExecution())) + .setQuery(workflowQuery(t.getQuery())) + .setQueryRejectCondition(queryRejectCondition(t.getQueryRejectCondition())) + .setQueryConsistencyLevel(queryConsistencyLevel(t.getQueryConsistencyLevel())) + .build(); + } + + public static RecordActivityTaskHeartbeatByIDRequest recordActivityTaskHeartbeatByIdRequest( + com.uber.cadence.entities.RecordActivityTaskHeartbeatByIDRequest t) { + if (t == null) { + return null; + } + RecordActivityTaskHeartbeatByIDRequest.Builder builder = + RecordActivityTaskHeartbeatByIDRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(TypeMapper.workflowRunPair(t.getWorkflowID(), t.getRunID())) + .setActivityId(t.getActivityID()) + .setDetails(payload(t.getDetails())); + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RecordActivityTaskHeartbeatRequest recordActivityTaskHeartbeatRequest( + com.uber.cadence.entities.RecordActivityTaskHeartbeatRequest t) { + if (t == null) { + return null; + } + RecordActivityTaskHeartbeatRequest.Builder builder = + RecordActivityTaskHeartbeatRequest.newBuilder().setDetails(payload(t.getDetails())); + if (t.getTaskToken() != null) { + builder.setTaskToken(arrayToByteString(t.getTaskToken())); + } + if (t.getIdentity() != null) { + builder.setIdentity(t.getIdentity()); + } + return builder.build(); + } + + public static RegisterDomainRequest registerDomainRequest( + com.uber.cadence.entities.RegisterDomainRequest t) { + if (t == null) { + return null; + } + RegisterDomainRequest request = + RegisterDomainRequest.newBuilder() + .setName(t.getName()) + .setDescription(Helpers.nullToEmpty(t.getDescription())) + .setOwnerEmail(Helpers.nullToEmpty(t.getOwnerEmail())) + .setWorkflowExecutionRetentionPeriod( + daysToDuration(t.getWorkflowExecutionRetentionPeriodInDays())) + .addAllClusters(clusterReplicationConfigurationArray(t.getClusters())) + .setActiveClusterName(Helpers.nullToEmpty(t.getActiveClusterName())) + .putAllData(Helpers.nullToEmpty(t.getData())) + .setSecurityToken(Helpers.nullToEmpty(t.getSecurityToken())) + .setIsGlobalDomain(nullToEmpty(t.isGlobalDomain())) + .setHistoryArchivalStatus(archivalStatus(t.getHistoryArchivalStatus())) + .setHistoryArchivalUri(Helpers.nullToEmpty(t.getHistoryArchivalURI())) + .setVisibilityArchivalStatus(archivalStatus(t.getVisibilityArchivalStatus())) + .setVisibilityArchivalUri(Helpers.nullToEmpty(t.getVisibilityArchivalURI())) + .build(); + return request; + } + + public static RestartWorkflowExecutionRequest restartWorkflowExecutionRequest( + com.uber.cadence.entities.RestartWorkflowExecutionRequest t) { + if (t == null) { + return null; + } + return RestartWorkflowExecutionRequest.newBuilder() + .setDomain(t.getDomain()) + .setWorkflowExecution(workflowExecution(t.getWorkflowExecution())) + .setReason(t.getReason()) + .setIdentity(t.getIdentity()) + .build(); + } + + public static UpdateDomainRequest updateDomainRequest( + com.uber.cadence.entities.UpdateDomainRequest t) { + if (t == null) { + return null; + } + Builder request = + UpdateDomainRequest.newBuilder() + .setName(t.getName()) + .setSecurityToken(t.getSecurityToken()); + + List fields = new ArrayList<>(); + com.uber.cadence.entities.UpdateDomainInfo updatedInfo = t.getUpdatedInfo(); + if (updatedInfo != null) { + if (updatedInfo.getDescription() != null) { + request.setDescription(updatedInfo.getDescription()); + fields.add(DomainUpdateDescriptionField); + } + if (updatedInfo.getOwnerEmail() != null) { + request.setOwnerEmail(updatedInfo.getOwnerEmail()); + fields.add(DomainUpdateOwnerEmailField); + } + if (updatedInfo.getData() != null) { + updatedInfo.setData(updatedInfo.getData()); + fields.add(DomainUpdateDataField); + } + } + com.uber.cadence.entities.DomainConfiguration configuration = t.getConfiguration(); + if (configuration != null) { + if (configuration.getWorkflowExecutionRetentionPeriodInDays() > 0) { + request.setWorkflowExecutionRetentionPeriod( + daysToDuration(configuration.getWorkflowExecutionRetentionPeriodInDays())); + fields.add(DomainUpdateRetentionPeriodField); + } + // if t.EmitMetric != null {} - DEPRECATED + if (configuration.getBadBinaries() != null) { + request.setBadBinaries(badBinaries(configuration.getBadBinaries())); + fields.add(DomainUpdateBadBinariesField); + } + if (configuration.getHistoryArchivalStatus() != null) { + request.setHistoryArchivalStatus(archivalStatus(configuration.getHistoryArchivalStatus())); + fields.add(DomainUpdateHistoryArchivalStatusField); + } + if (configuration.getHistoryArchivalURI() != null) { + request.setHistoryArchivalUri(configuration.getHistoryArchivalURI()); + fields.add(DomainUpdateHistoryArchivalURIField); + } + if (configuration.getVisibilityArchivalStatus() != null) { + request.setVisibilityArchivalStatus( + archivalStatus(configuration.getVisibilityArchivalStatus())); + fields.add(DomainUpdateVisibilityArchivalStatusField); + } + if (configuration.getVisibilityArchivalURI() != null) { + request.setVisibilityArchivalUri(configuration.getVisibilityArchivalURI()); + fields.add(DomainUpdateVisibilityArchivalURIField); + } + } + com.uber.cadence.entities.DomainReplicationConfiguration replicationConfiguration = + t.getReplicationConfiguration(); + if (replicationConfiguration != null) { + if (replicationConfiguration.getActiveClusterName() != null) { + request.setActiveClusterName(replicationConfiguration.getActiveClusterName()); + fields.add(DomainUpdateActiveClusterNameField); + } + if (replicationConfiguration.getClusters() != null) { + request.addAllClusters( + clusterReplicationConfigurationArray(replicationConfiguration.getClusters())); + fields.add(DomainUpdateClustersField); + } + } + if (t.getDeleteBadBinary() != null) { + request.setDeleteBadBinary(t.getDeleteBadBinary()); + fields.add(DomainUpdateDeleteBadBinaryField); + } + if (t.getFailoverTimeoutInSeconds() > 0) { + request.setFailoverTimeout(secondsToDuration(t.getFailoverTimeoutInSeconds())); + fields.add(DomainUpdateFailoverTimeoutField); + } + + request.setUpdateMask(newFieldMask(fields)); + + return request.build(); + } + + public static ListClosedWorkflowExecutionsRequest listClosedWorkflowExecutionsRequest( + com.uber.cadence.entities.ListClosedWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + ListClosedWorkflowExecutionsRequest.Builder request = + ListClosedWorkflowExecutionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setPageSize(t.getMaximumPageSize()); + if (t.getExecutionFilter() != null) { + request.setExecutionFilter(workflowExecutionFilter(t.getExecutionFilter())); + } + if (t.getTypeFilter() != null) { + request.setTypeFilter(workflowTypeFilter(t.getTypeFilter())); + } + if (t.getStatusFilter() != null) { + request.setStatusFilter(statusFilter(t.getStatusFilter())); + } + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + if (t.getStartTimeFilter() != null) { + request.setStartTimeFilter(startTimeFilter(t.getStartTimeFilter())); + } + return request.build(); + } + + public static ListOpenWorkflowExecutionsRequest listOpenWorkflowExecutionsRequest( + com.uber.cadence.entities.ListOpenWorkflowExecutionsRequest t) { + if (t == null) { + return null; + } + ListOpenWorkflowExecutionsRequest.Builder request = + ListOpenWorkflowExecutionsRequest.newBuilder() + .setDomain(t.getDomain()) + .setPageSize(t.getMaximumPageSize()); + if (t.getExecutionFilter() != null) { + request.setExecutionFilter(workflowExecutionFilter(t.getExecutionFilter())); + } + if (t.getTypeFilter() != null) { + request.setTypeFilter(workflowTypeFilter(t.getTypeFilter())); + } + if (t.getNextPageToken() != null) { + request.setNextPageToken(arrayToByteString(t.getNextPageToken())); + } + if (t.getStartTimeFilter() != null) { + request.setStartTimeFilter(startTimeFilter(t.getStartTimeFilter())); + } + return request.build(); + } + + public static RespondActivityTaskFailedByIDRequest respondActivityTaskFailedByIDRequest( + com.uber.cadence.entities.RespondActivityTaskFailedByIDRequest failRequest) { + if (failRequest == null) { + return null; + } + RespondActivityTaskFailedByIDRequest.Builder request = + RespondActivityTaskFailedByIDRequest.newBuilder() + .setDomain(failRequest.getDomain()) + .setWorkflowExecution( + TypeMapper.workflowRunPair(failRequest.getWorkflowID(), failRequest.getRunID())) + .setActivityId(failRequest.getActivityID()) + .setFailure(failure(failRequest.getReason(), failRequest.getDetails())) + .setIdentity(failRequest.getIdentity()); + return request.build(); + } + + public static RespondActivityTaskCompletedByIDRequest respondActivityTaskCompletedByIDRequest( + com.uber.cadence.entities.RespondActivityTaskCompletedByIDRequest completeRequest) { + if (completeRequest == null) { + return null; + } + RespondActivityTaskCompletedByIDRequest.Builder request = + RespondActivityTaskCompletedByIDRequest.newBuilder() + .setDomain(completeRequest.getDomain()) + .setWorkflowExecution( + TypeMapper.workflowRunPair( + completeRequest.getWorkflowID(), completeRequest.getRunID())) + .setActivityId(completeRequest.getActivityID()) + .setResult(payload(completeRequest.getResult())) + .setIdentity(completeRequest.getIdentity()); + return request.build(); + } + + public static RecordActivityTaskHeartbeatByIDRequest recordActivityTaskHeartbeatByIDRequest( + com.uber.cadence.entities.RecordActivityTaskHeartbeatByIDRequest heartbeatRequest) { + if (heartbeatRequest == null) { + return null; + } + RecordActivityTaskHeartbeatByIDRequest.Builder request = + RecordActivityTaskHeartbeatByIDRequest.newBuilder() + .setDomain(heartbeatRequest.getDomain()) + .setWorkflowExecution( + TypeMapper.workflowRunPair( + heartbeatRequest.getWorkflowID(), heartbeatRequest.getRunID())) + .setActivityId(heartbeatRequest.getActivityID()) + .setDetails(payload(heartbeatRequest.getDetails())) + .setIdentity(heartbeatRequest.getIdentity()); + return request.build(); + } + + public static RespondActivityTaskCanceledByIDRequest respondActivityTaskCanceledByIDRequest( + com.uber.cadence.entities.RespondActivityTaskCanceledByIDRequest canceledRequest) { + if (canceledRequest == null) { + return null; + } + RespondActivityTaskCanceledByIDRequest.Builder request = + RespondActivityTaskCanceledByIDRequest.newBuilder() + .setDomain(canceledRequest.getDomain()) + .setWorkflowExecution( + TypeMapper.workflowRunPair( + canceledRequest.getWorkflowID(), canceledRequest.getRunID())) + .setActivityId(canceledRequest.getActivityID()) + .setDetails(payload(canceledRequest.getDetails())) + .setIdentity(canceledRequest.getIdentity()); + return request.build(); + } + + public static GetTaskListsByDomainRequest getTaskListsByDomainRequest( + com.uber.cadence.entities.GetTaskListsByDomainRequest domainRequest) { + if (domainRequest == null) { + return null; + } + GetTaskListsByDomainRequest.Builder request = + GetTaskListsByDomainRequest.newBuilder().setDomain(domainRequest.getDomainName()); + return request.build(); + } + + public static RefreshWorkflowTasksRequest refreshWorkflowTasksRequest( + com.uber.cadence.entities.RefreshWorkflowTasksRequest request) { + if (request == null) { + return null; + } + return RefreshWorkflowTasksRequest.newBuilder().setDomain(request.getDomain()).build(); + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ResponseMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ResponseMapper.java new file mode 100644 index 000000000..dcca7d291 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/ResponseMapper.java @@ -0,0 +1,525 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.archivalStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.domainStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.byteStringToArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.durationToDays; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.durationToSeconds; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.timeToUnixNano; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.toInt64Value; +import static com.uber.cadence.internal.compatibility.proto.mappers.HistoryMapper.history; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.activityLocalDispatchInfoMap; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.activityType; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.badBinaries; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.clusterReplicationConfigurationArrayFromProto; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.dataBlobArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.describeDomainResponseArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.header; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.indexedValueTypeMap; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.payload; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.pendingActivityInfoArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.pendingChildExecutionInfoArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.pendingDecisionInfo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.pollerInfoArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.queryRejected; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.supportedClientVersions; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskList; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskListPartitionMetadataArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.taskListStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecution; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecutionConfiguration; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecutionInfo; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowExecutionInfoArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowQuery; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowQueryMap; +import static com.uber.cadence.internal.compatibility.proto.mappers.TypeMapper.workflowType; + +import com.uber.cadence.api.v1.*; +import java.util.Map; +import java.util.stream.Collectors; + +public class ResponseMapper { + + public static com.uber.cadence.entities.StartWorkflowExecutionResponse + startWorkflowExecutionResponse(StartWorkflowExecutionResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.StartWorkflowExecutionResponse startWorkflowExecutionResponse = + new com.uber.cadence.entities.StartWorkflowExecutionResponse(); + startWorkflowExecutionResponse.setRunId(t.getRunId()); + return startWorkflowExecutionResponse; + } + + public static com.uber.cadence.entities.StartWorkflowExecutionAsyncResponse + startWorkflowExecutionAsyncResponse(StartWorkflowExecutionAsyncResponse t) { + return t == null ? null : new com.uber.cadence.entities.StartWorkflowExecutionAsyncResponse(); + } + + public static com.uber.cadence.entities.DescribeTaskListResponse describeTaskListResponse( + DescribeTaskListResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.DescribeTaskListResponse describeTaskListResponse = + new com.uber.cadence.entities.DescribeTaskListResponse(); + describeTaskListResponse.setPollers(pollerInfoArray(t.getPollersList())); + describeTaskListResponse.setTaskListStatus(taskListStatus(t.getTaskListStatus())); + return describeTaskListResponse; + } + + public static com.uber.cadence.entities.RestartWorkflowExecutionResponse + restartWorkflowExecutionResponse(RestartWorkflowExecutionResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.RestartWorkflowExecutionResponse restartWorkflowExecutionResponse = + new com.uber.cadence.entities.RestartWorkflowExecutionResponse(); + restartWorkflowExecutionResponse.setRunId(t.getRunId()); + return restartWorkflowExecutionResponse; + } + + public static com.uber.cadence.entities.DescribeWorkflowExecutionResponse + describeWorkflowExecutionResponse(DescribeWorkflowExecutionResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.DescribeWorkflowExecutionResponse describeWorkflowExecutionResponse = + new com.uber.cadence.entities.DescribeWorkflowExecutionResponse(); + describeWorkflowExecutionResponse.setExecutionConfiguration( + workflowExecutionConfiguration(t.getExecutionConfiguration())); + describeWorkflowExecutionResponse.setWorkflowExecutionInfo( + workflowExecutionInfo(t.getWorkflowExecutionInfo())); + describeWorkflowExecutionResponse.setPendingActivities( + pendingActivityInfoArray(t.getPendingActivitiesList())); + describeWorkflowExecutionResponse.setPendingChildren( + pendingChildExecutionInfoArray(t.getPendingChildrenList())); + describeWorkflowExecutionResponse.setPendingDecision( + pendingDecisionInfo(t.getPendingDecision())); + return describeWorkflowExecutionResponse; + } + + public static com.uber.cadence.entities.ClusterInfo getClusterInfoResponse( + GetClusterInfoResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ClusterInfo clusterInfo = new com.uber.cadence.entities.ClusterInfo(); + clusterInfo.setSupportedClientVersions(supportedClientVersions(t.getSupportedClientVersions())); + return clusterInfo; + } + + public static com.uber.cadence.entities.GetSearchAttributesResponse getSearchAttributesResponse( + GetSearchAttributesResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.GetSearchAttributesResponse getSearchAttributesResponse = + new com.uber.cadence.entities.GetSearchAttributesResponse(); + getSearchAttributesResponse.setKeys(indexedValueTypeMap(t.getKeysMap())); + return getSearchAttributesResponse; + } + + public static com.uber.cadence.entities.GetWorkflowExecutionHistoryResponse + getWorkflowExecutionHistoryResponse(GetWorkflowExecutionHistoryResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.GetWorkflowExecutionHistoryResponse + getWorkflowExecutionHistoryResponse = + new com.uber.cadence.entities.GetWorkflowExecutionHistoryResponse(); + getWorkflowExecutionHistoryResponse.setHistory(history(t.getHistory())); + getWorkflowExecutionHistoryResponse.setRawHistory(dataBlobArray(t.getRawHistoryList())); + getWorkflowExecutionHistoryResponse.setNextPageToken(byteStringToArray(t.getNextPageToken())); + getWorkflowExecutionHistoryResponse.setArchived(t.getArchived()); + return getWorkflowExecutionHistoryResponse; + } + + public static com.uber.cadence.entities.ListArchivedWorkflowExecutionsResponse + listArchivedWorkflowExecutionsResponse(ListArchivedWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListArchivedWorkflowExecutionsResponse res = + new com.uber.cadence.entities.ListArchivedWorkflowExecutionsResponse(); + res.setExecutions(workflowExecutionInfoArray(t.getExecutionsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.ListClosedWorkflowExecutionsResponse + listClosedWorkflowExecutionsResponse(ListClosedWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListClosedWorkflowExecutionsResponse res = + new com.uber.cadence.entities.ListClosedWorkflowExecutionsResponse(); + res.setExecutions(workflowExecutionInfoArray(t.getExecutionsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.ListOpenWorkflowExecutionsResponse + listOpenWorkflowExecutionsResponse(ListOpenWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListOpenWorkflowExecutionsResponse res = + new com.uber.cadence.entities.ListOpenWorkflowExecutionsResponse(); + res.setExecutions(workflowExecutionInfoArray(t.getExecutionsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.ListTaskListPartitionsResponse + listTaskListPartitionsResponse(ListTaskListPartitionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListTaskListPartitionsResponse res = + new com.uber.cadence.entities.ListTaskListPartitionsResponse(); + res.setActivityTaskListPartitions( + taskListPartitionMetadataArray(t.getActivityTaskListPartitionsList())); + res.setDecisionTaskListPartitions( + taskListPartitionMetadataArray(t.getDecisionTaskListPartitionsList())); + return res; + } + + public static com.uber.cadence.entities.ListWorkflowExecutionsResponse + listWorkflowExecutionsResponse(ListWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListWorkflowExecutionsResponse res = + new com.uber.cadence.entities.ListWorkflowExecutionsResponse(); + res.setExecutions(workflowExecutionInfoArray(t.getExecutionsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.PollForActivityTaskResponse pollForActivityTaskResponse( + PollForActivityTaskResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.PollForActivityTaskResponse res = + new com.uber.cadence.entities.PollForActivityTaskResponse(); + res.setTaskToken(byteStringToArray(t.getTaskToken())); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setActivityId(t.getActivityId()); + res.setActivityType(activityType(t.getActivityType())); + res.setInput(payload(t.getInput())); + res.setScheduledTimestamp(timeToUnixNano(t.getScheduledTime())); + res.setStartedTimestamp(timeToUnixNano(t.getStartedTime())); + res.setScheduleToCloseTimeoutSeconds(durationToSeconds(t.getScheduleToCloseTimeout())); + res.setStartToCloseTimeoutSeconds(durationToSeconds(t.getStartToCloseTimeout())); + res.setHeartbeatTimeoutSeconds(durationToSeconds(t.getHeartbeatTimeout())); + res.setAttempt(t.getAttempt()); + res.setScheduledTimestampOfThisAttempt(timeToUnixNano(t.getScheduledTimeOfThisAttempt())); + res.setHeartbeatDetails(payload(t.getHeartbeatDetails())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setWorkflowDomain(t.getWorkflowDomain()); + res.setHeader(header(t.getHeader())); + return res; + } + + public static com.uber.cadence.entities.PollForDecisionTaskResponse pollForDecisionTaskResponse( + PollForDecisionTaskResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.PollForDecisionTaskResponse res = + new com.uber.cadence.entities.PollForDecisionTaskResponse(); + res.setTaskToken(byteStringToArray(t.getTaskToken())); + res.setWorkflowExecution(workflowExecution(t.getWorkflowExecution())); + res.setWorkflowType(workflowType(t.getWorkflowType())); + res.setPreviousStartedEventId(toInt64Value(t.getPreviousStartedEventId())); + res.setStartedEventId(t.getStartedEventId()); + res.setAttempt(t.getAttempt()); + res.setBacklogCountHint(t.getBacklogCountHint()); + res.setHistory(history(t.getHistory())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + if (t.getQuery() != WorkflowQuery.getDefaultInstance()) { + res.setQuery(workflowQuery(t.getQuery())); + } + res.setWorkflowExecutionTaskList(taskList(t.getWorkflowExecutionTaskList())); + res.setScheduledTimestamp(timeToUnixNano(t.getScheduledTime())); + res.setStartedTimestamp(timeToUnixNano(t.getStartedTime())); + res.setQueries(workflowQueryMap(t.getQueriesMap())); + res.setNextEventId(t.getNextEventId()); + return res; + } + + public static com.uber.cadence.entities.QueryWorkflowResponse queryWorkflowResponse( + QueryWorkflowResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.QueryWorkflowResponse res = + new com.uber.cadence.entities.QueryWorkflowResponse(); + res.setQueryResult(payload(t.getQueryResult())); + res.setQueryRejected(queryRejected(t.getQueryRejected())); + return res; + } + + public static com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse + recordActivityTaskHeartbeatByIdResponse(RecordActivityTaskHeartbeatByIDResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse res = + new com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse(); + res.setCancelRequested(t.getCancelRequested()); + return res; + } + + public static com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse + recordActivityTaskHeartbeatResponse(RecordActivityTaskHeartbeatResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse res = + new com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse(); + res.setCancelRequested(t.getCancelRequested()); + return res; + } + + public static com.uber.cadence.entities.ResetWorkflowExecutionResponse + resetWorkflowExecutionResponse(ResetWorkflowExecutionResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ResetWorkflowExecutionResponse res = + new com.uber.cadence.entities.ResetWorkflowExecutionResponse(); + res.setRunId(t.getRunId()); + return res; + } + + public static com.uber.cadence.entities.RespondDecisionTaskCompletedResponse + respondDecisionTaskCompletedResponse(RespondDecisionTaskCompletedResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.RespondDecisionTaskCompletedResponse res = + new com.uber.cadence.entities.RespondDecisionTaskCompletedResponse(); + res.setDecisionTask(pollForDecisionTaskResponse(t.getDecisionTask())); + res.setActivitiesToDispatchLocally( + activityLocalDispatchInfoMap(t.getActivitiesToDispatchLocallyMap())); + return res; + } + + public static com.uber.cadence.entities.ListWorkflowExecutionsResponse + scanWorkflowExecutionsResponse(ScanWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListWorkflowExecutionsResponse res = + new com.uber.cadence.entities.ListWorkflowExecutionsResponse(); + res.setExecutions(workflowExecutionInfoArray(t.getExecutionsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.CountWorkflowExecutionsResponse + countWorkflowExecutionsResponse(CountWorkflowExecutionsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.CountWorkflowExecutionsResponse res = + new com.uber.cadence.entities.CountWorkflowExecutionsResponse(); + res.setCount(t.getCount()); + return res; + } + + public static com.uber.cadence.entities.DescribeDomainResponse describeDomainResponse( + DescribeDomainResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.DescribeDomainResponse response = + new com.uber.cadence.entities.DescribeDomainResponse(); + com.uber.cadence.entities.DomainInfo domainInfo = new com.uber.cadence.entities.DomainInfo(); + response.setDomainInfo(domainInfo); + + domainInfo.setName(t.getDomain().getName()); + domainInfo.setStatus(domainStatus(t.getDomain().getStatus())); + domainInfo.setDescription(t.getDomain().getDescription()); + domainInfo.setOwnerEmail(t.getDomain().getOwnerEmail()); + domainInfo.setData(t.getDomain().getDataMap()); + domainInfo.setUuid(t.getDomain().getId()); + + com.uber.cadence.entities.DomainConfiguration domainConfiguration = + new com.uber.cadence.entities.DomainConfiguration(); + response.setConfiguration(domainConfiguration); + + domainConfiguration.setWorkflowExecutionRetentionPeriodInDays( + durationToDays(t.getDomain().getWorkflowExecutionRetentionPeriod())); + domainConfiguration.setEmitMetric(true); + domainConfiguration.setBadBinaries(badBinaries(t.getDomain().getBadBinaries())); + domainConfiguration.setHistoryArchivalStatus( + archivalStatus(t.getDomain().getHistoryArchivalStatus())); + domainConfiguration.setHistoryArchivalURI(t.getDomain().getHistoryArchivalUri()); + domainConfiguration.setVisibilityArchivalStatus( + archivalStatus(t.getDomain().getVisibilityArchivalStatus())); + domainConfiguration.setVisibilityArchivalURI(t.getDomain().getVisibilityArchivalUri()); + + com.uber.cadence.entities.DomainReplicationConfiguration replicationConfiguration = + new com.uber.cadence.entities.DomainReplicationConfiguration(); + response.setReplicationConfiguration(replicationConfiguration); + + replicationConfiguration.setActiveClusterName(t.getDomain().getActiveClusterName()); + replicationConfiguration.setClusters( + clusterReplicationConfigurationArrayFromProto(t.getDomain().getClustersList())); + + response.setFailoverVersion(t.getDomain().getFailoverVersion()); + response.setGlobalDomain(t.getDomain().getIsGlobalDomain()); + return response; + } + + public static com.uber.cadence.entities.ListDomainsResponse listDomainsResponse( + ListDomainsResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.ListDomainsResponse res = + new com.uber.cadence.entities.ListDomainsResponse(); + res.setDomains(describeDomainResponseArray(t.getDomainsList())); + res.setNextPageToken(byteStringToArray(t.getNextPageToken())); + return res; + } + + public static com.uber.cadence.entities.StartWorkflowExecutionResponse + signalWithStartWorkflowExecutionResponse(SignalWithStartWorkflowExecutionResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.StartWorkflowExecutionResponse startWorkflowExecutionResponse = + new com.uber.cadence.entities.StartWorkflowExecutionResponse(); + startWorkflowExecutionResponse.setRunId(t.getRunId()); + return startWorkflowExecutionResponse; + } + + public static com.uber.cadence.entities.SignalWithStartWorkflowExecutionAsyncResponse + signalWithStartWorkflowExecutionAsyncResponse( + SignalWithStartWorkflowExecutionAsyncResponse t) { + return t == null + ? null + : new com.uber.cadence.entities.SignalWithStartWorkflowExecutionAsyncResponse(); + } + + public static com.uber.cadence.entities.UpdateDomainResponse updateDomainResponse( + UpdateDomainResponse t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.UpdateDomainResponse updateDomainResponse = + new com.uber.cadence.entities.UpdateDomainResponse(); + com.uber.cadence.entities.DomainInfo domainInfo = new com.uber.cadence.entities.DomainInfo(); + updateDomainResponse.setDomainInfo(domainInfo); + + domainInfo.setName(t.getDomain().getName()); + domainInfo.setStatus(domainStatus(t.getDomain().getStatus())); + domainInfo.setDescription(t.getDomain().getDescription()); + domainInfo.setOwnerEmail(t.getDomain().getOwnerEmail()); + domainInfo.setData(t.getDomain().getDataMap()); + domainInfo.setUuid(t.getDomain().getId()); + + com.uber.cadence.entities.DomainConfiguration domainConfiguration = + new com.uber.cadence.entities.DomainConfiguration(); + updateDomainResponse.setConfiguration(domainConfiguration); + + domainConfiguration.setWorkflowExecutionRetentionPeriodInDays( + durationToDays(t.getDomain().getWorkflowExecutionRetentionPeriod())); + domainConfiguration.setEmitMetric(true); + domainConfiguration.setBadBinaries(badBinaries(t.getDomain().getBadBinaries())); + domainConfiguration.setHistoryArchivalStatus( + archivalStatus(t.getDomain().getHistoryArchivalStatus())); + domainConfiguration.setHistoryArchivalURI(t.getDomain().getHistoryArchivalUri()); + domainConfiguration.setVisibilityArchivalStatus( + archivalStatus(t.getDomain().getVisibilityArchivalStatus())); + domainConfiguration.setVisibilityArchivalURI(t.getDomain().getVisibilityArchivalUri()); + + com.uber.cadence.entities.DomainReplicationConfiguration domainReplicationConfiguration = + new com.uber.cadence.entities.DomainReplicationConfiguration(); + updateDomainResponse.setReplicationConfiguration(domainReplicationConfiguration); + + domainReplicationConfiguration.setActiveClusterName(t.getDomain().getActiveClusterName()); + domainReplicationConfiguration.setClusters( + clusterReplicationConfigurationArrayFromProto(t.getDomain().getClustersList())); + updateDomainResponse.setFailoverVersion(t.getDomain().getFailoverVersion()); + updateDomainResponse.setGlobalDomain(t.getDomain().getIsGlobalDomain()); + return updateDomainResponse; + } + + public static com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse + recordActivityTaskHeartbeatResponse( + RecordActivityTaskHeartbeatByIDResponse recordActivityTaskHeartbeatByID) { + if (recordActivityTaskHeartbeatByID == null) { + return null; + } + com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse res = + new com.uber.cadence.entities.RecordActivityTaskHeartbeatResponse(); + res.setCancelRequested(recordActivityTaskHeartbeatByID.getCancelRequested()); + return res; + } + + public static com.uber.cadence.entities.ResetStickyTaskListResponse resetStickyTaskListResponse( + ResetStickyTaskListResponse resetStickyTaskList) { + if (resetStickyTaskList == null) { + return null; + } + com.uber.cadence.entities.ResetStickyTaskListResponse res = + new com.uber.cadence.entities.ResetStickyTaskListResponse(); + return res; + } + + public static com.uber.cadence.entities.ClusterInfo clusterInfoResponse( + GetClusterInfoResponse clusterInfo) { + if (clusterInfo == null) { + return null; + } + com.uber.cadence.entities.ClusterInfo res = new com.uber.cadence.entities.ClusterInfo(); + res.setSupportedClientVersions( + TypeMapper.supportedClientVersions(clusterInfo.getSupportedClientVersions())); + return res; + } + + public static com.uber.cadence.entities.GetTaskListsByDomainResponse getTaskListsByDomainResponse( + GetTaskListsByDomainResponse taskListsByDomain) { + if (taskListsByDomain == null) { + return null; + } + com.uber.cadence.entities.GetTaskListsByDomainResponse res = + new com.uber.cadence.entities.GetTaskListsByDomainResponse(); + + res.setActivityTaskListMap( + taskListsByDomain + .getActivityTaskListMapMap() + .entrySet() + .stream() + .collect( + Collectors.toMap(Map.Entry::getKey, e -> describeTaskListResponse(e.getValue())))); + res.setDecisionTaskListMap( + taskListsByDomain + .getDecisionTaskListMapMap() + .entrySet() + .stream() + .collect( + Collectors.toMap(Map.Entry::getKey, e -> describeTaskListResponse(e.getValue())))); + return res; + } +} diff --git a/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapper.java b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapper.java new file mode 100644 index 000000000..206488017 --- /dev/null +++ b/src/main/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapper.java @@ -0,0 +1,931 @@ +/* + * Modifications Copyright (c) 2017-2021 Uber Technologies Inc. + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.archivalStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.domainStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.encodingType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.indexedValueType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.parentClosePolicy; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.pendingActivityState; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.pendingDecisionState; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.queryResultType; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.taskListKind; +import static com.uber.cadence.internal.compatibility.proto.mappers.EnumMapper.workflowExecutionCloseStatus; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.arrayToByteString; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.byteStringToArray; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.durationToDays; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.durationToSeconds; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.fromDoubleValue; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.secondsToDuration; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.timeToUnixNano; +import static com.uber.cadence.internal.compatibility.proto.mappers.Helpers.unixNanoToTime; + +import com.google.common.base.Strings; +import com.uber.cadence.api.v1.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +class TypeMapper { + + static BadBinaryInfo badBinaryInfo(com.uber.cadence.entities.BadBinaryInfo t) { + if (t == null) { + return null; + } + return BadBinaryInfo.newBuilder() + .setReason(t.getReason()) + .setOperator(t.getOperator()) + .setCreatedTime(unixNanoToTime(t.getCreatedTimeNano())) + .build(); + } + + static Payload payload(byte[] data) { + if (data == null) { + return Payload.newBuilder().build(); + } + return Payload.newBuilder().setData(arrayToByteString(data)).build(); + } + + static Failure failure(String reason, byte[] details) { + if (reason == null) { + return Failure.newBuilder().build(); + } + return Failure.newBuilder().setReason(reason).setDetails(arrayToByteString(details)).build(); + } + + static WorkflowExecution workflowExecution(com.uber.cadence.entities.WorkflowExecution t) { + if (t == null) { + return WorkflowExecution.newBuilder().build(); + } + if (t.getWorkflowId() == null && t.getRunId() == null) { + return WorkflowExecution.newBuilder().build(); + } + WorkflowExecution.Builder builder = + WorkflowExecution.newBuilder().setWorkflowId(t.getWorkflowId()); + if (t.getRunId() != null) { + builder.setRunId(t.getRunId()); + } + return builder.build(); + } + + static WorkflowExecution workflowRunPair(String workflowId, String runId) { + if (Strings.isNullOrEmpty(workflowId) && Strings.isNullOrEmpty(runId)) { + return WorkflowExecution.newBuilder().build(); + } + return WorkflowExecution.newBuilder().setWorkflowId(workflowId).setRunId(runId).build(); + } + + static ActivityType activityType(com.uber.cadence.entities.ActivityType t) { + if (t == null) { + return ActivityType.newBuilder().build(); + } + return ActivityType.newBuilder().setName(t.getName()).build(); + } + + static WorkflowType workflowType(com.uber.cadence.entities.WorkflowType t) { + if (t == null) { + return WorkflowType.newBuilder().build(); + } + return WorkflowType.newBuilder().setName(t.getName()).build(); + } + + static TaskList taskList(com.uber.cadence.entities.TaskList t) { + if (t == null) { + return TaskList.newBuilder().build(); + } + return TaskList.newBuilder().setName(t.getName()).setKind(taskListKind(t.getKind())).build(); + } + + static TaskListMetadata taskListMetadata(com.uber.cadence.entities.TaskListMetadata t) { + if (t == null) { + return TaskListMetadata.newBuilder().build(); + } + return TaskListMetadata.newBuilder() + .setMaxTasksPerSecond(fromDoubleValue(t.getMaxTasksPerSecond())) + .build(); + } + + static RetryPolicy retryPolicy(com.uber.cadence.entities.RetryPolicy t) { + if (t == null) { + return null; + } + RetryPolicy.Builder builder = + RetryPolicy.newBuilder() + .setInitialInterval(secondsToDuration(t.getInitialIntervalInSeconds())) + .setBackoffCoefficient(t.getBackoffCoefficient()) + .setMaximumInterval(secondsToDuration(t.getMaximumIntervalInSeconds())) + .setMaximumAttempts(t.getMaximumAttempts()) + .setExpirationInterval(secondsToDuration(t.getExpirationIntervalInSeconds())); + if (t.getNonRetriableErrorReasons() != null) { + builder.addAllNonRetryableErrorReasons(t.getNonRetriableErrorReasons()); + } + return builder.build(); + } + + static Header header(com.uber.cadence.entities.Header t) { + if (t == null) { + return Header.newBuilder().build(); + } + return Header.newBuilder().putAllFields(payloadByteBufferMap(t.getFields())).build(); + } + + static Memo memo(com.uber.cadence.entities.Memo t) { + if (t == null) { + return Memo.newBuilder().build(); + } + return Memo.newBuilder().putAllFields(payloadByteBufferMap(t.getFields())).build(); + } + + static SearchAttributes searchAttributes(com.uber.cadence.entities.SearchAttributes t) { + if (t == null) { + return SearchAttributes.newBuilder().build(); + } + return SearchAttributes.newBuilder() + .putAllIndexedFields(payloadByteBufferMap(t.getIndexedFields())) + .build(); + } + + static BadBinaries badBinaries(com.uber.cadence.entities.BadBinaries t) { + if (t == null) { + return BadBinaries.newBuilder().build(); + } + return BadBinaries.newBuilder().putAllBinaries(badBinaryInfoMap(t.getBinaries())).build(); + } + + static ClusterReplicationConfiguration clusterReplicationConfiguration( + com.uber.cadence.entities.ClusterReplicationConfiguration t) { + if (t == null) { + return ClusterReplicationConfiguration.newBuilder().build(); + } + return ClusterReplicationConfiguration.newBuilder().setClusterName(t.getClusterName()).build(); + } + + static WorkflowQuery workflowQuery(com.uber.cadence.entities.WorkflowQuery t) { + if (t == null) { + return null; + } + return WorkflowQuery.newBuilder() + .setQueryType(t.getQueryType()) + .setQueryArgs(payload(t.getQueryArgs())) + .build(); + } + + static WorkflowQueryResult workflowQueryResult(com.uber.cadence.entities.WorkflowQueryResult t) { + if (t == null) { + return WorkflowQueryResult.newBuilder().build(); + } + return WorkflowQueryResult.newBuilder() + .setResultType(queryResultType(t.getResultType())) + .setAnswer(payload(t.getAnswer())) + .setErrorMessage(t.getErrorMessage()) + .build(); + } + + static StickyExecutionAttributes stickyExecutionAttributes( + com.uber.cadence.entities.StickyExecutionAttributes t) { + if (t == null) { + return StickyExecutionAttributes.newBuilder().build(); + } + return StickyExecutionAttributes.newBuilder() + .setWorkerTaskList(taskList(t.getWorkerTaskList())) + .setScheduleToStartTimeout(secondsToDuration(t.getScheduleToStartTimeoutSeconds())) + .build(); + } + + static WorkerVersionInfo workerVersionInfo(com.uber.cadence.entities.WorkerVersionInfo t) { + if (t == null) { + return WorkerVersionInfo.newBuilder().build(); + } + return WorkerVersionInfo.newBuilder() + .setImpl(t.getImpl()) + .setFeatureVersion(t.getFeatureVersion()) + .build(); + } + + static StartTimeFilter startTimeFilter(com.uber.cadence.entities.StartTimeFilter t) { + if (t == null) { + return null; + } + return StartTimeFilter.newBuilder() + .setEarliestTime(unixNanoToTime(t.getEarliestTime())) + .setLatestTime(unixNanoToTime(t.getLatestTime())) + .build(); + } + + static WorkflowExecutionFilter workflowExecutionFilter( + com.uber.cadence.entities.WorkflowExecutionFilter t) { + if (t == null) { + return WorkflowExecutionFilter.newBuilder().build(); + } + return WorkflowExecutionFilter.newBuilder() + .setWorkflowId(t.getWorkflowId()) + .setRunId(t.getRunId()) + .build(); + } + + static WorkflowTypeFilter workflowTypeFilter(com.uber.cadence.entities.WorkflowTypeFilter t) { + if (t == null) { + return WorkflowTypeFilter.newBuilder().build(); + } + return WorkflowTypeFilter.newBuilder().setName(t.getName()).build(); + } + + static StatusFilter statusFilter(com.uber.cadence.entities.WorkflowExecutionCloseStatus t) { + if (t == null) { + return null; + } + return StatusFilter.newBuilder().setStatus(workflowExecutionCloseStatus(t)).build(); + } + + static Map payloadByteBufferMap(Map t) { + if (t == null) { + return Collections.emptyMap(); + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, payload(t.get(key))); + } + return v; + } + + static Map badBinaryInfoMap( + Map t) { + if (t == null) { + return Collections.emptyMap(); + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, badBinaryInfo(t.get(key))); + } + return v; + } + + static List clusterReplicationConfigurationArray( + List t) { + if (t == null) { + return Collections.emptyList(); + } + List v = new ArrayList<>(); + for (int i = 0; i < t.size(); i++) { + v.add(clusterReplicationConfiguration(t.get(i))); + } + return v; + } + + static Map workflowQueryResultMap( + Map t) { + if (t == null) { + return Collections.emptyMap(); + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, workflowQueryResult(t.get(key))); + } + return v; + } + + static byte[] payload(Payload t) { + if (t == null || t == Payload.getDefaultInstance()) { + return null; + } + if (t.getData().isEmpty()) { + // protoPayload will not generate this case + // however, Data field will be dropped by the encoding if it's empty + // and receiver side will see null for the Data field + // since we already know p is not null, Data field must be an empty byte array + return new byte[0]; + } + return byteStringToArray(t.getData()); + } + + static String failureReason(Failure t) { + if (t == null || t == Failure.getDefaultInstance()) { + return null; + } + return t.getReason(); + } + + static byte[] failureDetails(Failure t) { + if (t == null || t == Failure.getDefaultInstance()) { + return null; + } + return byteStringToArray(t.getDetails()); + } + + static com.uber.cadence.entities.WorkflowExecution workflowExecution(WorkflowExecution t) { + if (t == null || t == WorkflowExecution.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecution we = + new com.uber.cadence.entities.WorkflowExecution(); + we.setWorkflowId(t.getWorkflowId()); + we.setRunId(t.getRunId()); + return we; + } + + static String workflowId(WorkflowExecution t) { + if (t == null || t == WorkflowExecution.getDefaultInstance()) { + return null; + } + return t.getWorkflowId(); + } + + static String runId(WorkflowExecution t) { + if (t == null || t == WorkflowExecution.getDefaultInstance()) { + return null; + } + return t.getRunId(); + } + + static com.uber.cadence.entities.ActivityType activityType(ActivityType t) { + if (t == null || t == ActivityType.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityType activityType = + new com.uber.cadence.entities.ActivityType(); + activityType.setName(t.getName()); + return activityType; + } + + static com.uber.cadence.entities.WorkflowType workflowType(WorkflowType t) { + if (t == null || t == WorkflowType.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowType wt = new com.uber.cadence.entities.WorkflowType(); + wt.setName(t.getName()); + return wt; + } + + static com.uber.cadence.entities.TaskList taskList(TaskList t) { + if (t == null || t == TaskList.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TaskList taskList = new com.uber.cadence.entities.TaskList(); + taskList.setName(t.getName()); + taskList.setKind(taskListKind(t.getKind())); + return taskList; + } + + static com.uber.cadence.entities.RetryPolicy retryPolicy(RetryPolicy t) { + if (t == null || t == RetryPolicy.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.RetryPolicy res = new com.uber.cadence.entities.RetryPolicy(); + res.setInitialIntervalInSeconds(durationToSeconds(t.getInitialInterval())); + res.setBackoffCoefficient(t.getBackoffCoefficient()); + res.setMaximumIntervalInSeconds(durationToSeconds(t.getMaximumInterval())); + res.setMaximumAttempts(t.getMaximumAttempts()); + res.setNonRetriableErrorReasons(t.getNonRetryableErrorReasonsList()); + res.setExpirationIntervalInSeconds(durationToSeconds(t.getExpirationInterval())); + return res; + } + + static com.uber.cadence.entities.Header header(Header t) { + if (t == null || t == Header.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.Header res = new com.uber.cadence.entities.Header(); + res.setFields(payloadMap(t.getFieldsMap())); + return res; + } + + static com.uber.cadence.entities.Memo memo(Memo t) { + if (t == null || t == Memo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.Memo res = new com.uber.cadence.entities.Memo(); + res.setFields(payloadMap(t.getFieldsMap())); + return res; + } + + static com.uber.cadence.entities.SearchAttributes searchAttributes(SearchAttributes t) { + if (t == null || t.getAllFields().size() == 0 || t == SearchAttributes.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.SearchAttributes res = + new com.uber.cadence.entities.SearchAttributes(); + res.setIndexedFields(payloadMap(t.getIndexedFieldsMap())); + return res; + } + + static com.uber.cadence.entities.BadBinaries badBinaries(BadBinaries t) { + if (t == null || t == BadBinaries.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.BadBinaries badBinaries = new com.uber.cadence.entities.BadBinaries(); + badBinaries.setBinaries(badBinaryInfoMapFromProto(t.getBinariesMap())); + return badBinaries; + } + + static com.uber.cadence.entities.BadBinaryInfo badBinaryInfo(BadBinaryInfo t) { + if (t == null || t == BadBinaryInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.BadBinaryInfo res = new com.uber.cadence.entities.BadBinaryInfo(); + res.setReason(t.getReason()); + res.setOperator(t.getOperator()); + res.setCreatedTimeNano(timeToUnixNano(t.getCreatedTime())); + return res; + } + + static Map badBinaryInfoMapFromProto( + Map t) { + if (t == null) { + return null; + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, badBinaryInfo(t.get(key))); + } + return v; + } + + static com.uber.cadence.entities.WorkflowQuery workflowQuery(WorkflowQuery t) { + if (t == null || t == WorkflowQuery.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowQuery res = new com.uber.cadence.entities.WorkflowQuery(); + res.setQueryType(t.getQueryType()); + res.setQueryArgs(payload(t.getQueryArgs())); + return res; + } + + static Map payloadMap(Map t) { + if (t == null) { + return null; + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, payload(t.get(key))); + } + return v; + } + + static List + clusterReplicationConfigurationArrayFromProto(List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (int i = 0; i < t.size(); i++) { + v.add(clusterReplicationConfiguration(t.get(i))); + } + return v; + } + + static com.uber.cadence.entities.ClusterReplicationConfiguration clusterReplicationConfiguration( + ClusterReplicationConfiguration t) { + if (t == null || t == ClusterReplicationConfiguration.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ClusterReplicationConfiguration res = + new com.uber.cadence.entities.ClusterReplicationConfiguration(); + res.setClusterName(t.getClusterName()); + return res; + } + + static com.uber.cadence.entities.DataBlob dataBlob(DataBlob t) { + if (t == null || t == DataBlob.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DataBlob dataBlob = new com.uber.cadence.entities.DataBlob(); + dataBlob.setEncodingType(encodingType(t.getEncodingType())); + dataBlob.setData(byteStringToArray(t.getData())); + return dataBlob; + } + + static long externalInitiatedId(ExternalExecutionInfo t) { + return t.getInitiatedId(); + } + + static com.uber.cadence.entities.WorkflowExecution externalWorkflowExecution( + ExternalExecutionInfo t) { + if (t == null || t == ExternalExecutionInfo.getDefaultInstance()) { + return null; + } + return workflowExecution(t.getWorkflowExecution()); + } + + static com.uber.cadence.entities.ResetPoints resetPoints(ResetPoints t) { + if (t == null || t == ResetPoints.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ResetPoints res = new com.uber.cadence.entities.ResetPoints(); + res.setPoints(resetPointInfoArray(t.getPointsList())); + return res; + } + + static com.uber.cadence.entities.ResetPointInfo resetPointInfo(ResetPointInfo t) { + if (t == null || t == ResetPointInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ResetPointInfo res = new com.uber.cadence.entities.ResetPointInfo(); + res.setBinaryChecksum(t.getBinaryChecksum()); + res.setRunId(t.getRunId()); + res.setFirstDecisionCompletedId(t.getFirstDecisionCompletedId()); + res.setCreatedTimeNano(timeToUnixNano(t.getCreatedTime())); + res.setExpiringTimeNano(timeToUnixNano(t.getExpiringTime())); + res.setResettable(t.getResettable()); + return res; + } + + static com.uber.cadence.entities.PollerInfo pollerInfo(PollerInfo t) { + if (t == null || t == PollerInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.PollerInfo res = new com.uber.cadence.entities.PollerInfo(); + res.setLastAccessTime(timeToUnixNano(t.getLastAccessTime())); + res.setIdentity(t.getIdentity()); + res.setRatePerSecond(t.getRatePerSecond()); + return res; + } + + static com.uber.cadence.entities.TaskListStatus taskListStatus(TaskListStatus t) { + if (t == null || t == TaskListStatus.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TaskListStatus res = new com.uber.cadence.entities.TaskListStatus(); + res.setBacklogCountHint(t.getBacklogCountHint()); + res.setReadLevel(t.getReadLevel()); + res.setAckLevel(t.getAckLevel()); + res.setRatePerSecond(t.getRatePerSecond()); + res.setTaskIDBlock(taskIdBlock(t.getTaskIdBlock())); + return res; + } + + static com.uber.cadence.entities.TaskIDBlock taskIdBlock(TaskIDBlock t) { + if (t == null || t == TaskIDBlock.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TaskIDBlock res = new com.uber.cadence.entities.TaskIDBlock(); + res.setStartID(t.getStartId()); + res.setEndID(t.getEndId()); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionConfiguration workflowExecutionConfiguration( + WorkflowExecutionConfiguration t) { + if (t == null || t == WorkflowExecutionConfiguration.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionConfiguration res = + new com.uber.cadence.entities.WorkflowExecutionConfiguration(); + res.setTaskList(taskList(t.getTaskList())); + res.setExecutionStartToCloseTimeoutSeconds( + durationToSeconds(t.getExecutionStartToCloseTimeout())); + res.setTaskStartToCloseTimeoutSeconds(durationToSeconds(t.getTaskStartToCloseTimeout())); + return res; + } + + static com.uber.cadence.entities.WorkflowExecutionInfo workflowExecutionInfo( + WorkflowExecutionInfo t) { + if (t == null || t == WorkflowExecutionInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.WorkflowExecutionInfo res = + new com.uber.cadence.entities.WorkflowExecutionInfo(); + res.setExecution(workflowExecution(t.getWorkflowExecution())); + res.setType(workflowType(t.getType())); + res.setStartTime(timeToUnixNano(t.getStartTime())); + res.setCloseTime(timeToUnixNano(t.getCloseTime())); + res.setCloseStatus(workflowExecutionCloseStatus(t.getCloseStatus())); + res.setHistoryLength(t.getHistoryLength()); + res.setParentDomainName(parentDomainName(t.getParentExecutionInfo())); + res.setParentDomainId(parentDomainId(t.getParentExecutionInfo())); + res.setParentExecution(parentWorkflowExecution(t.getParentExecutionInfo())); + res.setExecutionTime(timeToUnixNano(t.getExecutionTime())); + res.setMemo(memo(t.getMemo())); + res.setSearchAttributes(searchAttributes(t.getSearchAttributes())); + res.setAutoResetPoints(resetPoints(t.getAutoResetPoints())); + res.setTaskList(t.getTaskList()); + res.setCron(t.getIsCron()); + return res; + } + + static String parentDomainId(ParentExecutionInfo t) { + if (t == null || t == ParentExecutionInfo.getDefaultInstance()) { + return null; + } + return t.getDomainId(); + } + + static String parentDomainName(ParentExecutionInfo t) { + if (t == null || t == ParentExecutionInfo.getDefaultInstance()) { + return null; + } + return t.getDomainName(); + } + + static long parentInitiatedId(ParentExecutionInfo t) { + if (t == null || t == ParentExecutionInfo.getDefaultInstance()) { + return -1; + } + return t.getInitiatedId(); + } + + static com.uber.cadence.entities.WorkflowExecution parentWorkflowExecution( + ParentExecutionInfo t) { + if (t == null || t == ParentExecutionInfo.getDefaultInstance()) { + return null; + } + return workflowExecution(t.getWorkflowExecution()); + } + + static com.uber.cadence.entities.PendingActivityInfo pendingActivityInfo(PendingActivityInfo t) { + if (t == null || t == PendingActivityInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.PendingActivityInfo res = + new com.uber.cadence.entities.PendingActivityInfo(); + res.setActivityID(t.getActivityId()); + res.setActivityType(activityType(t.getActivityType())); + res.setState(pendingActivityState(t.getState())); + res.setHeartbeatDetails(payload(t.getHeartbeatDetails())); + res.setLastHeartbeatTimestamp(timeToUnixNano(t.getLastHeartbeatTime())); + res.setLastStartedTimestamp(timeToUnixNano(t.getLastStartedTime())); + res.setAttempt(t.getAttempt()); + res.setMaximumAttempts(t.getMaximumAttempts()); + res.setScheduledTimestamp(timeToUnixNano(t.getScheduledTime())); + res.setExpirationTimestamp(timeToUnixNano(t.getExpirationTime())); + res.setLastFailureReason(failureReason(t.getLastFailure())); + res.setLastFailureDetails(failureDetails(t.getLastFailure())); + res.setLastWorkerIdentity(t.getLastWorkerIdentity()); + return res; + } + + static com.uber.cadence.entities.PendingChildExecutionInfo pendingChildExecutionInfo( + PendingChildExecutionInfo t) { + if (t == null || t == PendingChildExecutionInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.PendingChildExecutionInfo res = + new com.uber.cadence.entities.PendingChildExecutionInfo(); + res.setWorkflowID(workflowId(t.getWorkflowExecution())); + res.setRunID(runId(t.getWorkflowExecution())); + res.setWorkflowTypName(t.getWorkflowTypeName()); + res.setInitiatedID(t.getInitiatedId()); + res.setParentClosePolicy(parentClosePolicy(t.getParentClosePolicy())); + return res; + } + + static com.uber.cadence.entities.PendingDecisionInfo pendingDecisionInfo(PendingDecisionInfo t) { + if (t == null || t == PendingDecisionInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.PendingDecisionInfo res = + new com.uber.cadence.entities.PendingDecisionInfo(); + res.setState(pendingDecisionState(t.getState())); + res.setScheduledTimestamp(timeToUnixNano(t.getScheduledTime())); + res.setStartedTimestamp(timeToUnixNano(t.getStartedTime())); + res.setAttempt(t.getAttempt()); + res.setOriginalScheduledTimestamp(timeToUnixNano(t.getOriginalScheduledTime())); + return res; + } + + static com.uber.cadence.entities.ActivityLocalDispatchInfo activityLocalDispatchInfo( + ActivityLocalDispatchInfo t) { + if (t == null || t == ActivityLocalDispatchInfo.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.ActivityLocalDispatchInfo res = + new com.uber.cadence.entities.ActivityLocalDispatchInfo(); + res.setActivityId(t.getActivityId()); + res.setScheduledTimestamp(timeToUnixNano(t.getScheduledTime())); + res.setStartedTimestamp(timeToUnixNano(t.getStartedTime())); + res.setScheduledTimestampOfThisAttempt(timeToUnixNano(t.getScheduledTimeOfThisAttempt())); + res.setTaskToken(byteStringToArray(t.getTaskToken())); + return res; + } + + static com.uber.cadence.entities.SupportedClientVersions supportedClientVersions( + SupportedClientVersions t) { + if (t == null || t == SupportedClientVersions.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.SupportedClientVersions res = + new com.uber.cadence.entities.SupportedClientVersions(); + res.setGoSdk(t.getGoSdk()); + res.setJavaSdk(t.getJavaSdk()); + return res; + } + + static com.uber.cadence.entities.DescribeDomainResponse describeDomainResponseDomain(Domain t) { + if (t == null || t == Domain.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.DescribeDomainResponse res = + new com.uber.cadence.entities.DescribeDomainResponse(); + com.uber.cadence.entities.DomainInfo domainInfo = new com.uber.cadence.entities.DomainInfo(); + res.setDomainInfo(domainInfo); + + domainInfo.setName(t.getName()); + domainInfo.setStatus(domainStatus(t.getStatus())); + domainInfo.setDescription(t.getDescription()); + domainInfo.setOwnerEmail(t.getOwnerEmail()); + domainInfo.setData(t.getDataMap()); + domainInfo.setUuid(t.getId()); + + com.uber.cadence.entities.DomainConfiguration domainConfiguration = + new com.uber.cadence.entities.DomainConfiguration(); + res.setConfiguration(domainConfiguration); + + domainConfiguration.setWorkflowExecutionRetentionPeriodInDays( + durationToDays(t.getWorkflowExecutionRetentionPeriod())); + domainConfiguration.setEmitMetric(true); + domainConfiguration.setBadBinaries(badBinaries(t.getBadBinaries())); + domainConfiguration.setHistoryArchivalStatus(archivalStatus(t.getHistoryArchivalStatus())); + domainConfiguration.setHistoryArchivalURI(t.getHistoryArchivalUri()); + domainConfiguration.setVisibilityArchivalStatus( + archivalStatus(t.getVisibilityArchivalStatus())); + domainConfiguration.setVisibilityArchivalURI(t.getVisibilityArchivalUri()); + + com.uber.cadence.entities.DomainReplicationConfiguration domainReplicationConfiguration = + new com.uber.cadence.entities.DomainReplicationConfiguration(); + res.setReplicationConfiguration(domainReplicationConfiguration); + + domainReplicationConfiguration.setActiveClusterName(t.getActiveClusterName()); + domainReplicationConfiguration.setClusters( + clusterReplicationConfigurationArrayFromProto(t.getClustersList())); + res.setFailoverVersion(t.getFailoverVersion()); + res.setGlobalDomain(t.getIsGlobalDomain()); + + return res; + } + + static com.uber.cadence.entities.TaskListMetadata taskListMetadata(TaskListMetadata t) { + if (t == null) { + return null; + } + com.uber.cadence.entities.TaskListMetadata res = + new com.uber.cadence.entities.TaskListMetadata(); + res.setMaxTasksPerSecond(t.getMaxTasksPerSecond().getValue()); + return res; + } + + static com.uber.cadence.entities.TaskListPartitionMetadata taskListPartitionMetadata( + TaskListPartitionMetadata t) { + if (t == null || t == TaskListPartitionMetadata.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.TaskListPartitionMetadata res = + new com.uber.cadence.entities.TaskListPartitionMetadata(); + res.setKey(t.getKey()); + res.setOwnerHostName(t.getOwnerHostName()); + return res; + } + + static com.uber.cadence.entities.QueryRejected queryRejected(QueryRejected t) { + if (t == null || t == QueryRejected.getDefaultInstance()) { + return null; + } + com.uber.cadence.entities.QueryRejected res = new com.uber.cadence.entities.QueryRejected(); + res.setCloseStatus(workflowExecutionCloseStatus(t.getCloseStatus())); + return res; + } + + static List pollerInfoArray(List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (PollerInfo pollerInfo : t) { + v.add(pollerInfo(pollerInfo)); + } + return v; + } + + static List resetPointInfoArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (ResetPointInfo resetPointInfo : t) { + v.add(resetPointInfo(resetPointInfo)); + } + return v; + } + + static List pendingActivityInfoArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (PendingActivityInfo pendingActivityInfo : t) { + v.add(pendingActivityInfo(pendingActivityInfo)); + } + return v; + } + + static List pendingChildExecutionInfoArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (PendingChildExecutionInfo pendingChildExecutionInfo : t) { + v.add(pendingChildExecutionInfo(pendingChildExecutionInfo)); + } + return v; + } + + static Map indexedValueTypeMap( + Map t) { + if (t == null) { + return null; + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, indexedValueType(t.get(key))); + } + return v; + } + + static List dataBlobArray(List t) { + if (t == null || t.size() == 0) { + return null; + } + List v = new ArrayList<>(); + for (DataBlob dataBlob : t) { + v.add(dataBlob(dataBlob)); + } + return v; + } + + static List workflowExecutionInfoArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (WorkflowExecutionInfo workflowExecutionInfo : t) { + v.add(workflowExecutionInfo(workflowExecutionInfo)); + } + return v; + } + + static List describeDomainResponseArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (Domain domain : t) { + v.add(describeDomainResponseDomain(domain)); + } + return v; + } + + static List taskListPartitionMetadataArray( + List t) { + if (t == null) { + return null; + } + List v = new ArrayList<>(); + for (TaskListPartitionMetadata taskListPartitionMetadata : t) { + v.add(taskListPartitionMetadata(taskListPartitionMetadata)); + } + return v; + } + + static Map workflowQueryMap( + Map t) { + if (t == null) { + return null; + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, workflowQuery(t.get(key))); + } + return v; + } + + static Map + activityLocalDispatchInfoMap(Map t) { + if (t == null) { + return null; + } + Map v = new HashMap<>(); + for (String key : t.keySet()) { + v.put(key, activityLocalDispatchInfo(t.get(key))); + } + return v; + } +} diff --git a/src/main/java/com/uber/cadence/serviceclient/AsyncMethodCallback.java b/src/main/java/com/uber/cadence/serviceclient/AsyncMethodCallback.java new file mode 100644 index 000000000..c150629db --- /dev/null +++ b/src/main/java/com/uber/cadence/serviceclient/AsyncMethodCallback.java @@ -0,0 +1,33 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.serviceclient; + +public interface AsyncMethodCallback { + /** + * Called when the remote service has completed processing the request and the response has been + * fully received. + * + * @param response + */ + public void onComplete(T response); + + /** + * Called when there is an unexpected expection. Exception is wrapped in {@link + * com.uber.cadence.entities.BaseError}. + * + * @param exception + */ + public void onError(Exception exception); +} diff --git a/src/main/java/com/uber/cadence/serviceclient/IWorkflowServiceV4.java b/src/main/java/com/uber/cadence/serviceclient/IWorkflowServiceV4.java new file mode 100644 index 000000000..cc6b88ead --- /dev/null +++ b/src/main/java/com/uber/cadence/serviceclient/IWorkflowServiceV4.java @@ -0,0 +1,811 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.uber.cadence.serviceclient; + +import com.uber.cadence.entities.*; +import java.util.concurrent.CompletableFuture; + +public interface IWorkflowServiceV4 extends Iface, AsyncIface { + void close(); + + ClientOptions getOptions(); + + /** + * StartWorkflowExecutionWithTimeout start workflow same as StartWorkflowExecution but with + * timeout + * + * @param startRequest + * @param resultHandler + * @param timeoutInMillis + * @throws BaseError + */ + void StartWorkflowExecutionWithTimeout( + StartWorkflowExecutionRequest startRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError; + + /** + * StartWorkflowExecutionAsyncWithTimeout start workflow same as StartWorkflowExecutionAsync but + * with timeout + * + * @param startAsyncRequest + * @param resultHandler + * @param timeoutInMillis + * @throws BaseError + */ + void StartWorkflowExecutionAsyncWithTimeout( + StartWorkflowExecutionAsyncRequest startAsyncRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError; + + /** + * GetWorkflowExecutionHistoryWithTimeout get workflow history same as GetWorkflowExecutionHistory + * but with timeout. + * + * @param getRequest + * @param timeoutInMillis + * @return GetWorkflowExecutionHistoryResponse + * @throws BaseError + */ + GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistoryWithTimeout( + GetWorkflowExecutionHistoryRequest getRequest, Long timeoutInMillis) throws BaseError; + + /** + * GetWorkflowExecutionHistoryWithTimeout get workflow history asynchronously same as + * GetWorkflowExecutionHistory but with timeout. + * + * @param getRequest + * @param resultHandler + * @param timeoutInMillis + * @throws BaseError + */ + void GetWorkflowExecutionHistoryWithTimeout( + GetWorkflowExecutionHistoryRequest getRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError; + + /** + * SignalWorkflowExecutionWithTimeout signal workflow same as SignalWorkflowExecution but with + * timeout + * + * @param signalRequest + * @param resultHandler + * @param timeoutInMillis + * @throws BaseError + */ + void SignalWorkflowExecutionWithTimeout( + SignalWorkflowExecutionRequest signalRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError; + + /** + * Checks if we have a valid connection to the Cadence cluster, and potentially resets the peer + * list + */ + CompletableFuture isHealthy(); +} + +interface Iface { + + /** + * RegisterDomain creates a new domain which can be used as a container for all resources. Domain + * is a top level entity within Cadence, used as a container for all resources like workflow + * executions, tasklists, etc. Domain acts as a sandbox and provides isolation for all resources + * within the domain. All resources belongs to exactly one domain. + * + * @param registerRequest + */ + void RegisterDomain(RegisterDomainRequest registerRequest) + throws BadRequestError, DomainAlreadyExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * DescribeDomain returns the information and configuration for a registered domain. + * + * @param describeRequest + */ + DescribeDomainResponse DescribeDomain(DescribeDomainRequest describeRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * ListDomains returns the information and configuration for all domains. + * + * @param listRequest + */ + ListDomainsResponse ListDomains(ListDomainsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * UpdateDomain is used to update the information and configuration for a registered domain. + * + * @param updateRequest + */ + UpdateDomainResponse UpdateDomain(UpdateDomainRequest updateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + ClientVersionNotSupportedError, BaseError; + + /** + * DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain + * is deprecated it cannot be used to start new workflow executions. Existing workflow executions + * will continue to run on deprecated domains. + * + * @param deprecateRequest + */ + void DeprecateDomain(DeprecateDomainRequest deprecateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + ClientVersionNotSupportedError, BaseError; + + /** + * RestartWorkflowExecution restarts a previous workflow If the workflow is currently running it + * will terminate and restart + * + * @param restartRequest + */ + RestartWorkflowExecutionResponse RestartWorkflowExecution( + RestartWorkflowExecutionRequest restartRequest) + throws BadRequestError, ServiceBusyError, DomainNotActiveError, LimitExceededError, + EntityNotExistsError, ClientVersionNotSupportedError, BaseError; + + /** + * StartWorkflowExecution starts a new long running workflow instance. It will create the instance + * with 'WorkflowExecutionStarted' event in history and also schedule the first DecisionTask for + * the worker to make the first decision for this instance. It will return + * 'WorkflowExecutionAlreadyStartedError', if an instance already exists with same workflowId. + * + * @param startRequest + */ + StartWorkflowExecutionResponse StartWorkflowExecution(StartWorkflowExecutionRequest startRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError; + + /** + * StartWorkflowExecutionAsync starts a new long running workflow instance asynchronously. It will + * push a StartWorkflowExecutionRequest to a queue and immediately return a response. The request + * will be processed by a separate consumer eventually. + * + * @param startRequest + */ + StartWorkflowExecutionAsyncResponse StartWorkflowExecutionAsync( + StartWorkflowExecutionAsyncRequest startRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError; + + /** + * Returns the history of specified workflow execution. It fails with 'EntityNotExistError' if + * speficied workflow execution in unknown to the service. + * + * @param getRequest + */ + GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistory( + GetWorkflowExecutionHistoryRequest getRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * PollForDecisionTask is called by application worker to process DecisionTask from a specific + * taskList. A DecisionTask is dispatched to callers for active workflow executions, with pending + * decisions. Application is then expected to call 'RespondDecisionTaskCompleted' API when it is + * done processing the DecisionTask. It will also create a 'DecisionTaskStarted' event in the + * history for that session before handing off DecisionTask to application worker. + * + * @param pollRequest + */ + PollForDecisionTaskResponse PollForDecisionTask(PollForDecisionTaskRequest pollRequest) + throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError; + + /** + * RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed + * as a result of 'PollForDecisionTask' API call. Completing a DecisionTask will result in new + * events for the workflow execution and potentially new ActivityTask being created for + * corresponding decisions. It will also create a DecisionTaskCompleted event in the history for + * that session. Use the 'taskToken' provided as response of PollForDecisionTask API call for + * completing the DecisionTask. The response could contain a new decision task if there is one or + * if the request asking for one. + * + * @param completeRequest + */ + RespondDecisionTaskCompletedResponse RespondDecisionTaskCompleted( + RespondDecisionTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondDecisionTaskFailed is called by application worker to indicate failure. This results in + * DecisionTaskFailedEvent written to the history and a new DecisionTask created. This API can be + * used by client to either clear sticky tasklist or report any panics during DecisionTask + * processing. Cadence will only append first DecisionTaskFailed event to the history of workflow + * execution for consecutive failures. + * + * @param failedRequest + */ + void RespondDecisionTaskFailed(RespondDecisionTaskFailedRequest failedRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * PollForActivityTask is called by application worker to process ActivityTask from a specific + * taskList. ActivityTask is dispatched to callers whenever a ScheduleTask decision is made for a + * workflow execution. Application is expected to call 'RespondActivityTaskCompleted' or + * 'RespondActivityTaskFailed' once it is done processing the task. Application also needs to call + * 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to prevent the task + * from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow + * execution history before the ActivityTask is dispatched to application worker. + * + * @param pollRequest + */ + PollForActivityTaskResponse PollForActivityTask(PollForActivityTaskRequest pollRequest) + throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError; + + /** + * RecordActivityTaskHeartbeat is called by application worker while it is processing an + * ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the + * ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be + * written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will fail with + * 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of + * PollForActivityTask API call for heartbeating. + * + * @param heartbeatRequest + */ + RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeat( + RecordActivityTaskHeartbeatRequest heartbeatRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RecordActivityTaskHeartbeatByID is called by application worker while it is processing an + * ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the + * ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be + * written to the workflow history. Calling 'RecordActivityTaskHeartbeatByID' will fail with + * 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in + * RecordActivityTaskHeartbeat, use Domain, WorkflowID and ActivityID + * + * @param heartbeatRequest + */ + RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeatByID( + RecordActivityTaskHeartbeatByIDRequest heartbeatRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskCompleted is called by application worker when it is done processing an + * ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the + * workflow history and a new DecisionTask created for the workflow so new decisions could be + * made. Use the 'taskToken' provided as response of PollForActivityTask API call for completion. + * It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity + * timeout. + * + * @param completeRequest + */ + void RespondActivityTaskCompleted(RespondActivityTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskCompletedByID is called by application worker when it is done processing an + * ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the + * workflow history and a new DecisionTask created for the workflow so new decisions could be + * made. Similar to RespondActivityTaskCompleted but use Domain, WorkflowID and ActivityID instead + * of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not + * valid anymore due to activity timeout. + * + * @param completeRequest + */ + void RespondActivityTaskCompletedByID(RespondActivityTaskCompletedByIDRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskFailed is called by application worker when it is done processing an + * ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow + * history and a new DecisionTask created for the workflow instance so new decisions could be + * made. Use the 'taskToken' provided as response of PollForActivityTask API call for completion. + * It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity + * timeout. + * + * @param failRequest + */ + void RespondActivityTaskFailed(RespondActivityTaskFailedRequest failRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskFailedByID is called by application worker when it is done processing an + * ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow + * history and a new DecisionTask created for the workflow instance so new decisions could be + * made. Similar to RespondActivityTaskFailed but use Domain, WorkflowID and ActivityID instead of + * 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid + * anymore due to activity timeout. + * + * @param failRequest + */ + void RespondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest failRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskCanceled is called by application worker when it is successfully canceled an + * ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the + * workflow history and a new DecisionTask created for the workflow instance so new decisions + * could be made. Use the 'taskToken' provided as response of PollForActivityTask API call for + * completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to + * activity timeout. + * + * @param canceledRequest + */ + void RespondActivityTaskCanceled(RespondActivityTaskCanceledRequest canceledRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RespondActivityTaskCanceledByID is called by application worker when it is successfully + * canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to + * the workflow history and a new DecisionTask created for the workflow instance so new decisions + * could be made. Similar to RespondActivityTaskCanceled but use Domain, WorkflowID and ActivityID + * instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs + * are not valid anymore due to activity timeout. + * + * @param canceledRequest + */ + void RespondActivityTaskCanceledByID(RespondActivityTaskCanceledByIDRequest canceledRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError; + + /** + * RequestCancelWorkflowExecution is called by application worker when it wants to request + * cancellation of a workflow instance. It will result in a new 'WorkflowExecutionCancelRequested' + * event being written to the workflow history and a new DecisionTask created for the workflow + * instance so new decisions could be made. It fails with 'EntityNotExistsError' if the workflow + * is not valid anymore due to completion or doesn't exist. + * + * @param cancelRequest + */ + void RequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest cancelRequest) + throws BadRequestError, EntityNotExistsError, CancellationAlreadyRequestedError, + ServiceBusyError, DomainNotActiveError, LimitExceededError, + ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, BaseError; + + /** + * SignalWorkflowExecution is used to send a signal event to running workflow execution. This + * results in WorkflowExecutionSignaled event recorded in the history and a decision task being + * created for the execution. + * + * @param signalRequest + */ + void SignalWorkflowExecution(SignalWorkflowExecutionRequest signalRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError; + + /** + * SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow. If the + * workflow is running, this results in WorkflowExecutionSignaled event being recorded in the + * history and a decision task being created for the execution. If the workflow is not running or + * not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled events being + * recorded in history, and a decision task being created for the execution + * + * @param signalWithStartRequest + */ + StartWorkflowExecutionResponse SignalWithStartWorkflowExecution( + SignalWithStartWorkflowExecutionRequest signalWithStartRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, WorkflowExecutionAlreadyStartedError, ClientVersionNotSupportedError, + BaseError; + + /** + * SignalWithStartWorkflowExecutionAsync is used to ensure sending signal to a workflow + * asynchronously. It will push a SignalWithStartWorkflowExecutionRequest to a queue and + * immediately return a response. The request will be processed by a separate consumer eventually. + * + * @param signalWithStartRequest + */ + SignalWithStartWorkflowExecutionAsyncResponse SignalWithStartWorkflowExecutionAsync( + SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError; + + /** + * ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted + * event(exclusive). And it will immediately terminating the current execution instance. + * + * @param resetRequest + */ + ResetWorkflowExecutionResponse ResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, BaseError; + + /** + * TerminateWorkflowExecution terminates an existing workflow execution by recording + * WorkflowExecutionTerminated event in the history and immediately terminating the execution + * instance. + * + * @param terminateRequest + */ + void TerminateWorkflowExecution(TerminateWorkflowExecutionRequest terminateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError; + + /** + * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific + * domain. + * + * @param listRequest + */ + ListOpenWorkflowExecutionsResponse ListOpenWorkflowExecutions( + ListOpenWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, LimitExceededError, + ClientVersionNotSupportedError, BaseError; + + /** + * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific + * domain. + * + * @param listRequest + */ + ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions( + ListClosedWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain. + * + * @param listRequest + */ + ListWorkflowExecutionsResponse ListWorkflowExecutions(ListWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a + * specific domain. + * + * @param listRequest + */ + ListArchivedWorkflowExecutionsResponse ListArchivedWorkflowExecutions( + ListArchivedWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a + * specific domain without order. + * + * @param listRequest + */ + ListWorkflowExecutionsResponse ScanWorkflowExecutions(ListWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific + * domain. + * + * @param countRequest + */ + CountWorkflowExecutionsResponse CountWorkflowExecutions( + CountWorkflowExecutionsRequest countRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs + */ + GetSearchAttributesResponse GetSearchAttributes() + throws ServiceBusyError, ClientVersionNotSupportedError, BaseError; + + /** + * RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a + * DecisionTask for query) as a result of 'PollForDecisionTask' API call. Completing a QueryTask + * will unblock the client call to 'QueryWorkflow' API and return the query result to client as a + * response to 'QueryWorkflow' API call. + * + * @param completeRequest + */ + void RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError; + + /** + * Reset the sticky tasklist related information in mutable state of a given workflow. Things + * cleared are: 1. StickyTaskList 2. StickyScheduleToStartTimeout 3. ClientLibraryVersion 4. + * ClientFeatureVersion 5. ClientImpl + * + * @param resetRequest + */ + ResetStickyTaskListResponse ResetStickyTaskList(ResetStickyTaskListRequest resetRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + DomainNotActiveError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError; + + /** + * QueryWorkflow returns query result for a specified workflow execution + * + * @param queryRequest + */ + QueryWorkflowResponse QueryWorkflow(QueryWorkflowRequest queryRequest) + throws BadRequestError, EntityNotExistsError, QueryFailedError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, BaseError; + + /** + * DescribeWorkflowExecution returns information about the specified workflow execution. + * + * @param describeRequest + */ + DescribeWorkflowExecutionResponse DescribeWorkflowExecution( + DescribeWorkflowExecutionRequest describeRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * DescribeTaskList returns information about the target tasklist, right now this API returns the + * pollers which polled this tasklist in last few minutes. + * + * @param request + */ + DescribeTaskListResponse DescribeTaskList(DescribeTaskListRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** GetClusterInfo returns information about cadence cluster */ + ClusterInfo GetClusterInfo() throws InternalServiceError, ServiceBusyError, BaseError; + + /** + * GetTaskListsByDomain returns the list of all the task lists for a domainName. + * + * @param request + */ + GetTaskListsByDomainResponse GetTaskListsByDomain(GetTaskListsByDomainRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError; + + /** + * ReapplyEvents applies stale events to the current workflow and current run + * + * @param request + */ + ListTaskListPartitionsResponse ListTaskListPartitions(ListTaskListPartitionsRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, BaseError; + + /** + * RefreshWorkflowTasks refreshes all tasks of a workflow + * + * @param request + */ + void RefreshWorkflowTasks(RefreshWorkflowTasksRequest request) + throws BadRequestError, DomainNotActiveError, ServiceBusyError, EntityNotExistsError, + BaseError; +} + +interface AsyncIface { + + void RegisterDomain( + RegisterDomainRequest registerRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void DescribeDomain( + DescribeDomainRequest describeRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ListDomains( + ListDomainsRequest listRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void UpdateDomain( + UpdateDomainRequest updateRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void DeprecateDomain( + DeprecateDomainRequest deprecateRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void RestartWorkflowExecution( + RestartWorkflowExecutionRequest restartRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void StartWorkflowExecution( + StartWorkflowExecutionRequest startRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void StartWorkflowExecutionAsync( + StartWorkflowExecutionAsyncRequest startRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void GetWorkflowExecutionHistory( + GetWorkflowExecutionHistoryRequest getRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void PollForDecisionTask( + PollForDecisionTaskRequest pollRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondDecisionTaskCompleted( + RespondDecisionTaskCompletedRequest completeRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondDecisionTaskFailed( + RespondDecisionTaskFailedRequest failedRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void PollForActivityTask( + PollForActivityTaskRequest pollRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RecordActivityTaskHeartbeat( + RecordActivityTaskHeartbeatRequest heartbeatRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RecordActivityTaskHeartbeatByID( + RecordActivityTaskHeartbeatByIDRequest heartbeatRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskCompleted( + RespondActivityTaskCompletedRequest completeRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskCompletedByID( + RespondActivityTaskCompletedByIDRequest completeRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskFailed( + RespondActivityTaskFailedRequest failRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskFailedByID( + RespondActivityTaskFailedByIDRequest failRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskCanceled( + RespondActivityTaskCanceledRequest canceledRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondActivityTaskCanceledByID( + RespondActivityTaskCanceledByIDRequest canceledRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RequestCancelWorkflowExecution( + RequestCancelWorkflowExecutionRequest cancelRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void SignalWorkflowExecution( + SignalWorkflowExecutionRequest signalRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void SignalWithStartWorkflowExecution( + SignalWithStartWorkflowExecutionRequest signalWithStartRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void SignalWithStartWorkflowExecutionAsync( + SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ResetWorkflowExecution( + ResetWorkflowExecutionRequest resetRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void TerminateWorkflowExecution( + TerminateWorkflowExecutionRequest terminateRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void ListOpenWorkflowExecutions( + ListOpenWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ListClosedWorkflowExecutions( + ListClosedWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ListWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ListArchivedWorkflowExecutions( + ListArchivedWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ScanWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void CountWorkflowExecutions( + CountWorkflowExecutionsRequest countRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void GetSearchAttributes(AsyncMethodCallback resultHandler) + throws BaseError; + + void RespondQueryTaskCompleted( + RespondQueryTaskCompletedRequest completeRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void ResetStickyTaskList( + ResetStickyTaskListRequest resetRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void QueryWorkflow( + QueryWorkflowRequest queryRequest, AsyncMethodCallback resultHandler) + throws BaseError; + + void DescribeWorkflowExecution( + DescribeWorkflowExecutionRequest describeRequest, + AsyncMethodCallback resultHandler) + throws BaseError; + + void DescribeTaskList( + DescribeTaskListRequest request, AsyncMethodCallback resultHandler) + throws BaseError; + + void GetClusterInfo(AsyncMethodCallback resultHandler) throws BaseError; + + void GetTaskListsByDomain( + GetTaskListsByDomainRequest request, + AsyncMethodCallback resultHandler) + throws BaseError; + + void ListTaskListPartitions( + ListTaskListPartitionsRequest request, + AsyncMethodCallback resultHandler) + throws BaseError; + + void RefreshWorkflowTasks( + RefreshWorkflowTasksRequest request, AsyncMethodCallback resultHandler) + throws BaseError; +} diff --git a/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceGrpc.java b/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceGrpc.java new file mode 100644 index 000000000..97494f291 --- /dev/null +++ b/src/main/java/com/uber/cadence/serviceclient/WorkflowServiceGrpc.java @@ -0,0 +1,1393 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.uber.cadence.serviceclient; + +import com.google.common.util.concurrent.FutureCallback; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.MoreExecutors; +import com.uber.cadence.entities.*; +import com.uber.cadence.entities.BadRequestError; +import com.uber.cadence.entities.BaseError; +import com.uber.cadence.entities.CancellationAlreadyRequestedError; +import com.uber.cadence.entities.ClientVersionNotSupportedError; +import com.uber.cadence.entities.DomainAlreadyExistsError; +import com.uber.cadence.entities.DomainNotActiveError; +import com.uber.cadence.entities.EntityNotExistsError; +import com.uber.cadence.entities.InternalServiceError; +import com.uber.cadence.entities.LimitExceededError; +import com.uber.cadence.entities.QueryFailedError; +import com.uber.cadence.entities.ServiceBusyError; +import com.uber.cadence.entities.WorkflowExecutionAlreadyCompletedError; +import com.uber.cadence.entities.WorkflowExecutionAlreadyStartedError; +import com.uber.cadence.internal.compatibility.proto.mappers.*; +import com.uber.cadence.internal.compatibility.proto.serviceclient.IGrpcServiceStubs; +import io.grpc.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + +public class WorkflowServiceGrpc implements IWorkflowServiceV4 { + + private final IGrpcServiceStubs grpcServiceStubs; + private final Executor executor = MoreExecutors.directExecutor(); + + WorkflowServiceGrpc(ClientOptions options) { + this.grpcServiceStubs = IGrpcServiceStubs.newInstance(options); + } + + @Override + public void close() { + grpcServiceStubs.shutdown(); + } + + @Override + public ClientOptions getOptions() { + return grpcServiceStubs.getOptions(); + } + + @Override + public CompletableFuture isHealthy() { + CompletableFuture completableFuture = new CompletableFuture<>(); + Futures.addCallback( + grpcServiceStubs + .metaFutureStub() + .health(com.uber.cadence.api.v1.HealthRequest.getDefaultInstance()), + new FutureCallback() { + @Override + public void onSuccess(com.uber.cadence.api.v1.HealthResponse response) { + completableFuture.complete(response.getOk()); + } + + @Override + public void onFailure(Throwable throwable) { + completableFuture.completeExceptionally(toServiceClientException(throwable)); + } + }, + executor); + return completableFuture; + } + + @Override + public void StartWorkflowExecutionWithTimeout( + StartWorkflowExecutionRequest startRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .withDeadlineAfter(timeoutInMillis, TimeUnit.MILLISECONDS) + .startWorkflowExecution(RequestMapper.startWorkflowExecutionRequest(startRequest)), + toFutureCallback(resultHandler, ResponseMapper::startWorkflowExecutionResponse), + executor); + } + + @Override + public void StartWorkflowExecutionAsyncWithTimeout( + StartWorkflowExecutionAsyncRequest startAsyncRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .withDeadlineAfter(timeoutInMillis, TimeUnit.MILLISECONDS) + .startWorkflowExecutionAsync( + RequestMapper.startWorkflowExecutionAsyncRequest(startAsyncRequest)), + toFutureCallback(resultHandler, ResponseMapper::startWorkflowExecutionAsyncResponse), + executor); + } + + @Override + public GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistoryWithTimeout( + GetWorkflowExecutionHistoryRequest getRequest, Long timeoutInMillis) throws BaseError { + try { + return ResponseMapper.getWorkflowExecutionHistoryResponse( + grpcServiceStubs + .workflowBlockingStub() + .withDeadlineAfter(timeoutInMillis, TimeUnit.MILLISECONDS) + .getWorkflowExecutionHistory( + RequestMapper.getWorkflowExecutionHistoryRequest(getRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void GetWorkflowExecutionHistoryWithTimeout( + GetWorkflowExecutionHistoryRequest getRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .withDeadlineAfter(timeoutInMillis, TimeUnit.MILLISECONDS) + .getWorkflowExecutionHistory( + RequestMapper.getWorkflowExecutionHistoryRequest(getRequest)), + toFutureCallback(resultHandler, ResponseMapper::getWorkflowExecutionHistoryResponse), + executor); + } + + @Override + public void SignalWorkflowExecutionWithTimeout( + SignalWorkflowExecutionRequest signalRequest, + AsyncMethodCallback resultHandler, + Long timeoutInMillis) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .withDeadlineAfter(timeoutInMillis, TimeUnit.MILLISECONDS) + .signalWorkflowExecution(RequestMapper.signalWorkflowExecutionRequest(signalRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RegisterDomain(RegisterDomainRequest registerRequest) + throws BadRequestError, DomainAlreadyExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + grpcServiceStubs + .domainBlockingStub() + .registerDomain(RequestMapper.registerDomainRequest(registerRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public DescribeDomainResponse DescribeDomain(DescribeDomainRequest describeRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.describeDomainResponse( + grpcServiceStubs + .domainBlockingStub() + .describeDomain(RequestMapper.describeDomainRequest(describeRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListDomainsResponse ListDomains(ListDomainsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.listDomainsResponse( + grpcServiceStubs + .domainBlockingStub() + .listDomains(RequestMapper.listDomainsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public UpdateDomainResponse UpdateDomain(UpdateDomainRequest updateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.updateDomainResponse( + grpcServiceStubs + .domainBlockingStub() + .updateDomain(RequestMapper.updateDomainRequest(updateRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void DeprecateDomain(DeprecateDomainRequest deprecateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + ClientVersionNotSupportedError, BaseError { + try { + grpcServiceStubs + .domainBlockingStub() + .deprecateDomain(RequestMapper.deprecateDomainRequest(deprecateRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public RestartWorkflowExecutionResponse RestartWorkflowExecution( + RestartWorkflowExecutionRequest restartRequest) + throws BadRequestError, ServiceBusyError, DomainNotActiveError, LimitExceededError, + EntityNotExistsError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.restartWorkflowExecutionResponse( + grpcServiceStubs + .workflowBlockingStub() + .restartWorkflowExecution( + RequestMapper.restartWorkflowExecutionRequest(restartRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public StartWorkflowExecutionResponse StartWorkflowExecution( + StartWorkflowExecutionRequest startRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.startWorkflowExecutionResponse( + grpcServiceStubs + .workflowBlockingStub() + .startWorkflowExecution(RequestMapper.startWorkflowExecutionRequest(startRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public StartWorkflowExecutionAsyncResponse StartWorkflowExecutionAsync( + StartWorkflowExecutionAsyncRequest startRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.startWorkflowExecutionAsyncResponse( + grpcServiceStubs + .workflowBlockingStub() + .startWorkflowExecutionAsync( + RequestMapper.startWorkflowExecutionAsyncRequest(startRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistory( + GetWorkflowExecutionHistoryRequest getRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.getWorkflowExecutionHistoryResponse( + grpcServiceStubs + .workflowBlockingStub() + .getWorkflowExecutionHistory( + RequestMapper.getWorkflowExecutionHistoryRequest(getRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public PollForDecisionTaskResponse PollForDecisionTask(PollForDecisionTaskRequest pollRequest) + throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.pollForDecisionTaskResponse( + grpcServiceStubs + .workerBlockingStub() + .pollForDecisionTask(RequestMapper.pollForDecisionTaskRequest(pollRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public RespondDecisionTaskCompletedResponse RespondDecisionTaskCompleted( + RespondDecisionTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + return ResponseMapper.respondDecisionTaskCompletedResponse( + grpcServiceStubs + .workerBlockingStub() + .respondDecisionTaskCompleted( + RequestMapper.respondDecisionTaskCompletedRequest(completeRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondDecisionTaskFailed(RespondDecisionTaskFailedRequest failedRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondDecisionTaskFailed(RequestMapper.respondDecisionTaskFailedRequest(failedRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public PollForActivityTaskResponse PollForActivityTask(PollForActivityTaskRequest pollRequest) + throws BadRequestError, ServiceBusyError, LimitExceededError, EntityNotExistsError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.pollForActivityTaskResponse( + grpcServiceStubs + .workerBlockingStub() + .pollForActivityTask(RequestMapper.pollForActivityTaskRequest(pollRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeat( + RecordActivityTaskHeartbeatRequest heartbeatRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + return ResponseMapper.recordActivityTaskHeartbeatResponse( + grpcServiceStubs + .workerBlockingStub() + .recordActivityTaskHeartbeat( + RequestMapper.recordActivityTaskHeartbeatRequest(heartbeatRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeatByID( + RecordActivityTaskHeartbeatByIDRequest heartbeatRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + return ResponseMapper.recordActivityTaskHeartbeatResponse( + grpcServiceStubs + .workerBlockingStub() + .recordActivityTaskHeartbeatByID( + RequestMapper.recordActivityTaskHeartbeatByIDRequest(heartbeatRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskCompleted(RespondActivityTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskCompleted( + RequestMapper.respondActivityTaskCompletedRequest(completeRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskCompletedByID( + RespondActivityTaskCompletedByIDRequest completeRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskCompletedByID( + RequestMapper.respondActivityTaskCompletedByIDRequest(completeRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskFailed(RespondActivityTaskFailedRequest failRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskFailed(RequestMapper.respondActivityTaskFailedRequest(failRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest failRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskFailedByID( + RequestMapper.respondActivityTaskFailedByIDRequest(failRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskCanceled(RespondActivityTaskCanceledRequest canceledRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskCanceled( + RequestMapper.respondActivityTaskCanceledRequest(canceledRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondActivityTaskCanceledByID( + RespondActivityTaskCanceledByIDRequest canceledRequest) + throws BadRequestError, EntityNotExistsError, DomainNotActiveError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, + BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondActivityTaskCanceledByID( + RequestMapper.respondActivityTaskCanceledByIDRequest(canceledRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest cancelRequest) + throws BadRequestError, EntityNotExistsError, CancellationAlreadyRequestedError, + ServiceBusyError, DomainNotActiveError, LimitExceededError, + ClientVersionNotSupportedError, WorkflowExecutionAlreadyCompletedError, BaseError { + try { + grpcServiceStubs + .workflowBlockingStub() + .requestCancelWorkflowExecution( + RequestMapper.requestCancelWorkflowExecutionRequest(cancelRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void SignalWorkflowExecution(SignalWorkflowExecutionRequest signalRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError { + try { + grpcServiceStubs + .workflowBlockingStub() + .signalWorkflowExecution(RequestMapper.signalWorkflowExecutionRequest(signalRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public StartWorkflowExecutionResponse SignalWithStartWorkflowExecution( + SignalWithStartWorkflowExecutionRequest signalWithStartRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, WorkflowExecutionAlreadyStartedError, ClientVersionNotSupportedError, + BaseError { + try { + return ResponseMapper.signalWithStartWorkflowExecutionResponse( + grpcServiceStubs + .workflowBlockingStub() + .signalWithStartWorkflowExecution( + RequestMapper.signalWithStartWorkflowExecutionRequest(signalWithStartRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public SignalWithStartWorkflowExecutionAsyncResponse SignalWithStartWorkflowExecutionAsync( + SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest) + throws BadRequestError, WorkflowExecutionAlreadyStartedError, ServiceBusyError, + DomainNotActiveError, LimitExceededError, EntityNotExistsError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.signalWithStartWorkflowExecutionAsyncResponse( + grpcServiceStubs + .workflowBlockingStub() + .signalWithStartWorkflowExecutionAsync( + RequestMapper.signalWithStartWorkflowExecutionAsyncRequest( + signalWithStartRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ResetWorkflowExecutionResponse ResetWorkflowExecution( + ResetWorkflowExecutionRequest resetRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.resetWorkflowExecutionResponse( + grpcServiceStubs + .workflowBlockingStub() + .resetWorkflowExecution(RequestMapper.resetWorkflowExecutionRequest(resetRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void TerminateWorkflowExecution(TerminateWorkflowExecutionRequest terminateRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, + LimitExceededError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError { + try { + grpcServiceStubs + .workflowBlockingStub() + .terminateWorkflowExecution( + RequestMapper.terminateWorkflowExecutionRequest(terminateRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListOpenWorkflowExecutionsResponse ListOpenWorkflowExecutions( + ListOpenWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, LimitExceededError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.listOpenWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .listOpenWorkflowExecutions( + RequestMapper.listOpenWorkflowExecutionsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions( + ListClosedWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.listClosedWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .listClosedWorkflowExecutions( + RequestMapper.listClosedWorkflowExecutionsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListWorkflowExecutionsResponse ListWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.listWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .listWorkflowExecutions(RequestMapper.listWorkflowExecutionsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListArchivedWorkflowExecutionsResponse ListArchivedWorkflowExecutions( + ListArchivedWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.listArchivedWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .listArchivedWorkflowExecutions( + RequestMapper.listArchivedWorkflowExecutionsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListWorkflowExecutionsResponse ScanWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.scanWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .scanWorkflowExecutions(RequestMapper.scanWorkflowExecutionsRequest(listRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public CountWorkflowExecutionsResponse CountWorkflowExecutions( + CountWorkflowExecutionsRequest countRequest) + throws BadRequestError, EntityNotExistsError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.countWorkflowExecutionsResponse( + grpcServiceStubs + .visibilityBlockingStub() + .countWorkflowExecutions(RequestMapper.countWorkflowExecutionsRequest(countRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public GetSearchAttributesResponse GetSearchAttributes() + throws ServiceBusyError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.getSearchAttributesResponse( + grpcServiceStubs + .visibilityBlockingStub() + .getSearchAttributes( + com.uber.cadence.api.v1.GetSearchAttributesRequest.newBuilder().build())); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest completeRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + DomainNotActiveError, ClientVersionNotSupportedError, BaseError { + try { + grpcServiceStubs + .workerBlockingStub() + .respondQueryTaskCompleted( + RequestMapper.respondQueryTaskCompletedRequest(completeRequest)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ResetStickyTaskListResponse ResetStickyTaskList(ResetStickyTaskListRequest resetRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + DomainNotActiveError, ClientVersionNotSupportedError, + WorkflowExecutionAlreadyCompletedError, BaseError { + try { + return ResponseMapper.resetStickyTaskListResponse( + grpcServiceStubs + .workerBlockingStub() + .resetStickyTaskList(RequestMapper.resetStickyTaskListRequest(resetRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public QueryWorkflowResponse QueryWorkflow(QueryWorkflowRequest queryRequest) + throws BadRequestError, EntityNotExistsError, QueryFailedError, LimitExceededError, + ServiceBusyError, ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.queryWorkflowResponse( + grpcServiceStubs + .workflowBlockingStub() + .queryWorkflow(RequestMapper.queryWorkflowRequest(queryRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public DescribeWorkflowExecutionResponse DescribeWorkflowExecution( + DescribeWorkflowExecutionRequest describeRequest) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.describeWorkflowExecutionResponse( + grpcServiceStubs + .workflowBlockingStub() + .describeWorkflowExecution( + RequestMapper.describeWorkflowExecutionRequest(describeRequest))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public DescribeTaskListResponse DescribeTaskList(DescribeTaskListRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.describeTaskListResponse( + grpcServiceStubs + .workflowBlockingStub() + .describeTaskList(RequestMapper.describeTaskListRequest(request))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ClusterInfo GetClusterInfo() throws InternalServiceError, ServiceBusyError, BaseError { + try { + return ResponseMapper.clusterInfoResponse( + grpcServiceStubs + .workflowBlockingStub() + .getClusterInfo(com.uber.cadence.api.v1.GetClusterInfoRequest.getDefaultInstance())); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public GetTaskListsByDomainResponse GetTaskListsByDomain(GetTaskListsByDomainRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + ClientVersionNotSupportedError, BaseError { + try { + return ResponseMapper.getTaskListsByDomainResponse( + grpcServiceStubs + .workflowBlockingStub() + .getTaskListsByDomain(RequestMapper.getTaskListsByDomainRequest(request))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public ListTaskListPartitionsResponse ListTaskListPartitions( + ListTaskListPartitionsRequest request) + throws BadRequestError, EntityNotExistsError, LimitExceededError, ServiceBusyError, + BaseError { + try { + return ResponseMapper.listTaskListPartitionsResponse( + grpcServiceStubs + .workflowBlockingStub() + .listTaskListPartitions(RequestMapper.listTaskListPartitionsRequest(request))); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RefreshWorkflowTasks(RefreshWorkflowTasksRequest request) + throws BadRequestError, DomainNotActiveError, ServiceBusyError, EntityNotExistsError, + BaseError { + try { + grpcServiceStubs + .workflowBlockingStub() + .refreshWorkflowTasks(RequestMapper.refreshWorkflowTasksRequest(request)); + } catch (Exception e) { + throw toServiceClientException(e); + } + } + + @Override + public void RegisterDomain( + RegisterDomainRequest registerRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .domainFutureStub() + .registerDomain(RequestMapper.registerDomainRequest(registerRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void DescribeDomain( + DescribeDomainRequest describeRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .domainFutureStub() + .describeDomain(RequestMapper.describeDomainRequest(describeRequest)), + toFutureCallback(resultHandler, ResponseMapper::describeDomainResponse), + executor); + } + + @Override + public void ListDomains( + ListDomainsRequest listRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .domainFutureStub() + .listDomains(RequestMapper.listDomainsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::listDomainsResponse), + executor); + } + + @Override + public void UpdateDomain( + UpdateDomainRequest updateRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .domainFutureStub() + .updateDomain(RequestMapper.updateDomainRequest(updateRequest)), + toFutureCallback(resultHandler, ResponseMapper::updateDomainResponse), + executor); + } + + @Override + public void DeprecateDomain( + DeprecateDomainRequest deprecateRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .domainFutureStub() + .deprecateDomain(RequestMapper.deprecateDomainRequest(deprecateRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RestartWorkflowExecution( + RestartWorkflowExecutionRequest restartRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .restartWorkflowExecution( + RequestMapper.restartWorkflowExecutionRequest(restartRequest)), + toFutureCallback(resultHandler, ResponseMapper::restartWorkflowExecutionResponse), + executor); + } + + @Override + public void StartWorkflowExecution( + StartWorkflowExecutionRequest startRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .startWorkflowExecution(RequestMapper.startWorkflowExecutionRequest(startRequest)), + toFutureCallback(resultHandler, ResponseMapper::startWorkflowExecutionResponse), + executor); + } + + @Override + public void StartWorkflowExecutionAsync( + StartWorkflowExecutionAsyncRequest startRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .startWorkflowExecutionAsync( + RequestMapper.startWorkflowExecutionAsyncRequest(startRequest)), + toFutureCallback(resultHandler, ResponseMapper::startWorkflowExecutionAsyncResponse), + executor); + } + + @Override + public void GetWorkflowExecutionHistory( + GetWorkflowExecutionHistoryRequest getRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .getWorkflowExecutionHistory( + RequestMapper.getWorkflowExecutionHistoryRequest(getRequest)), + toFutureCallback(resultHandler, ResponseMapper::getWorkflowExecutionHistoryResponse), + executor); + } + + @Override + public void PollForDecisionTask( + PollForDecisionTaskRequest pollRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .pollForDecisionTask(RequestMapper.pollForDecisionTaskRequest(pollRequest)), + toFutureCallback(resultHandler, ResponseMapper::pollForDecisionTaskResponse), + executor); + } + + @Override + public void RespondDecisionTaskCompleted( + RespondDecisionTaskCompletedRequest completeRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondDecisionTaskCompleted( + RequestMapper.respondDecisionTaskCompletedRequest(completeRequest)), + toFutureCallback(resultHandler, ResponseMapper::respondDecisionTaskCompletedResponse), + executor); + } + + @Override + public void RespondDecisionTaskFailed( + RespondDecisionTaskFailedRequest failedRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondDecisionTaskFailed( + RequestMapper.respondDecisionTaskFailedRequest(failedRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void PollForActivityTask( + PollForActivityTaskRequest pollRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .pollForActivityTask(RequestMapper.pollForActivityTaskRequest(pollRequest)), + toFutureCallback(resultHandler, ResponseMapper::pollForActivityTaskResponse), + executor); + } + + @Override + public void RecordActivityTaskHeartbeat( + RecordActivityTaskHeartbeatRequest heartbeatRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .recordActivityTaskHeartbeat( + RequestMapper.recordActivityTaskHeartbeatRequest(heartbeatRequest)), + toFutureCallback(resultHandler, ResponseMapper::recordActivityTaskHeartbeatResponse), + executor); + } + + @Override + public void RecordActivityTaskHeartbeatByID( + RecordActivityTaskHeartbeatByIDRequest heartbeatRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .recordActivityTaskHeartbeatByID( + RequestMapper.recordActivityTaskHeartbeatByIDRequest(heartbeatRequest)), + toFutureCallback(resultHandler, ResponseMapper::recordActivityTaskHeartbeatResponse), + executor); + } + + @Override + public void RespondActivityTaskCompleted( + RespondActivityTaskCompletedRequest completeRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskCompleted( + RequestMapper.respondActivityTaskCompletedRequest(completeRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RespondActivityTaskCompletedByID( + RespondActivityTaskCompletedByIDRequest completeRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskCompletedByID( + RequestMapper.respondActivityTaskCompletedByIDRequest(completeRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RespondActivityTaskFailed( + RespondActivityTaskFailedRequest failRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskFailed(RequestMapper.respondActivityTaskFailedRequest(failRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RespondActivityTaskFailedByID( + RespondActivityTaskFailedByIDRequest failRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskFailedByID( + RequestMapper.respondActivityTaskFailedByIDRequest(failRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RespondActivityTaskCanceled( + RespondActivityTaskCanceledRequest canceledRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskCanceled( + RequestMapper.respondActivityTaskCanceledRequest(canceledRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RespondActivityTaskCanceledByID( + RespondActivityTaskCanceledByIDRequest canceledRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondActivityTaskCanceledByID( + RequestMapper.respondActivityTaskCanceledByIDRequest(canceledRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void RequestCancelWorkflowExecution( + RequestCancelWorkflowExecutionRequest cancelRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .requestCancelWorkflowExecution( + RequestMapper.requestCancelWorkflowExecutionRequest(cancelRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void SignalWorkflowExecution( + SignalWorkflowExecutionRequest signalRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .signalWorkflowExecution(RequestMapper.signalWorkflowExecutionRequest(signalRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void SignalWithStartWorkflowExecution( + SignalWithStartWorkflowExecutionRequest signalWithStartRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .signalWithStartWorkflowExecution( + RequestMapper.signalWithStartWorkflowExecutionRequest(signalWithStartRequest)), + toFutureCallback(resultHandler, ResponseMapper::signalWithStartWorkflowExecutionResponse), + executor); + } + + @Override + public void SignalWithStartWorkflowExecutionAsync( + SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .signalWithStartWorkflowExecutionAsync( + RequestMapper.signalWithStartWorkflowExecutionAsyncRequest(signalWithStartRequest)), + toFutureCallback( + resultHandler, ResponseMapper::signalWithStartWorkflowExecutionAsyncResponse), + executor); + } + + @Override + public void ResetWorkflowExecution( + ResetWorkflowExecutionRequest resetRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .resetWorkflowExecution(RequestMapper.resetWorkflowExecutionRequest(resetRequest)), + toFutureCallback(resultHandler, ResponseMapper::resetWorkflowExecutionResponse), + executor); + } + + @Override + public void TerminateWorkflowExecution( + TerminateWorkflowExecutionRequest terminateRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .terminateWorkflowExecution( + RequestMapper.terminateWorkflowExecutionRequest(terminateRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void ListOpenWorkflowExecutions( + ListOpenWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .listOpenWorkflowExecutions( + RequestMapper.listOpenWorkflowExecutionsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::listOpenWorkflowExecutionsResponse), + executor); + } + + @Override + public void ListClosedWorkflowExecutions( + ListClosedWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .listClosedWorkflowExecutions( + RequestMapper.listClosedWorkflowExecutionsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::listClosedWorkflowExecutionsResponse), + executor); + } + + @Override + public void ListWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .listWorkflowExecutions(RequestMapper.listWorkflowExecutionsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::listWorkflowExecutionsResponse), + executor); + } + + @Override + public void ListArchivedWorkflowExecutions( + ListArchivedWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .listArchivedWorkflowExecutions( + RequestMapper.listArchivedWorkflowExecutionsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::listArchivedWorkflowExecutionsResponse), + executor); + } + + @Override + public void ScanWorkflowExecutions( + ListWorkflowExecutionsRequest listRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .scanWorkflowExecutions(RequestMapper.scanWorkflowExecutionsRequest(listRequest)), + toFutureCallback(resultHandler, ResponseMapper::scanWorkflowExecutionsResponse), + executor); + } + + @Override + public void CountWorkflowExecutions( + CountWorkflowExecutionsRequest countRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .countWorkflowExecutions(RequestMapper.countWorkflowExecutionsRequest(countRequest)), + toFutureCallback(resultHandler, ResponseMapper::countWorkflowExecutionsResponse), + executor); + } + + @Override + public void GetSearchAttributes(AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .visibilityFutureStub() + .getSearchAttributes( + com.uber.cadence.api.v1.GetSearchAttributesRequest.getDefaultInstance()), + toFutureCallback(resultHandler, ResponseMapper::getSearchAttributesResponse), + executor); + } + + @Override + public void RespondQueryTaskCompleted( + RespondQueryTaskCompletedRequest completeRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .respondQueryTaskCompleted( + RequestMapper.respondQueryTaskCompletedRequest(completeRequest)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + @Override + public void ResetStickyTaskList( + ResetStickyTaskListRequest resetRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workerFutureStub() + .resetStickyTaskList(RequestMapper.resetStickyTaskListRequest(resetRequest)), + toFutureCallback(resultHandler, ResponseMapper::resetStickyTaskListResponse), + executor); + } + + @Override + public void QueryWorkflow( + QueryWorkflowRequest queryRequest, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .queryWorkflow(RequestMapper.queryWorkflowRequest(queryRequest)), + toFutureCallback(resultHandler, ResponseMapper::queryWorkflowResponse), + executor); + } + + @Override + public void DescribeWorkflowExecution( + DescribeWorkflowExecutionRequest describeRequest, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .describeWorkflowExecution( + RequestMapper.describeWorkflowExecutionRequest(describeRequest)), + toFutureCallback(resultHandler, ResponseMapper::describeWorkflowExecutionResponse), + executor); + } + + @Override + public void DescribeTaskList( + DescribeTaskListRequest request, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .describeTaskList(RequestMapper.describeTaskListRequest(request)), + toFutureCallback(resultHandler, ResponseMapper::describeTaskListResponse), + executor); + } + + @Override + public void GetClusterInfo(AsyncMethodCallback resultHandler) throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .getClusterInfo(com.uber.cadence.api.v1.GetClusterInfoRequest.getDefaultInstance()), + toFutureCallback(resultHandler, ResponseMapper::getClusterInfoResponse), + executor); + } + + @Override + public void GetTaskListsByDomain( + GetTaskListsByDomainRequest request, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .getTaskListsByDomain(RequestMapper.getTaskListsByDomainRequest(request)), + toFutureCallback(resultHandler, ResponseMapper::getTaskListsByDomainResponse), + executor); + } + + @Override + public void ListTaskListPartitions( + ListTaskListPartitionsRequest request, + AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .listTaskListPartitions(RequestMapper.listTaskListPartitionsRequest(request)), + toFutureCallback(resultHandler, ResponseMapper::listTaskListPartitionsResponse), + executor); + } + + @Override + public void RefreshWorkflowTasks( + RefreshWorkflowTasksRequest request, AsyncMethodCallback resultHandler) + throws BaseError { + Futures.addCallback( + grpcServiceStubs + .workflowFutureStub() + .refreshWorkflowTasks(RequestMapper.refreshWorkflowTasksRequest(request)), + toFutureCallback(resultHandler, r -> null), + executor); + } + + private BaseError toServiceClientException(Throwable t) { + if (t instanceof BaseError) { + return (BaseError) t; + } else if (t instanceof StatusRuntimeException) { + return ErrorMapper.Error((StatusRuntimeException) t); + } else { + return new BaseError(t); + } + } + + private FutureCallback toFutureCallback( + AsyncMethodCallback resultHandler, Function mapper) { + return new FutureCallback() { + @Override + public void onSuccess(R t) { + resultHandler.onComplete(mapper.apply(t)); + } + + @Override + public void onFailure(Throwable throwable) { + resultHandler.onError(toServiceClientException(throwable)); + } + }; + } +} diff --git a/src/test/java/com/uber/cadence/internal/compatibility/ClientObjects.java b/src/test/java/com/uber/cadence/internal/compatibility/ClientObjects.java new file mode 100644 index 000000000..babb93f5a --- /dev/null +++ b/src/test/java/com/uber/cadence/internal/compatibility/ClientObjects.java @@ -0,0 +1,1181 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.uber.cadence.entities.*; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; +import java.util.stream.Collectors; + +public class ClientObjects { + + public static final WorkflowType WORKFLOW_TYPE = new WorkflowType().setName("workflowType"); + public static final ActivityType ACTIVITY_TYPE = new ActivityType().setName("activityName"); + public static final TaskList TASK_LIST = + new TaskList().setName("taskList").setKind(TaskListKind.NORMAL); + public static final TaskListMetadata TASK_LIST_METADATA = + new TaskListMetadata().setMaxTasksPerSecond(10); + public static final RetryPolicy RETRY_POLICY = + new RetryPolicy() + .setInitialIntervalInSeconds(11) + .setBackoffCoefficient(0.5) + .setMaximumIntervalInSeconds(12) + .setMaximumAttempts(13) + .setNonRetriableErrorReasons(ImmutableList.of("error")) + .setExpirationIntervalInSeconds(14); + public static final String WORKFLOW_ID = "workflowId"; + public static final String RUN_ID = "runId"; + public static final WorkflowExecution WORKFLOW_EXECUTION = + new WorkflowExecution().setWorkflowId(WORKFLOW_ID).setRunId(RUN_ID); + public static final String PARENT_WORkFLOW_ID = "parentWorkflowId"; + public static final String PARENT_RUN_ID = "parentRunId"; + public static final WorkflowExecution PARENT_WORKFLOW_EXECUTION = + new WorkflowExecution().setWorkflowId(PARENT_WORkFLOW_ID).setRunId(PARENT_RUN_ID); + public static final String EXTERNAL_WORKFLOW_ID = "externalWorkflowId"; + public static final String EXTERNAL_RUN_ID = "externalRunId"; + public static final WorkflowExecution EXTERNAL_WORKFLOW_EXECUTION = + new WorkflowExecution().setWorkflowId(EXTERNAL_WORKFLOW_ID).setRunId(EXTERNAL_RUN_ID); + public static final StickyExecutionAttributes STICKY_EXECUTION_ATTRIBUTES = + new StickyExecutionAttributes() + .setWorkerTaskList(TASK_LIST) + .setScheduleToStartTimeoutSeconds(1); + public static final WorkflowQuery WORKFLOW_QUERY = + new WorkflowQuery() + .setQueryType("queryType") + .setQueryArgs("queryArgs".getBytes(StandardCharsets.UTF_8)); + public static final WorkflowQueryResult WORKFLOW_QUERY_RESULT = + new WorkflowQueryResult() + .setResultType(QueryResultType.ANSWERED) + .setAnswer("answer".getBytes(StandardCharsets.UTF_8)) + .setErrorMessage("error"); + public static final Header HEADER = new Header().setFields(ImmutableMap.of("key", utf8("value"))); + public static final Memo MEMO = new Memo().setFields(ImmutableMap.of("memo", utf8("memoValue"))); + public static final SearchAttributes SEARCH_ATTRIBUTES = + new SearchAttributes().setIndexedFields(ImmutableMap.of("search", utf8("attributes"))); + public static final Map DATA = ImmutableMap.of("dataKey", "dataValue"); + public static final ResetPointInfo RESET_POINT_INFO = + new ResetPointInfo() + .setBinaryChecksum("binaryChecksum") + .setRunId("runId") + .setCreatedTimeNano(1) + .setResettable(true) + .setExpiringTimeNano(2) + .setFirstDecisionCompletedId(3); + public static final ResetPoints RESET_POINTS = + new ResetPoints().setPoints(Collections.singletonList(RESET_POINT_INFO)); + public static final ClusterReplicationConfiguration CLUSTER_REPLICATION_CONFIGURATION = + new ClusterReplicationConfiguration().setClusterName("cluster"); + public static final PollerInfo POLLER_INFO = + new PollerInfo().setIdentity("identity").setLastAccessTime(1).setRatePerSecond(2.0); + public static final TaskIDBlock TASK_ID_BLOCK = new TaskIDBlock().setStartID(1).setEndID(2); + public static final TaskListStatus TASK_LIST_STATUS = + new TaskListStatus() + .setTaskIDBlock(TASK_ID_BLOCK) + .setAckLevel(1) + .setBacklogCountHint(2) + .setReadLevel(3) + .setRatePerSecond(4.0); + public static final WorkflowExecutionConfiguration WORKFLOW_EXECUTION_CONFIGURATION = + new WorkflowExecutionConfiguration() + .setTaskList(TASK_LIST) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2); + public static final WorkflowExecutionInfo WORKFLOW_EXECUTION_INFO = + new WorkflowExecutionInfo() + .setExecution(WORKFLOW_EXECUTION) + .setType(WORKFLOW_TYPE) + .setStartTime(1) + .setCloseTime(2) + .setCloseStatus(WorkflowExecutionCloseStatus.FAILED) + .setHistoryLength(3) + .setParentDomainName("parentDomainName") + .setParentDomainId("parentDomainId") + .setParentExecution(PARENT_WORKFLOW_EXECUTION) + .setExecutionTime(4) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setAutoResetPoints(RESET_POINTS) + .setTaskList(TASK_LIST.getName()) + .setCron(true); + public static final PendingActivityInfo PENDING_ACTIVITY_INFO = + new PendingActivityInfo() + .setActivityID("activityId") + .setActivityType(ACTIVITY_TYPE) + .setState(PendingActivityState.STARTED) + .setHeartbeatDetails(utf8("heartbeatDetails")) + .setLastHeartbeatTimestamp(1) + .setLastStartedTimestamp(2) + .setAttempt(3) + .setMaximumAttempts(4) + .setScheduledTimestamp(5) + .setExpirationTimestamp(6) + .setLastWorkerIdentity("lastWorkerIdentity") + .setLastFailureReason("lastFailureReason") + .setLastFailureDetails(utf8("lastFailureDetails")); + public static final PendingChildExecutionInfo PENDING_CHILD_EXECUTION_INFO = + new PendingChildExecutionInfo() + .setWorkflowID(WORKFLOW_ID) + .setRunID(RUN_ID) + .setWorkflowTypName(WORKFLOW_TYPE.getName()) + .setInitiatedID(1) + .setParentClosePolicy(ParentClosePolicy.REQUEST_CANCEL); + public static final PendingDecisionInfo PENDING_DECISION_INFO = + new PendingDecisionInfo() + .setState(PendingDecisionState.STARTED) + .setScheduledTimestamp(1) + .setStartedTimestamp(2) + .setAttempt(3) + .setOriginalScheduledTimestamp(4); + public static final WorkerVersionInfo WORKER_VERSION_INFO = + new WorkerVersionInfo().setFeatureVersion("featureVersion").setImpl("impl"); + public static final SupportedClientVersions SUPPORTED_CLIENT_VERSIONS = + new SupportedClientVersions().setGoSdk("goSdk").setJavaSdk("javaSdk"); + public static final Map INDEXED_VALUES = + Arrays.stream(IndexedValueType.values()).collect(Collectors.toMap(Enum::name, v -> v)); + public static final DataBlob DATA_BLOB = + new DataBlob().setData(utf8Bytes("data")).setEncodingType(EncodingType.JSON); + public static final TaskListPartitionMetadata TASK_LIST_PARTITION_METADATA = + new TaskListPartitionMetadata().setKey("key").setOwnerHostName("ownerHostName"); + public static final ActivityLocalDispatchInfo ACTIVITY_LOCAL_DISPATCH_INFO = + new ActivityLocalDispatchInfo() + .setActivityId("activityId") + .setScheduledTimestamp(1) + .setStartedTimestamp(2) + .setScheduledTimestampOfThisAttempt(3) + .setTaskToken(utf8("taskToken")); + public static final DomainInfo DOMAIN_INFO = + new DomainInfo() + .setName("domain") + .setStatus(DomainStatus.DEPRECATED) + .setDescription("description") + .setOwnerEmail("email") + .setData(DATA) + .setUuid("uuid"); + public static final BadBinaryInfo BAD_BINARY_INFO = + new BadBinaryInfo().setReason("reason").setOperator("operator").setCreatedTimeNano(3); + public static final BadBinaries BAD_BINARIES = + new BadBinaries().setBinaries(ImmutableMap.of("badBinaryKey", BAD_BINARY_INFO)); + public static final DomainConfiguration DOMAIN_CONFIGURATION = + new DomainConfiguration() + .setWorkflowExecutionRetentionPeriodInDays(2) + .setBadBinaries(BAD_BINARIES) + .setHistoryArchivalStatus(ArchivalStatus.ENABLED) + .setHistoryArchivalURI("historyArchivalUri") + .setVisibilityArchivalStatus(ArchivalStatus.DISABLED) + .setVisibilityArchivalURI("visibilityArchivalUri") + .setEmitMetric(true) + .setAsyncWorkflowConfiguration(new AsyncWorkflowConfiguration().setEnabled(true)) + .setIsolationgroups( + new IsolationGroupConfiguration() + .setIsolationGroups( + ImmutableList.of( + new IsolationGroupPartition() + .setName("partitionName") + .setState(IsolationGroupState.HEALTHY)))); + + public static final StartTimeFilter START_TIME_FILTER = + new StartTimeFilter().setEarliestTime(2).setLatestTime(3); + public static final WorkflowExecutionFilter WORKFLOW_EXECUTION_FILTER = + new WorkflowExecutionFilter().setWorkflowId(WORKFLOW_ID).setRunId(RUN_ID); + public static final WorkflowTypeFilter WORKFLOW_TYPE_FILTER = + new WorkflowTypeFilter().setName(WORKFLOW_TYPE.getName()); + + public static final DomainReplicationConfiguration DOMAIN_REPLICATION_CONFIGURATION = + new DomainReplicationConfiguration() + .setActiveClusterName("activeCluster") + .setClusters(ImmutableList.of(CLUSTER_REPLICATION_CONFIGURATION)); + + public static Decision DECISION_SCHEDULE_ACTIVITY_TASK = + new Decision() + .setDecisionType(DecisionType.ScheduleActivityTask) + .setScheduleActivityTaskDecisionAttributes( + new ScheduleActivityTaskDecisionAttributes() + .setActivityId("activityId") + .setActivityType(ACTIVITY_TYPE) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setScheduleToCloseTimeoutSeconds(1) + .setScheduleToStartTimeoutSeconds(2) + .setStartToCloseTimeoutSeconds(3) + .setHeartbeatTimeoutSeconds(4) + .setHeader(HEADER) + .setRequestLocalDispatch(true) + .setRetryPolicy(RETRY_POLICY) + .setDomain("domain")); + public static Decision DECISION_REQUEST_CANCEL_ACTIVITY_TASK = + new Decision() + .setDecisionType(DecisionType.RequestCancelActivityTask) + .setRequestCancelActivityTaskDecisionAttributes( + new RequestCancelActivityTaskDecisionAttributes().setActivityId("activityId")); + public static Decision DECISION_START_TIMER = + new Decision() + .setDecisionType(DecisionType.StartTimer) + .setStartTimerDecisionAttributes( + new StartTimerDecisionAttributes() + .setTimerId("timerId") + .setStartToFireTimeoutSeconds(2)); + public static Decision DECISION_COMPLETE_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.CompleteWorkflowExecution) + .setCompleteWorkflowExecutionDecisionAttributes( + new CompleteWorkflowExecutionDecisionAttributes().setResult(utf8("result"))); + public static Decision DECISION_FAIL_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.FailWorkflowExecution) + .setFailWorkflowExecutionDecisionAttributes( + new FailWorkflowExecutionDecisionAttributes() + .setReason("reason") + .setDetails(utf8("details"))); + public static Decision DECISION_CANCEL_TIMER = + new Decision() + .setDecisionType(DecisionType.CancelTimer) + .setCancelTimerDecisionAttributes( + new CancelTimerDecisionAttributes().setTimerId("timerId")); + public static Decision DECISION_CANCEL_WORKFLOW = + new Decision() + .setDecisionType(DecisionType.CancelWorkflowExecution) + .setCancelWorkflowExecutionDecisionAttributes( + new CancelWorkflowExecutionDecisionAttributes().setDetails(utf8("details"))); + public static Decision DECISION_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.RequestCancelExternalWorkflowExecution) + .setRequestCancelExternalWorkflowExecutionDecisionAttributes( + new RequestCancelExternalWorkflowExecutionDecisionAttributes() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setRunId(RUN_ID) + .setChildWorkflowOnly(true) + .setControl(utf8("control"))); + public static Decision DECISION_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.ContinueAsNewWorkflowExecution) + .setContinueAsNewWorkflowExecutionDecisionAttributes( + new ContinueAsNewWorkflowExecutionDecisionAttributes() + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setBackoffStartIntervalInSeconds(3) + .setInitiator(ContinueAsNewInitiator.Decider) + .setFailureDetails(utf8("details")) + .setFailureReason("reason") + .setLastCompletionResult(utf8("lastCompletionResult")) + .setHeader(HEADER) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setRetryPolicy(RETRY_POLICY) + .setCronSchedule("cron")); + public static Decision DECISION_START_CHILD_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.StartChildWorkflowExecution) + .setStartChildWorkflowExecutionDecisionAttributes( + new StartChildWorkflowExecutionDecisionAttributes() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setHeader(HEADER) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setRetryPolicy(RETRY_POLICY) + .setCronSchedule("cron") + .setControl(utf8("control")) + .setParentClosePolicy(ParentClosePolicy.ABANDON) + .setWorkflowIdReusePolicy(WorkflowIdReusePolicy.AllowDuplicate)); + public static Decision DECISION_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = + new Decision() + .setDecisionType(DecisionType.SignalExternalWorkflowExecution) + .setSignalExternalWorkflowExecutionDecisionAttributes( + new SignalExternalWorkflowExecutionDecisionAttributes() + .setDomain("domain") + .setExecution(WORKFLOW_EXECUTION) + .setSignalName("signalName") + .setInput(utf8("input")) + .setChildWorkflowOnly(true) + .setControl(utf8("control"))); + public static Decision DECISION_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = + new Decision() + .setDecisionType(DecisionType.UpsertWorkflowSearchAttributes) + .setUpsertWorkflowSearchAttributesDecisionAttributes( + new UpsertWorkflowSearchAttributesDecisionAttributes() + .setSearchAttributes(SEARCH_ATTRIBUTES)); + public static Decision DECISION_RECORD_MARKER = + new Decision() + .setDecisionType(DecisionType.RecordMarker) + .setRecordMarkerDecisionAttributes( + new RecordMarkerDecisionAttributes() + .setMarkerName("markerName") + .setDetails(utf8("details")) + .setHeader(HEADER)); + + public static final WorkflowExecutionStartedEventAttributes + WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES = + new WorkflowExecutionStartedEventAttributes() + .setWorkflowType(WORKFLOW_TYPE) + .setParentWorkflowDomain("parentDomainName") + .setParentWorkflowExecution(PARENT_WORKFLOW_EXECUTION) + .setParentInitiatedEventId(1) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setExecutionStartToCloseTimeoutSeconds(2) + .setTaskStartToCloseTimeoutSeconds(3) + .setContinuedExecutionRunId("continuedExecutionRunId") + .setInitiator(ContinueAsNewInitiator.RetryPolicy) + .setContinuedFailureReason("continuedFailureReason") + .setContinuedFailureDetails(utf8("continuedFailureDetails")) + .setLastCompletionResult(utf8("lastCompletionResult")) + .setOriginalExecutionRunId("originalExecutionRunId") + .setIdentity("identity") + .setFirstExecutionRunId("firstExecutionRunId") + .setRetryPolicy(RETRY_POLICY) + .setAttempt(4) + .setExpirationTimestamp(5) + .setCronSchedule("cronSchedule") + .setFirstDecisionTaskBackoffSeconds(6) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setPrevAutoResetPoints(RESET_POINTS) + .setHeader(HEADER); + + public static final WorkflowExecutionCompletedEventAttributes + WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES = + new WorkflowExecutionCompletedEventAttributes() + .setResult(utf8("result")) + .setDecisionTaskCompletedEventId(1); + + public static final WorkflowExecutionFailedEventAttributes + WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES = + new WorkflowExecutionFailedEventAttributes() + .setReason("reason") + .setDetails(utf8("details")) + .setDecisionTaskCompletedEventId(1); + + public static final WorkflowExecutionTimedOutEventAttributes + WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES = + new WorkflowExecutionTimedOutEventAttributes() + .setTimeoutType(TimeoutType.SCHEDULE_TO_CLOSE); + + public static final DecisionTaskScheduledEventAttributes + DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES = + new DecisionTaskScheduledEventAttributes() + .setTaskList(TASK_LIST) + .setStartToCloseTimeoutSeconds(1) + .setAttempt(2); + + public static final DecisionTaskStartedEventAttributes DECISION_TASK_STARTED_EVENT_ATTRIBUTES = + new DecisionTaskStartedEventAttributes() + .setScheduledEventId(1) + .setIdentity("identity") + .setRequestId("requestId"); + + public static final DecisionTaskCompletedEventAttributes + DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES = + new DecisionTaskCompletedEventAttributes() + .setScheduledEventId(1) + .setStartedEventId(2) + .setIdentity("identity") + .setBinaryChecksum("binaryChecksum") + .setExecutionContext(utf8("executionContext")); + + public static final DecisionTaskTimedOutEventAttributes DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES = + new DecisionTaskTimedOutEventAttributes() + .setScheduledEventId(1) + .setStartedEventId(2) + .setTimeoutType(TimeoutType.SCHEDULE_TO_CLOSE) + .setBaseRunId("baseRunId") + .setNewRunId("newRunId") + .setForkEventVersion(3) + .setReason("reason") + .setCause(DecisionTaskTimedOutCause.RESET); + + public static final DecisionTaskFailedEventAttributes DECISION_TASK_FAILED_EVENT_ATTRIBUTES = + new DecisionTaskFailedEventAttributes() + .setScheduledEventId(1) + .setStartedEventId(2) + .setCause(DecisionTaskFailedCause.BAD_BINARY) + .setReason("reason") + .setDetails(utf8("details")) + .setIdentity("identity") + .setBaseRunId("baseRun") + .setNewRunId("newRun") + .setForkEventVersion(3) + .setBinaryChecksum("binaryChecksum"); + + public static final ActivityTaskScheduledEventAttributes + ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES = + new ActivityTaskScheduledEventAttributes() + .setActivityId("activityId") + .setActivityType(ACTIVITY_TYPE) + .setDomain("domain") + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setScheduleToCloseTimeoutSeconds(1) + .setScheduleToStartTimeoutSeconds(2) + .setStartToCloseTimeoutSeconds(3) + .setHeartbeatTimeoutSeconds(4) + .setDecisionTaskCompletedEventId((5)) + .setRetryPolicy(RETRY_POLICY) + .setHeader(HEADER); + + public static final ActivityTaskStartedEventAttributes ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES = + new ActivityTaskStartedEventAttributes() + .setScheduledEventId(1) + .setIdentity("identity") + .setRequestId("requestId") + .setAttempt(2) + .setLastFailureReason("failureReason") + .setLastFailureDetails(utf8("failureDetails")); + + public static final ActivityTaskCompletedEventAttributes + ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES = + new ActivityTaskCompletedEventAttributes() + .setResult(utf8("result")) + .setScheduledEventId(1) + .setStartedEventId(2) + .setIdentity("identity"); + + public static final ActivityTaskFailedEventAttributes ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES = + new ActivityTaskFailedEventAttributes() + .setReason("reason") + .setDetails(utf8("details")) + .setScheduledEventId(1) + .setStartedEventId(2) + .setIdentity("identity"); + + public static final ActivityTaskTimedOutEventAttributes ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES = + new ActivityTaskTimedOutEventAttributes() + .setDetails(utf8("details")) + .setScheduledEventId(1) + .setStartedEventId(2) + .setTimeoutType(TimeoutType.SCHEDULE_TO_CLOSE) + .setLastFailureReason("failureReason") + .setLastFailureDetails(utf8("failureDetails")); + + public static final ActivityTaskCancelRequestedEventAttributes + ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES = + new ActivityTaskCancelRequestedEventAttributes() + .setActivityId("activityId") + .setDecisionTaskCompletedEventId(1); + + public static final ActivityTaskCanceledEventAttributes ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES = + new ActivityTaskCanceledEventAttributes() + .setDetails(utf8("details")) + .setLatestCancelRequestedEventId(1) + .setScheduledEventId(2) + .setStartedEventId(3) + .setIdentity("identity"); + + public static final RequestCancelActivityTaskFailedEventAttributes + REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES = + new RequestCancelActivityTaskFailedEventAttributes() + .setActivityId("activityId") + .setCause("cause") + .setDecisionTaskCompletedEventId(1); + + public static final MarkerRecordedEventAttributes MARKER_RECORDED_EVENT_ATTRIBUTES = + new MarkerRecordedEventAttributes() + .setMarkerName("markerName") + .setDetails(utf8("details")) + .setDecisionTaskCompletedEventId(1) + .setHeader(HEADER); + + public static final TimerCanceledEventAttributes TIMER_CANCELED_EVENT_ATTRIBUTES = + new TimerCanceledEventAttributes() + .setTimerId("timerId") + .setStartedEventId(1) + .setDecisionTaskCompletedEventId(2) + .setIdentity("identity"); + + public static final CancelTimerFailedEventAttributes CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES = + new CancelTimerFailedEventAttributes() + .setTimerId("timerId") + .setCause("cause") + .setDecisionTaskCompletedEventId(1) + .setIdentity("identity"); + + public static final TimerFiredEventAttributes TIMER_FIRED_EVENT_ATTRIBUTES = + new TimerFiredEventAttributes().setTimerId("timerId").setStartedEventId(1); + + public static final TimerStartedEventAttributes TIMER_STARTED_EVENT_ATTRIBUTES = + new TimerStartedEventAttributes() + .setTimerId("timerId") + .setStartToFireTimeoutSeconds(1) + .setDecisionTaskCompletedEventId(2); + + public static final UpsertWorkflowSearchAttributesEventAttributes + UPSERT_WORKFLOW_SEARCH_ATTRIBUTES_EVENT_ATTRIBUTES = + new UpsertWorkflowSearchAttributesEventAttributes() + .setDecisionTaskCompletedEventId(1) + .setSearchAttributes(SEARCH_ATTRIBUTES); + + public static final StartChildWorkflowExecutionInitiatedEventAttributes + START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES = + new StartChildWorkflowExecutionInitiatedEventAttributes() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setParentClosePolicy(ParentClosePolicy.REQUEST_CANCEL) + .setControl(utf8("control")) + .setDecisionTaskCompletedEventId(3) + .setWorkflowIdReusePolicy(WorkflowIdReusePolicy.AllowDuplicate) + .setRetryPolicy(RETRY_POLICY) + .setCronSchedule("cron") + .setHeader(HEADER) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setDelayStartSeconds(4); + + public static final StartChildWorkflowExecutionFailedEventAttributes + START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES = + new StartChildWorkflowExecutionFailedEventAttributes() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setWorkflowType(WORKFLOW_TYPE) + .setCause(ChildWorkflowExecutionFailedCause.WORKFLOW_ALREADY_RUNNING) + .setControl(utf8("control")) + .setInitiatedEventId(1) + .setDecisionTaskCompletedEventId(2); + + public static final ChildWorkflowExecutionCanceledEventAttributes + CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionCanceledEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setStartedEventId(2) + .setDetails(utf8("details")); + + public static final ChildWorkflowExecutionCompletedEventAttributes + CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionCompletedEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setStartedEventId(2) + .setResult(utf8("result")); + + public static final ChildWorkflowExecutionFailedEventAttributes + CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionFailedEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setStartedEventId(2) + .setReason("reason") + .setDetails(utf8("details")); + + public static final ChildWorkflowExecutionStartedEventAttributes + CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionStartedEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setHeader(HEADER); + + public static final ChildWorkflowExecutionTerminatedEventAttributes + CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionTerminatedEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setStartedEventId(2); + + public static final ChildWorkflowExecutionTimedOutEventAttributes + CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES = + new ChildWorkflowExecutionTimedOutEventAttributes() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setInitiatedEventId(1) + .setStartedEventId(2) + .setTimeoutType(TimeoutType.SCHEDULE_TO_CLOSE); + + public static final WorkflowExecutionTerminatedEventAttributes + WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES = + new WorkflowExecutionTerminatedEventAttributes() + .setReason("reason") + .setDetails(utf8("details")) + .setIdentity("identity"); + + public static final WorkflowExecutionCancelRequestedEventAttributes + WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES = + new WorkflowExecutionCancelRequestedEventAttributes() + .setCause("cause") + .setExternalInitiatedEventId(1) + .setExternalWorkflowExecution(WORKFLOW_EXECUTION) + .setIdentity("identity"); + + public static final WorkflowExecutionCanceledEventAttributes + WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES = + new WorkflowExecutionCanceledEventAttributes() + .setDecisionTaskCompletedEventId(1) + .setDetails(utf8("details")); + + public static final RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES = + new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes() + .setDecisionTaskCompletedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setControl(utf8("control")) + .setChildWorkflowOnly(true); + + public static final RequestCancelExternalWorkflowExecutionFailedEventAttributes + REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES = + new RequestCancelExternalWorkflowExecutionFailedEventAttributes() + .setCause(CancelExternalWorkflowExecutionFailedCause.WORKFLOW_ALREADY_COMPLETED) + .setDecisionTaskCompletedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setInitiatedEventId(2) + .setControl(utf8("control")); + + public static final ExternalWorkflowExecutionCancelRequestedEventAttributes + EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES = + new ExternalWorkflowExecutionCancelRequestedEventAttributes() + .setInitiatedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION); + + public static final WorkflowExecutionContinuedAsNewEventAttributes + WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES = + new WorkflowExecutionContinuedAsNewEventAttributes() + .setNewExecutionRunId("newRunId") + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput(utf8("input")) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setDecisionTaskCompletedEventId(3) + .setBackoffStartIntervalInSeconds(4) + .setInitiator(ContinueAsNewInitiator.RetryPolicy) + .setFailureReason("failureReason") + .setFailureDetails(utf8("failureDetails")) + .setLastCompletionResult(utf8("lastCompletionResult")) + .setHeader(HEADER) + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES); + + public static final SignalExternalWorkflowExecutionInitiatedEventAttributes + SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES = + new SignalExternalWorkflowExecutionInitiatedEventAttributes() + .setDecisionTaskCompletedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setSignalName("signalName") + .setInput(utf8("input")) + .setControl(utf8("control")) + .setChildWorkflowOnly(true); + + public static final SignalExternalWorkflowExecutionFailedEventAttributes + SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES = + new SignalExternalWorkflowExecutionFailedEventAttributes() + .setCause(SignalExternalWorkflowExecutionFailedCause.WORKFLOW_ALREADY_COMPLETED) + .setDecisionTaskCompletedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setInitiatedEventId(2) + .setControl(utf8("control")); + + public static final WorkflowExecutionSignaledEventAttributes + WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES = + new WorkflowExecutionSignaledEventAttributes() + .setSignalName("signalName") + .setInput(utf8("input")) + .setIdentity("identity"); + + public static final ExternalWorkflowExecutionSignaledEventAttributes + EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES = + new ExternalWorkflowExecutionSignaledEventAttributes() + .setInitiatedEventId(1) + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setControl(utf8("control")); + + public static final HistoryEvent HISTORY_EVENT = + new HistoryEvent() + .setEventId(1) + .setTimestamp(2) + .setVersion(3) + .setTaskId(4) + .setEventType(EventType.WorkflowExecutionStarted) + .setWorkflowExecutionStartedEventAttributes(WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES); + + public static final History HISTORY = new History().setEvents(ImmutableList.of(HISTORY_EVENT)); + + public static final CountWorkflowExecutionsRequest COUNT_WORKFLOW_EXECUTIONS_REQUEST = + new CountWorkflowExecutionsRequest().setDomain("domain").setQuery("query"); + public static final DescribeTaskListRequest DESCRIBE_TASK_LIST_REQUEST = + new DescribeTaskListRequest() + .setDomain("domain") + .setTaskList(TASK_LIST) + .setTaskListType(TaskListType.Activity) + .setIncludeTaskListStatus(true); + public static final ListArchivedWorkflowExecutionsRequest + LIST_ARCHIVED_WORKFLOW_EXECUTIONS_REQUEST = + new ListArchivedWorkflowExecutionsRequest() + .setDomain("domain") + .setPageSize(1) + .setNextPageToken(utf8Bytes("pageToken")) + .setQuery("query"); + public static final RequestCancelWorkflowExecutionRequest + REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST = + new RequestCancelWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setRequestId("requestId") + .setIdentity("identity"); + public static final RequestCancelWorkflowExecutionRequest + REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST_FULL = + new RequestCancelWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setRequestId("requestId") + .setIdentity("identity") + .setFirstExecutionRunID("firstExecutionRunID") + .setCause("cancel cause"); + public static final ResetStickyTaskListRequest RESET_STICKY_TASK_LIST_REQUEST = + new ResetStickyTaskListRequest().setDomain("domain").setExecution(WORKFLOW_EXECUTION); + public static final ResetWorkflowExecutionRequest RESET_WORKFLOW_EXECUTION_REQUEST = + new ResetWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setReason("reason") + .setDecisionFinishEventId(1) + .setRequestId("requestId") + .setSkipSignalReapply(true); + public static final RespondActivityTaskCanceledByIDRequest + RESPOND_ACTIVITY_TASK_CANCELED_BY_ID_REQUEST = + new RespondActivityTaskCanceledByIDRequest() + .setDomain("domain") + .setWorkflowID(WORKFLOW_ID) + .setRunID(RUN_ID) + .setActivityID("activityId") + .setDetails(utf8("details")) + .setIdentity("identity"); + public static final RespondActivityTaskCanceledRequest RESPOND_ACTIVITY_TASK_CANCELED_REQUEST = + new RespondActivityTaskCanceledRequest() + .setTaskToken(utf8("taskToken")) + .setDetails(utf8("details")) + .setIdentity("identity"); + public static final RespondActivityTaskCompletedByIDRequest + RESPOND_ACTIVITY_TASK_COMPLETED_BY_ID_REQUEST = + new RespondActivityTaskCompletedByIDRequest() + .setDomain("domain") + .setWorkflowID(WORKFLOW_ID) + .setRunID(RUN_ID) + .setActivityID("activityId") + .setResult(utf8("result")) + .setIdentity("identity"); + public static final RespondActivityTaskCompletedRequest RESPOND_ACTIVITY_TASK_COMPLETED_REQUEST = + new RespondActivityTaskCompletedRequest() + .setTaskToken(utf8("taskToken")) + .setIdentity("identity") + .setResult(utf8("result")); + public static final RespondActivityTaskFailedByIDRequest + RESPOND_ACTIVITY_TASK_FAILED_BY_ID_REQUEST = + new RespondActivityTaskFailedByIDRequest() + .setDomain("domain") + .setWorkflowID(WORKFLOW_ID) + .setRunID(RUN_ID) + .setActivityID("activityId") + .setReason("reason") + .setDetails(utf8("details")) + .setIdentity("identity"); + public static final RespondActivityTaskFailedRequest RESPOND_ACTIVITY_TASK_FAILED_REQUEST = + new RespondActivityTaskFailedRequest() + .setTaskToken(utf8("taskToken")) + .setDetails(utf8("details")) + .setReason("reason") + .setIdentity("identity"); + public static final RespondDecisionTaskCompletedRequest RESPOND_DECISION_TASK_COMPLETED_REQUEST = + new RespondDecisionTaskCompletedRequest() + .setDecisions(ImmutableList.of(DECISION_COMPLETE_WORKFLOW_EXECUTION)) + .setStickyAttributes(STICKY_EXECUTION_ATTRIBUTES) + .setReturnNewDecisionTask(true) + .setForceCreateNewDecisionTask(false) + .setQueryResults(ImmutableMap.of("query", WORKFLOW_QUERY_RESULT)) + .setExecutionContext(utf8("executionContext")) + .setBinaryChecksum("binaryChecksum") + .setTaskToken(utf8("taskToken")) + .setIdentity("identity"); + public static final RespondDecisionTaskFailedRequest RESPOND_DECISION_TASK_FAILED_REQUEST = + new RespondDecisionTaskFailedRequest() + .setCause(DecisionTaskFailedCause.BAD_BINARY) + .setDetails(utf8("details")) + .setBinaryChecksum("binaryChecksum") + .setTaskToken(utf8("taskToken")) + .setIdentity("identity"); + public static final RespondQueryTaskCompletedRequest RESPOND_QUERY_TASK_COMPLETED_REQUEST = + new RespondQueryTaskCompletedRequest() + .setCompletedType(QueryTaskCompletedType.COMPLETED) + .setQueryResult(utf8("queryResult")) + .setErrorMessage("errorMessage") + .setWorkerVersionInfo(WORKER_VERSION_INFO) + .setTaskToken(utf8("taskToken")); + + public static final ListWorkflowExecutionsRequest LIST_WORKFLOW_EXECUTIONS_REQUEST = + new ListWorkflowExecutionsRequest() + .setDomain("domain") + .setPageSize(1) + .setNextPageToken(utf8("nextPageToken")) + .setQuery("query"); + + public static final DescribeWorkflowExecutionRequest DESCRIBE_WORKFLOW_EXECUTION_REQUEST = + new DescribeWorkflowExecutionRequest().setDomain("domain").setExecution(WORKFLOW_EXECUTION); + + public static final GetWorkflowExecutionHistoryRequest GET_WORKFLOW_EXECUTION_HISTORY_REQUEST = + new GetWorkflowExecutionHistoryRequest() + .setDomain("domain") + .setExecution(WORKFLOW_EXECUTION) + .setMaximumPageSize(1) + .setWaitForNewEvent(true) + .setHistoryEventFilterType(HistoryEventFilterType.CLOSE_EVENT) + .setSkipArchival(true) + .setNextPageToken(utf8("nextPageToken")); + + public static final StartWorkflowExecutionRequest START_WORKFLOW_EXECUTION = + new StartWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput("input".getBytes(StandardCharsets.UTF_8)) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setIdentity("identity") + .setRequestId("requestId") + .setWorkflowIdReusePolicy(WorkflowIdReusePolicy.AllowDuplicate) + .setRetryPolicy(RETRY_POLICY) + .setCronSchedule("cronSchedule") + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setHeader(HEADER) + .setJitterStartSeconds(0) + .setDelayStartSeconds(3); + public static final SignalWithStartWorkflowExecutionRequest SIGNAL_WITH_START_WORKFLOW_EXECUTION = + new SignalWithStartWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowId(WORKFLOW_ID) + .setWorkflowType(WORKFLOW_TYPE) + .setTaskList(TASK_LIST) + .setInput("input".getBytes(StandardCharsets.UTF_8)) + .setExecutionStartToCloseTimeoutSeconds(1) + .setTaskStartToCloseTimeoutSeconds(2) + .setIdentity("identity") + .setRequestId("requestId") + .setWorkflowIdReusePolicy(WorkflowIdReusePolicy.AllowDuplicate) + .setSignalName("signalName") + .setSignalInput("signalInput".getBytes(StandardCharsets.UTF_8)) + .setControl("control".getBytes(StandardCharsets.UTF_8)) + .setRetryPolicy(RETRY_POLICY) + .setCronSchedule("cronSchedule") + .setMemo(MEMO) + .setSearchAttributes(SEARCH_ATTRIBUTES) + .setHeader(HEADER) + .setDelayStartSeconds(3) + .setJitterStartSeconds(0); + + public static final StartWorkflowExecutionAsyncRequest START_WORKFLOW_EXECUTION_ASYNC_REQUEST = + new StartWorkflowExecutionAsyncRequest().setRequest(START_WORKFLOW_EXECUTION); + + public static final SignalWithStartWorkflowExecutionAsyncRequest + SIGNAL_WITH_START_WORKFLOW_EXECUTION_ASYNC_REQUEST = + new SignalWithStartWorkflowExecutionAsyncRequest() + .setRequest(SIGNAL_WITH_START_WORKFLOW_EXECUTION); + + public static final SignalWorkflowExecutionRequest SIGNAL_WORKFLOW_EXECUTION_REQUEST = + new SignalWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setSignalName("signalName") + .setInput(utf8("input")) + .setRequestId("requestId") + .setControl(utf8("control")) + .setIdentity("identity"); + + public static final TerminateWorkflowExecutionRequest TERMINATE_WORKFLOW_EXECUTION_REQUEST = + new TerminateWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setReason("reason") + .setDetails(utf8("details")) + .setIdentity("identity"); + + public static final TerminateWorkflowExecutionRequest TERMINATE_WORKFLOW_EXECUTION_REQUEST_FULL = + new TerminateWorkflowExecutionRequest() + .setDomain("domain") + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setReason("reason") + .setDetails(utf8("details")) + .setIdentity("identity") + .setFirstExecutionRunID("firstExecutionRunID"); + + public static final DeprecateDomainRequest DEPRECATE_DOMAIN_REQUEST = + new DeprecateDomainRequest().setName("domain").setSecurityToken("securityToken"); + + public static final DescribeDomainRequest DESCRIBE_DOMAIN_BY_ID_REQUEST = + new DescribeDomainRequest().setUuid("uuid"); + + public static final DescribeDomainRequest DESCRIBE_DOMAIN_BY_NAME_REQUEST = + new DescribeDomainRequest().setName("name"); + + public static final ListDomainsRequest LIST_DOMAINS_REQUEST = + new ListDomainsRequest().setPageSize(1).setNextPageToken(utf8("nextPageToken")); + + public static final ListTaskListPartitionsRequest LIST_TASK_LIST_PARTITIONS_REQUEST = + new ListTaskListPartitionsRequest().setDomain("domain").setTaskList(TASK_LIST); + + public static final PollForActivityTaskRequest POLL_FOR_ACTIVITY_TASK_REQUEST = + new PollForActivityTaskRequest() + .setDomain("domain") + .setTaskList(TASK_LIST) + .setTaskListMetadata(TASK_LIST_METADATA) + .setIdentity("identity"); + public static final PollForDecisionTaskRequest POLL_FOR_DECISION_TASK_REQUEST = + new PollForDecisionTaskRequest() + .setDomain("domain") + .setTaskList(TASK_LIST) + .setBinaryChecksum("binaryChecksum") + .setIdentity("identity"); + public static final QueryWorkflowRequest QUERY_WORKFLOW_REQUEST = + new QueryWorkflowRequest() + .setDomain("domain") + .setExecution(WORKFLOW_EXECUTION) + .setQuery(WORKFLOW_QUERY) + .setQueryRejectCondition(QueryRejectCondition.NOT_COMPLETED_CLEANLY) + .setQueryConsistencyLevel(QueryConsistencyLevel.STRONG); + + public static final RecordActivityTaskHeartbeatByIDRequest + RECORD_ACTIVITY_TASK_HEARTBEAT_BY_ID_REQUEST = + new RecordActivityTaskHeartbeatByIDRequest() + .setDomain("domain") + .setWorkflowID(WORKFLOW_ID) + .setRunID(RUN_ID) + .setActivityID("activityId") + .setDetails(utf8("details")) + .setIdentity("identity"); + + public static final RecordActivityTaskHeartbeatRequest RECORD_ACTIVITY_TASK_HEARTBEAT_REQUEST = + new RecordActivityTaskHeartbeatRequest() + .setDetails(utf8("details")) + .setTaskToken(utf8("taskToken")) + .setIdentity("identity"); + + public static final RegisterDomainRequest REGISTER_DOMAIN_REQUEST = + new RegisterDomainRequest() + .setName("domain") + .setDescription("description") + .setOwnerEmail("ownerEmail") + .setWorkflowExecutionRetentionPeriodInDays(1) + .setClusters(ImmutableList.of(CLUSTER_REPLICATION_CONFIGURATION)) + .setActiveClusterName("activeCluster") + .setData(DATA) + .setSecurityToken("securityToken") + .setGlobalDomain(true) + .setHistoryArchivalStatus(ArchivalStatus.ENABLED) + .setHistoryArchivalURI("historyArchivalUri") + .setVisibilityArchivalStatus(ArchivalStatus.DISABLED) + .setVisibilityArchivalURI("visibilityArchivalUri"); + + public static final UpdateDomainRequest UPDATE_DOMAIN_REQUEST = + new UpdateDomainRequest() + .setName("domain") + .setSecurityToken("securityToken") + .setUpdatedInfo( + new UpdateDomainInfo() + .setData(DATA) + .setDescription("description") + .setOwnerEmail("ownerEmail")) + .setReplicationConfiguration(DOMAIN_REPLICATION_CONFIGURATION) + .setConfiguration(DOMAIN_CONFIGURATION) + .setDeleteBadBinary("deleteBadBinary") + .setFailoverTimeoutInSeconds(1); + + public static final ListClosedWorkflowExecutionsRequest LIST_CLOSED_WORKFLOW_EXECUTIONS_REQUEST = + new ListClosedWorkflowExecutionsRequest() + .setDomain("domain") + .setMaximumPageSize(1) + .setExecutionFilter(WORKFLOW_EXECUTION_FILTER) + .setTypeFilter(WORKFLOW_TYPE_FILTER) + .setStatusFilter(WorkflowExecutionCloseStatus.COMPLETED) + .setNextPageToken(utf8("nextPageToken")) + .setStartTimeFilter(START_TIME_FILTER); + + public static final ListOpenWorkflowExecutionsRequest LIST_OPEN_WORKFLOW_EXECUTIONS_REQUEST = + new ListOpenWorkflowExecutionsRequest() + .setDomain("domain") + .setMaximumPageSize(1) + .setExecutionFilter(WORKFLOW_EXECUTION_FILTER) + .setTypeFilter(WORKFLOW_TYPE_FILTER) + .setNextPageToken(utf8("nextPageToken")) + .setStartTimeFilter(START_TIME_FILTER); + + public static final StartWorkflowExecutionResponse START_WORKFLOW_EXECUTION_RESPONSE = + new StartWorkflowExecutionResponse().setRunId(RUN_ID); + public static final StartWorkflowExecutionAsyncResponse START_WORKFLOW_EXECUTION_ASYNC_RESPONSE = + new StartWorkflowExecutionAsyncResponse(); + + public static final DescribeTaskListResponse DESCRIBE_TASK_LIST_RESPONSE = + new DescribeTaskListResponse() + .setPollers(ImmutableList.of(POLLER_INFO)) + .setTaskListStatus(TASK_LIST_STATUS); + + public static final DescribeWorkflowExecutionResponse DESCRIBE_WORKFLOW_EXECUTION_RESPONSE = + new DescribeWorkflowExecutionResponse() + .setExecutionConfiguration(WORKFLOW_EXECUTION_CONFIGURATION) + .setWorkflowExecutionInfo(WORKFLOW_EXECUTION_INFO) + .setPendingActivities(ImmutableList.of(PENDING_ACTIVITY_INFO)) + .setPendingChildren(ImmutableList.of(PENDING_CHILD_EXECUTION_INFO)) + .setPendingDecision(PENDING_DECISION_INFO); + + public static final ClusterInfo CLUSTER_INFO = + new ClusterInfo().setSupportedClientVersions(SUPPORTED_CLIENT_VERSIONS); + + public static final GetSearchAttributesResponse GET_SEARCH_ATTRIBUTES_RESPONSE = + new GetSearchAttributesResponse().setKeys(INDEXED_VALUES); + public static final GetWorkflowExecutionHistoryResponse GET_WORKFLOW_EXECUTION_HISTORY_RESPONSE = + new GetWorkflowExecutionHistoryResponse() + .setHistory(HISTORY) + .setRawHistory(ImmutableList.of(DATA_BLOB)) + .setNextPageToken(utf8("nextPageToken")) + .setArchived(true); + + public static final ListArchivedWorkflowExecutionsResponse + LIST_ARCHIVED_WORKFLOW_EXECUTIONS_RESPONSE = + new ListArchivedWorkflowExecutionsResponse() + .setExecutions(ImmutableList.of(WORKFLOW_EXECUTION_INFO)) + .setNextPageToken(utf8("nextPageToken")); + + public static final ListClosedWorkflowExecutionsResponse + LIST_CLOSED_WORKFLOW_EXECUTIONS_RESPONSE = + new ListClosedWorkflowExecutionsResponse() + .setExecutions(ImmutableList.of(WORKFLOW_EXECUTION_INFO)) + .setNextPageToken(utf8("nextPageToken")); + public static final ListOpenWorkflowExecutionsResponse LIST_OPEN_WORKFLOW_EXECUTIONS_RESPONSE = + new ListOpenWorkflowExecutionsResponse() + .setExecutions(ImmutableList.of(WORKFLOW_EXECUTION_INFO)) + .setNextPageToken(utf8("nextPageToken")); + public static final ListTaskListPartitionsResponse LIST_TASK_LIST_PARTITIONS_RESPONSE = + new ListTaskListPartitionsResponse() + .setActivityTaskListPartitions(ImmutableList.of(TASK_LIST_PARTITION_METADATA)) + .setDecisionTaskListPartitions(ImmutableList.of(TASK_LIST_PARTITION_METADATA)); + public static final ListWorkflowExecutionsResponse LIST_WORKFLOW_EXECUTIONS_RESPONSE = + new ListWorkflowExecutionsResponse() + .setExecutions(ImmutableList.of(WORKFLOW_EXECUTION_INFO)) + .setNextPageToken(utf8("nextPageToken")); + public static final PollForActivityTaskResponse POLL_FOR_ACTIVITY_TASK_RESPONSE = + new PollForActivityTaskResponse() + .setTaskToken(utf8("taskToken")) + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setActivityId("activityId") + .setActivityType(ACTIVITY_TYPE) + .setInput(utf8("input")) + .setScheduledTimestamp(1) + .setStartedTimestamp(2) + .setScheduleToCloseTimeoutSeconds(3) + .setStartToCloseTimeoutSeconds(4) + .setHeartbeatTimeoutSeconds(5) + .setAttempt(6) + .setScheduledTimestampOfThisAttempt(7) + .setHeartbeatDetails(utf8("heartbeatDetails")) + .setWorkflowType(WORKFLOW_TYPE) + .setWorkflowDomain("domain") + .setHeader(HEADER); + public static final PollForDecisionTaskResponse POLL_FOR_DECISION_TASK_RESPONSE = + new PollForDecisionTaskResponse() + .setTaskToken(utf8("taskToken")) + .setWorkflowExecution(WORKFLOW_EXECUTION) + .setWorkflowType(WORKFLOW_TYPE) + .setPreviousStartedEventId(1) + .setStartedEventId(2) + .setAttempt(3) + .setBacklogCountHint(4) + .setHistory(HISTORY) + .setNextPageToken(utf8("nextPageToken")) + .setQuery(WORKFLOW_QUERY) + .setWorkflowExecutionTaskList(TASK_LIST) + .setScheduledTimestamp(5) + .setStartedTimestamp(6) + .setQueries(ImmutableMap.of("query", WORKFLOW_QUERY)) + .setNextEventId(7); + + public static final QueryWorkflowResponse QUERY_WORKFLOW_RESPONSE = + new QueryWorkflowResponse() + .setQueryResult(utf8("result")) + .setQueryRejected( + new QueryRejected().setCloseStatus(WorkflowExecutionCloseStatus.FAILED)); + + public static final RecordActivityTaskHeartbeatResponse RECORD_ACTIVITY_TASK_HEARTBEAT_RESPONSE = + new RecordActivityTaskHeartbeatResponse().setCancelRequested(true); + public static final ResetWorkflowExecutionResponse RESET_WORKFLOW_EXECUTION_RESPONSE = + new ResetWorkflowExecutionResponse().setRunId(RUN_ID); + public static final RespondDecisionTaskCompletedResponse + RESPOND_DECISION_TASK_COMPLETED_RESPONSE = + new RespondDecisionTaskCompletedResponse() + .setDecisionTask(POLL_FOR_DECISION_TASK_RESPONSE) + .setActivitiesToDispatchLocally( + ImmutableMap.of("activity", ACTIVITY_LOCAL_DISPATCH_INFO)); + public static final CountWorkflowExecutionsResponse COUNT_WORKFLOW_EXECUTIONS_RESPONSE = + new CountWorkflowExecutionsResponse().setCount(1000); + public static final DescribeDomainResponse DESCRIBE_DOMAIN_RESPONSE = + new DescribeDomainResponse() + .setDomainInfo(DOMAIN_INFO) + .setConfiguration(DOMAIN_CONFIGURATION) + .setReplicationConfiguration(DOMAIN_REPLICATION_CONFIGURATION) + .setFailoverVersion(1) + .setGlobalDomain(true); + public static final ListDomainsResponse LIST_DOMAINS_RESPONSE = + new ListDomainsResponse() + .setDomains(ImmutableList.of(DESCRIBE_DOMAIN_RESPONSE)) + .setNextPageToken(utf8("nextPageToken")); + public static final SignalWithStartWorkflowExecutionAsyncResponse + SIGNAL_WITH_START_WORKFLOW_EXECUTION_ASYNC_RESPONSE = + new SignalWithStartWorkflowExecutionAsyncResponse(); + public static final UpdateDomainResponse UPDATE_DOMAIN_RESPONSE = + new UpdateDomainResponse() + .setDomainInfo(DOMAIN_INFO) + .setConfiguration(DOMAIN_CONFIGURATION) + .setReplicationConfiguration(DOMAIN_REPLICATION_CONFIGURATION) + .setFailoverVersion(1) + .setGlobalDomain(true); + + private ClientObjects() {} + + public static byte[] utf8(String value) { + return utf8Bytes(value); + } + + public static byte[] utf8Bytes(String value) { + return value.getBytes(StandardCharsets.UTF_8); + } +} diff --git a/src/test/java/com/uber/cadence/internal/compatibility/MapperTestUtil.java b/src/test/java/com/uber/cadence/internal/compatibility/MapperTestUtil.java index 96e3df2ad..242bea453 100644 --- a/src/test/java/com/uber/cadence/internal/compatibility/MapperTestUtil.java +++ b/src/test/java/com/uber/cadence/internal/compatibility/MapperTestUtil.java @@ -18,9 +18,9 @@ package com.uber.cadence.internal.compatibility; import com.google.common.collect.ImmutableSet; -import java.util.Arrays; -import java.util.Collections; -import java.util.Set; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import org.apache.thrift.TBase; import org.apache.thrift.TFieldIdEnum; @@ -46,6 +46,29 @@ void assertNoMissingFields(M message, Class fields) { getUnsetFields(message, fields)); } + public static void assertNoMissingFields(Object message) { + Set nullFields = getMissingFields(message.toString()); + + Assert.assertEquals("All fields expected to be set in the text", new HashSet<>(), nullFields); + } + + public static void assertMissingFields(Object message, Set values) { + Set nullFields = getMissingFields(message.toString()); + Assert.assertEquals("Expected missing fields but get different", values, nullFields); + } + + private static Set getMissingFields(String text) { + Set nullFields = new HashSet<>(); + // Regex to find fieldName=null + Pattern pattern = Pattern.compile("(\\w+)=null"); + Matcher matcher = pattern.matcher(text); + + while (matcher.find()) { + nullFields.add(matcher.group(1)); // group(1) captures the field name + } + return nullFields; + } + public static & TFieldIdEnum, M extends TBase> void assertMissingFields( M message, String... values) { assertMissingFields(message, findFieldsEnum(message), ImmutableSet.copyOf(values)); diff --git a/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapperTest.java b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapperTest.java new file mode 100644 index 000000000..25654d673 --- /dev/null +++ b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/DecisionMapperTest.java @@ -0,0 +1,141 @@ +/** + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + *

Modifications copyright (C) 2017 Uber Technologies, Inc. + * + *

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file + * except in compliance with the License. A copy of the License is located at + * + *

http://aws.amazon.com/apache2.0 + * + *

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.MapperTestUtil.assertNoMissingFields; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Sets; +import com.uber.cadence.entities.Decision; +import com.uber.cadence.entities.DecisionType; +import com.uber.cadence.internal.compatibility.ClientObjects; +import com.uber.cadence.internal.compatibility.ProtoObjects; +import java.util.Collections; +import java.util.EnumSet; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import org.junit.Assert; +import org.junit.Test; + +public class DecisionMapperTest { + private static final Map DECISIONS = + ImmutableMap.builder() + .put( + ClientObjects.DECISION_SCHEDULE_ACTIVITY_TASK, + ProtoObjects.DECISION_SCHEDULE_ACTIVITY_TASK) + .put( + ClientObjects.DECISION_REQUEST_CANCEL_ACTIVITY_TASK, + ProtoObjects.DECISION_REQUEST_CANCEL_ACTIVITY_TASK) + .put(ClientObjects.DECISION_START_TIMER, ProtoObjects.DECISION_START_TIMER) + .put( + ClientObjects.DECISION_COMPLETE_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_COMPLETE_WORKFLOW_EXECUTION) + .put( + ClientObjects.DECISION_FAIL_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_FAIL_WORKFLOW_EXECUTION) + .put(ClientObjects.DECISION_CANCEL_TIMER, ProtoObjects.DECISION_CANCEL_TIMER) + .put(ClientObjects.DECISION_CANCEL_WORKFLOW, ProtoObjects.DECISION_CANCEL_WORKFLOW) + .put( + ClientObjects.DECISION_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION) + .put( + ClientObjects.DECISION_CONTINUE_AS_NEW_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_CONTINUE_AS_NEW_WORKFLOW_EXECUTION) + .put( + ClientObjects.DECISION_START_CHILD_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_START_CHILD_WORKFLOW_EXECUTION) + .put( + ClientObjects.DECISION_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION, + ProtoObjects.DECISION_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION) + .put( + ClientObjects.DECISION_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES, + ProtoObjects.DECISION_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES) + .put(ClientObjects.DECISION_RECORD_MARKER, ProtoObjects.DECISION_RECORD_MARKER) + .build(); + + @Test + public void testMapDecision() { + for (Map.Entry entry : DECISIONS.entrySet()) { + Assert.assertEquals( + "Failed to convert decision of type: " + entry.getKey().getDecisionType(), + entry.getValue(), + DecisionMapper.decision(entry.getKey())); + } + } + + @Test + public void testAllDecisionTypesCovered() { + // If IDL changes add a new decision type, this should fail + Set expected = EnumSet.allOf(DecisionType.class); + Set actual = + DECISIONS.keySet().stream().map(Decision::getDecisionType).collect(Collectors.toSet()); + + Assert.assertEquals( + "Missing conversion for some DecisionTypes", + Collections.emptySet(), + Sets.difference(expected, actual)); + } + + @Test + public void testAllAttributesSet() { + // If IDL changes add a new field to decision attributes, this should fail + for (Map.Entry entry : DECISIONS.entrySet()) { + Decision decision = entry.getKey(); + switch (decision.getDecisionType()) { + case ScheduleActivityTask: + assertNoMissingFields(decision.getScheduleActivityTaskDecisionAttributes()); + break; + case RequestCancelActivityTask: + assertNoMissingFields(decision.getRequestCancelActivityTaskDecisionAttributes()); + break; + case StartTimer: + assertNoMissingFields(decision.getStartTimerDecisionAttributes()); + break; + case CompleteWorkflowExecution: + assertNoMissingFields(decision.getCompleteWorkflowExecutionDecisionAttributes()); + break; + case FailWorkflowExecution: + assertNoMissingFields(decision.getFailWorkflowExecutionDecisionAttributes()); + break; + case CancelTimer: + assertNoMissingFields(decision.getCancelTimerDecisionAttributes()); + break; + case CancelWorkflowExecution: + assertNoMissingFields(decision.getCancelWorkflowExecutionDecisionAttributes()); + break; + case RequestCancelExternalWorkflowExecution: + assertNoMissingFields( + decision.getRequestCancelExternalWorkflowExecutionDecisionAttributes()); + break; + case RecordMarker: + assertNoMissingFields(decision.getRecordMarkerDecisionAttributes()); + break; + case ContinueAsNewWorkflowExecution: + assertNoMissingFields(decision.getContinueAsNewWorkflowExecutionDecisionAttributes()); + break; + case StartChildWorkflowExecution: + assertNoMissingFields(decision.getStartChildWorkflowExecutionDecisionAttributes()); + break; + case SignalExternalWorkflowExecution: + assertNoMissingFields(decision.getSignalExternalWorkflowExecutionDecisionAttributes()); + break; + case UpsertWorkflowSearchAttributes: + assertNoMissingFields(decision.getUpsertWorkflowSearchAttributesDecisionAttributes()); + break; + } + } + } +} diff --git a/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapperTest.java b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapperTest.java new file mode 100644 index 000000000..7d9fd0833 --- /dev/null +++ b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/ErrorMapperTest.java @@ -0,0 +1,138 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static org.junit.Assert.assertEquals; + +import com.google.protobuf.Any; +import com.google.protobuf.Message; +import com.uber.cadence.api.v1.*; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import io.grpc.protobuf.StatusProto; +import java.util.Arrays; +import java.util.Collection; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class ErrorMapperTest { + + @Parameterized.Parameter(0) + public Status status; + + @Parameterized.Parameter(1) + public Message detail; + + @Parameterized.Parameter(2) + public Class expectedException; + + @Parameterized.Parameters + public static Collection data() { + Object[][] data = + new Object[][] { + {Status.PERMISSION_DENIED, null, com.uber.cadence.entities.AccessDeniedError.class}, + {Status.INTERNAL, null, com.uber.cadence.entities.InternalServiceError.class}, + {Status.NOT_FOUND, null, com.uber.cadence.entities.EntityNotExistsError.class}, + { + Status.ALREADY_EXISTS, + DomainAlreadyExistsError.getDefaultInstance(), + com.uber.cadence.entities.DomainAlreadyExistsError.class + }, + { + Status.FAILED_PRECONDITION, + FeatureNotEnabledError.getDefaultInstance(), + com.uber.cadence.entities.FeatureNotEnabledError.class + }, + { + Status.RESOURCE_EXHAUSTED, + LimitExceededError.getDefaultInstance(), + com.uber.cadence.entities.LimitExceededError.class + }, + {Status.UNKNOWN, null, com.uber.cadence.entities.BaseError.class}, + { + Status.NOT_FOUND, + WorkflowExecutionAlreadyCompletedError.getDefaultInstance(), + com.uber.cadence.entities.WorkflowExecutionAlreadyCompletedError.class + }, + { + Status.ALREADY_EXISTS, + WorkflowExecutionAlreadyStartedError.getDefaultInstance(), + com.uber.cadence.entities.WorkflowExecutionAlreadyStartedError.class + }, + { + Status.FAILED_PRECONDITION, + DomainNotActiveError.getDefaultInstance(), + com.uber.cadence.entities.DomainNotActiveError.class + }, + { + Status.FAILED_PRECONDITION, + ClientVersionNotSupportedError.getDefaultInstance(), + com.uber.cadence.entities.ClientVersionNotSupportedError.class + }, + { + Status.FAILED_PRECONDITION, + FeatureNotEnabledError.getDefaultInstance(), + com.uber.cadence.entities.FeatureNotEnabledError.class + }, + { + Status.FAILED_PRECONDITION, + DomainNotActiveError.getDefaultInstance(), + com.uber.cadence.entities.DomainNotActiveError.class + }, + { + Status.FAILED_PRECONDITION, + ClientVersionNotSupportedError.getDefaultInstance(), + com.uber.cadence.entities.ClientVersionNotSupportedError.class + }, + { + Status.FAILED_PRECONDITION, + FeatureNotEnabledError.getDefaultInstance(), + com.uber.cadence.entities.FeatureNotEnabledError.class + }, + { + Status.RESOURCE_EXHAUSTED, + LimitExceededError.getDefaultInstance(), + com.uber.cadence.entities.LimitExceededError.class + }, + {Status.DATA_LOSS, null, com.uber.cadence.entities.InternalDataInconsistencyError.class}, + { + Status.RESOURCE_EXHAUSTED, + ServiceBusyError.getDefaultInstance(), + com.uber.cadence.entities.ServiceBusyError.class + }, + {Status.INTERNAL, null, com.uber.cadence.entities.InternalServiceError.class} + }; + return Arrays.asList(data); + } + + @Test + public void testErrorMapper() { + com.google.rpc.Status.Builder builder = + com.google.rpc.Status.newBuilder().setCode(status.getCode().value()); + + if (detail != null) { + builder.addDetails(Any.pack(detail)); + } + + StatusRuntimeException ex = StatusProto.toStatusRuntimeException(builder.build()); + com.uber.cadence.entities.BaseError result = ErrorMapper.Error(ex); + assertEquals(expectedException, result.getClass()); + } +} diff --git a/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapperTest.java b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapperTest.java new file mode 100644 index 000000000..6b617cb57 --- /dev/null +++ b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/RequestMapperTest.java @@ -0,0 +1,275 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static com.uber.cadence.internal.compatibility.MapperTestUtil.assertMissingFields; +import static com.uber.cadence.internal.compatibility.MapperTestUtil.assertNoMissingFields; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import com.google.common.collect.ImmutableSet; +import com.google.protobuf.Message; +import com.uber.cadence.internal.compatibility.ClientObjects; +import com.uber.cadence.internal.compatibility.ProtoObjects; +import java.util.Arrays; +import java.util.Set; +import java.util.function.Function; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class RequestMapperTest { + + @Parameterized.Parameter(0) + public String testName; + + @Parameterized.Parameter(1) + public T from; + + @Parameterized.Parameter(2) + public P to; + + @Parameterized.Parameter(3) + public Function via; + + @Parameterized.Parameter(4) + public Set missingFields; + + @Test + public void testFieldsPresent() { + // If IDL is updated, this will fail. Update the mapper or add it to the test + if (missingFields.isEmpty()) { + assertNoMissingFields(from); + } else { + assertMissingFields(from, missingFields); + } + } + + @Test + public void testMapper() { + P actual = via.apply(from); + assertEquals(to, actual); + } + + @Test + public void testHandlesNull() { + P actual = via.apply(null); + + assertNull("Mapper functions should accept null, returning null", actual); + } + + @Parameterized.Parameters(name = "{0}") + public static Iterable cases() { + return Arrays.asList( + testCase( + ClientObjects.COUNT_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.COUNT_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::countWorkflowExecutionsRequest), + testCase( + ClientObjects.DESCRIBE_TASK_LIST_REQUEST, + ProtoObjects.DESCRIBE_TASK_LIST_REQUEST, + RequestMapper::describeTaskListRequest), + testCase( + ClientObjects.LIST_ARCHIVED_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.LIST_ARCHIVED_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::listArchivedWorkflowExecutionsRequest), + testCase( + ClientObjects.REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST, + ProtoObjects.REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST, + RequestMapper::requestCancelWorkflowExecutionRequest, + "firstExecutionRunID", // optional field + "cause"), // optional field + testCase( + ClientObjects.REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST_FULL, + ProtoObjects.REQUEST_CANCEL_WORKFLOW_EXECUTION_REQUEST_FULL, + RequestMapper::requestCancelWorkflowExecutionRequest), + testCase( + ClientObjects.RESET_STICKY_TASK_LIST_REQUEST, + ProtoObjects.RESET_STICKY_TASK_LIST_REQUEST, + RequestMapper::resetStickyTaskListRequest), + testCase( + ClientObjects.RESET_WORKFLOW_EXECUTION_REQUEST, + ProtoObjects.RESET_WORKFLOW_EXECUTION_REQUEST, + RequestMapper::resetWorkflowExecutionRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_CANCELED_BY_ID_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_CANCELED_BY_ID_REQUEST, + RequestMapper::respondActivityTaskCanceledByIdRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_CANCELED_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_CANCELED_REQUEST, + RequestMapper::respondActivityTaskCanceledRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_COMPLETED_BY_ID_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_COMPLETED_BY_ID_REQUEST, + RequestMapper::respondActivityTaskCompletedByIdRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_COMPLETED_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_COMPLETED_REQUEST, + RequestMapper::respondActivityTaskCompletedRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_FAILED_BY_ID_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_FAILED_BY_ID_REQUEST, + RequestMapper::respondActivityTaskFailedByIdRequest), + testCase( + ClientObjects.RESPOND_ACTIVITY_TASK_FAILED_REQUEST, + ProtoObjects.RESPOND_ACTIVITY_TASK_FAILED_REQUEST, + RequestMapper::respondActivityTaskFailedRequest), + testCase( + ClientObjects.RESPOND_DECISION_TASK_COMPLETED_REQUEST, + ProtoObjects.RESPOND_DECISION_TASK_COMPLETED_REQUEST, + RequestMapper::respondDecisionTaskCompletedRequest, + "scheduleActivityTaskDecisionAttributes", // all other types are missing as expected + "requestCancelActivityTaskDecisionAttributes", + "startTimerDecisionAttributes", + "failWorkflowExecutionDecisionAttributes", + "cancelTimerDecisionAttributes", + "cancelWorkflowExecutionDecisionAttributes", + "requestCancelExternalWorkflowExecutionDecisionAttributes", + "recordMarkerDecisionAttributes", + "continueAsNewWorkflowExecutionDecisionAttributes", + "startChildWorkflowExecutionDecisionAttributes", + "signalExternalWorkflowExecutionDecisionAttributes", + "upsertWorkflowSearchAttributesDecisionAttributes"), + testCase( + ClientObjects.RESPOND_DECISION_TASK_FAILED_REQUEST, + ProtoObjects.RESPOND_DECISION_TASK_FAILED_REQUEST, + RequestMapper::respondDecisionTaskFailedRequest), + testCase( + ClientObjects.RESPOND_QUERY_TASK_COMPLETED_REQUEST, + ProtoObjects.RESPOND_QUERY_TASK_COMPLETED_REQUEST, + RequestMapper::respondQueryTaskCompletedRequest), + testCase( + ClientObjects.LIST_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.SCAN_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::scanWorkflowExecutionsRequest), + testCase( + ClientObjects.DESCRIBE_WORKFLOW_EXECUTION_REQUEST, + ProtoObjects.DESCRIBE_WORKFLOW_EXECUTION_REQUEST, + RequestMapper::describeWorkflowExecutionRequest), + testCase( + ClientObjects.GET_WORKFLOW_EXECUTION_HISTORY_REQUEST, + ProtoObjects.GET_WORKFLOW_EXECUTION_HISTORY_REQUEST, + RequestMapper::getWorkflowExecutionHistoryRequest), + testCase( + ClientObjects.START_WORKFLOW_EXECUTION, + ProtoObjects.START_WORKFLOW_EXECUTION, + RequestMapper::startWorkflowExecutionRequest), + testCase( + ClientObjects.SIGNAL_WITH_START_WORKFLOW_EXECUTION, + ProtoObjects.SIGNAL_WITH_START_WORKFLOW_EXECUTION, + RequestMapper::signalWithStartWorkflowExecutionRequest), + testCase( + ClientObjects.START_WORKFLOW_EXECUTION_ASYNC_REQUEST, + ProtoObjects.START_WORKFLOW_EXECUTION_ASYNC_REQUEST, + RequestMapper::startWorkflowExecutionAsyncRequest), + testCase( + ClientObjects.SIGNAL_WITH_START_WORKFLOW_EXECUTION_ASYNC_REQUEST, + ProtoObjects.SIGNAL_WITH_START_WORKFLOW_EXECUTION_ASYNC_REQUEST, + RequestMapper::signalWithStartWorkflowExecutionAsyncRequest), + testCase( + ClientObjects.SIGNAL_WORKFLOW_EXECUTION_REQUEST, + ProtoObjects.SIGNAL_WORKFLOW_EXECUTION_REQUEST, + RequestMapper::signalWorkflowExecutionRequest), + testCase( + ClientObjects.TERMINATE_WORKFLOW_EXECUTION_REQUEST, + ProtoObjects.TERMINATE_WORKFLOW_EXECUTION_REQUEST, + RequestMapper::terminateWorkflowExecutionRequest, + "firstExecutionRunID"), // optional field + testCase( + ClientObjects.TERMINATE_WORKFLOW_EXECUTION_REQUEST_FULL, + ProtoObjects.TERMINATE_WORKFLOW_EXECUTION_REQUEST_FULL, + RequestMapper::terminateWorkflowExecutionRequest), + testCase( + ClientObjects.DEPRECATE_DOMAIN_REQUEST, + ProtoObjects.DEPRECATE_DOMAIN_REQUEST, + RequestMapper::deprecateDomainRequest), + testCase( + ClientObjects.DESCRIBE_DOMAIN_BY_ID_REQUEST, + ProtoObjects.DESCRIBE_DOMAIN_BY_ID_REQUEST, + RequestMapper::describeDomainRequest, + "name"), // Not needed for query by ID + testCase( + ClientObjects.DESCRIBE_DOMAIN_BY_NAME_REQUEST, + ProtoObjects.DESCRIBE_DOMAIN_BY_NAME_REQUEST, + RequestMapper::describeDomainRequest, + "uuid"), // Not needed for query by name + testCase( + ClientObjects.LIST_DOMAINS_REQUEST, + ProtoObjects.LIST_DOMAINS_REQUEST, + RequestMapper::listDomainsRequest), + testCase( + ClientObjects.LIST_TASK_LIST_PARTITIONS_REQUEST, + ProtoObjects.LIST_TASK_LIST_PARTITIONS_REQUEST, + RequestMapper::listTaskListPartitionsRequest), + testCase( + ClientObjects.POLL_FOR_ACTIVITY_TASK_REQUEST, + ProtoObjects.POLL_FOR_ACTIVITY_TASK_REQUEST, + RequestMapper::pollForActivityTaskRequest), + testCase( + ClientObjects.POLL_FOR_DECISION_TASK_REQUEST, + ProtoObjects.POLL_FOR_DECISION_TASK_REQUEST, + RequestMapper::pollForDecisionTaskRequest), + testCase( + ClientObjects.QUERY_WORKFLOW_REQUEST, + ProtoObjects.QUERY_WORKFLOW_REQUEST, + RequestMapper::queryWorkflowRequest), + testCase( + ClientObjects.RECORD_ACTIVITY_TASK_HEARTBEAT_BY_ID_REQUEST, + ProtoObjects.RECORD_ACTIVITY_TASK_HEARTBEAT_BY_ID_REQUEST, + RequestMapper::recordActivityTaskHeartbeatByIdRequest), + testCase( + ClientObjects.RECORD_ACTIVITY_TASK_HEARTBEAT_REQUEST, + ProtoObjects.RECORD_ACTIVITY_TASK_HEARTBEAT_REQUEST, + RequestMapper::recordActivityTaskHeartbeatRequest), + testCase( + ClientObjects.REGISTER_DOMAIN_REQUEST, + ProtoObjects.REGISTER_DOMAIN_REQUEST, + RequestMapper + ::registerDomainRequest), // Thrift has this field but proto doens't have it + testCase( + ClientObjects.UPDATE_DOMAIN_REQUEST, + // Data and replicationConfiguration are copied incorrectly due to a bug :( + ProtoObjects.UPDATE_DOMAIN_REQUEST, + RequestMapper::updateDomainRequest, + // TODO new fields that are not yet supported + "queueConfig", + "predefinedQueueName", + "queueType"), + testCase( + ClientObjects.LIST_CLOSED_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.LIST_CLOSED_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::listClosedWorkflowExecutionsRequest), + testCase( + ClientObjects.LIST_OPEN_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.LIST_OPEN_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::listOpenWorkflowExecutionsRequest), + testCase( + ClientObjects.LIST_WORKFLOW_EXECUTIONS_REQUEST, + ProtoObjects.LIST_WORKFLOW_EXECUTIONS_REQUEST, + RequestMapper::listWorkflowExecutionsRequest)); + } + + private static Object[] testCase( + T from, P to, Function via, String... missingFields) { + return new Object[] { + from.getClass().getSimpleName(), from, to, via, ImmutableSet.copyOf(missingFields) + }; + } +} diff --git a/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapperTest.java b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapperTest.java new file mode 100644 index 000000000..da03edd56 --- /dev/null +++ b/src/test/java/com/uber/cadence/internal/compatibility/proto/mappers/TypeMapperTest.java @@ -0,0 +1,155 @@ +/* + * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Modifications copyright (C) 2017 Uber Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not + * use this file except in compliance with the License. A copy of the License is + * located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package com.uber.cadence.internal.compatibility.proto.mappers; + +import static org.junit.Assert.*; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Message; +import com.uber.cadence.entities.WorkflowExecutionCloseStatus; +import com.uber.cadence.internal.compatibility.ClientObjects; +import com.uber.cadence.internal.compatibility.ProtoObjects; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class TypeMapperTest { + + @Parameterized.Parameter(0) + public String testName; + + @Parameterized.Parameter(1) + public T from; + + @Parameterized.Parameter(2) + public P to; + + @Parameterized.Parameter(3) + public Function via; + + @Test + public void testMapper() { + P actual = via.apply(from); + assertEquals(to, actual); + } + + @Test + public void testHandlesNull() { + P actual = via.apply(null); + + if (actual instanceof List) { + assertTrue( + "Mapper functions returning a list should return an empty list", + ((List) actual).isEmpty()); + } else if (actual instanceof Map) { + assertTrue( + "Mapper functions returning a map should return an empty map", + ((Map) actual).isEmpty()); + } else if (actual instanceof Message) { + assertEquals( + "Mapper functions returning a Message should return the default value", + ((Message) actual).getDefaultInstanceForType(), + actual); + } else { + assertNull("Mapper functions should accept null, returning null", actual); + } + } + + @Parameterized.Parameters(name = "{0}") + public static Iterable cases() { + return Arrays.asList( + testCase( + ClientObjects.BAD_BINARY_INFO, ProtoObjects.BAD_BINARY_INFO, TypeMapper::badBinaryInfo), + testCase( + ClientObjects.utf8Bytes("data"), ProtoObjects.payload("data"), TypeMapper::payload), + testCase(ClientObjects.ACTIVITY_TYPE, ProtoObjects.ACTIVITY_TYPE, TypeMapper::activityType), + testCase(ClientObjects.WORKFLOW_TYPE, ProtoObjects.WORKFLOW_TYPE, TypeMapper::workflowType), + testCase(ClientObjects.TASK_LIST, ProtoObjects.TASK_LIST, TypeMapper::taskList), + testCase( + ClientObjects.TASK_LIST_METADATA, + ProtoObjects.TASK_LIST_METADATA, + TypeMapper::taskListMetadata), + testCase(ClientObjects.RETRY_POLICY, ProtoObjects.RETRY_POLICY, TypeMapper::retryPolicy), + testCase(ClientObjects.HEADER, ProtoObjects.HEADER, TypeMapper::header), + testCase(ClientObjects.MEMO, ProtoObjects.MEMO, TypeMapper::memo), + testCase( + ClientObjects.SEARCH_ATTRIBUTES, + ProtoObjects.SEARCH_ATTRIBUTES, + TypeMapper::searchAttributes), + testCase(ClientObjects.BAD_BINARIES, ProtoObjects.BAD_BINARIES, TypeMapper::badBinaries), + testCase( + ClientObjects.CLUSTER_REPLICATION_CONFIGURATION, + ProtoObjects.CLUSTER_REPLICATION_CONFIGURATION, + TypeMapper::clusterReplicationConfiguration), + testCase( + ClientObjects.WORKFLOW_QUERY, ProtoObjects.WORKFLOW_QUERY, TypeMapper::workflowQuery), + testCase( + ClientObjects.WORKFLOW_QUERY_RESULT, + ProtoObjects.WORKFLOW_QUERY_RESULT, + TypeMapper::workflowQueryResult), + testCase( + ClientObjects.STICKY_EXECUTION_ATTRIBUTES, + ProtoObjects.STICKY_EXECUTION_ATTRIBUTES, + TypeMapper::stickyExecutionAttributes), + testCase( + ClientObjects.WORKER_VERSION_INFO, + ProtoObjects.WORKER_VERSION_INFO, + TypeMapper::workerVersionInfo), + testCase( + ClientObjects.START_TIME_FILTER, + ProtoObjects.START_TIME_FILTER, + TypeMapper::startTimeFilter), + testCase( + ClientObjects.WORKFLOW_EXECUTION_FILTER, + ProtoObjects.WORKFLOW_EXECUTION_FILTER, + TypeMapper::workflowExecutionFilter), + testCase( + ClientObjects.WORKFLOW_TYPE_FILTER, + ProtoObjects.WORKFLOW_TYPE_FILTER, + TypeMapper::workflowTypeFilter), + testCase( + WorkflowExecutionCloseStatus.COMPLETED, + ProtoObjects.STATUS_FILTER, + TypeMapper::statusFilter), + testCase( + ImmutableMap.of("key", ClientObjects.utf8("data")), + ImmutableMap.of("key", ProtoObjects.payload("data")), + TypeMapper::payloadByteBufferMap), + testCase( + ImmutableMap.of("key", ClientObjects.BAD_BINARY_INFO), + ImmutableMap.of("key", ProtoObjects.BAD_BINARY_INFO), + TypeMapper::badBinaryInfoMap), + testCase( + ImmutableList.of(ClientObjects.CLUSTER_REPLICATION_CONFIGURATION), + ImmutableList.of(ProtoObjects.CLUSTER_REPLICATION_CONFIGURATION), + TypeMapper::clusterReplicationConfigurationArray), + testCase( + ImmutableMap.of("key", ClientObjects.WORKFLOW_QUERY_RESULT), + ImmutableMap.of("key", ProtoObjects.WORKFLOW_QUERY_RESULT), + TypeMapper::workflowQueryResultMap)); + } + + private static Object[] testCase(T from, P to, Function via) { + return new Object[] {from.getClass().getSimpleName(), from, to, via}; + } +} From 360982798fab1715e2d7422359c05af4c76df06c Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Wed, 25 Jun 2025 22:28:43 -0700 Subject: [PATCH 3/3] remove unnecessary internal TasklistKind entity (#1010) What changed? replace internal TasklistKind entity with thrift one directly, which will be replaced with V4 entity eventually Why? TasklistKind is an internal entity introduced earlier. With V4, we already have this and thus do not need extra ones. --- .../cadence/internal/worker/TaskListKind.java | 33 ------------------- .../internal/worker/WorkflowPollTask.java | 3 +- .../worker/WorkflowPollTaskFactory.java | 1 + .../internal/worker/WorkflowWorker.java | 3 +- .../uber/cadence/worker/WorkerFactory.java | 3 +- .../internal/worker/TaskListKindTest.java | 32 ------------------ .../internal/worker/WorkflowPollTaskTest.java | 2 +- 7 files changed, 8 insertions(+), 69 deletions(-) delete mode 100644 src/main/java/com/uber/cadence/internal/worker/TaskListKind.java delete mode 100644 src/test/java/com/uber/cadence/internal/worker/TaskListKindTest.java diff --git a/src/main/java/com/uber/cadence/internal/worker/TaskListKind.java b/src/main/java/com/uber/cadence/internal/worker/TaskListKind.java deleted file mode 100644 index 7a157d148..000000000 --- a/src/main/java/com/uber/cadence/internal/worker/TaskListKind.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Modifications copyright (C) 2017 Uber Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"). You may not - * use this file except in compliance with the License. A copy of the License is - * located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -package com.uber.cadence.internal.worker; - -public enum TaskListKind { - TASK_LIST_KIND_NORMAL(0), - TASK_LIST_KIND_STICKY(1); - - private final int value; - - TaskListKind(int value) { - this.value = value; - } - - public com.uber.cadence.TaskListKind toThrift() { - return com.uber.cadence.TaskListKind.findByValue(this.value); - } -} diff --git a/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTask.java b/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTask.java index 1d379237b..0b98bd6ba 100644 --- a/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTask.java +++ b/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTask.java @@ -25,6 +25,7 @@ import com.uber.cadence.PollForDecisionTaskResponse; import com.uber.cadence.ServiceBusyError; import com.uber.cadence.TaskList; +import com.uber.cadence.TaskListKind; import com.uber.cadence.common.BinaryChecksum; import com.uber.cadence.internal.metrics.MetricsTag; import com.uber.cadence.internal.metrics.MetricsType; @@ -73,7 +74,7 @@ public PollForDecisionTaskResponse poll() throws TException { pollRequest.setIdentity(identity); pollRequest.setBinaryChecksum(BinaryChecksum.getBinaryChecksum()); - TaskList tl = new TaskList().setName(taskList).setKind(taskListKind.toThrift()); + TaskList tl = new TaskList().setName(taskList).setKind(taskListKind); pollRequest.setTaskList(tl); if (log.isDebugEnabled()) { diff --git a/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTaskFactory.java b/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTaskFactory.java index 663cfe02b..19380e7d0 100644 --- a/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTaskFactory.java +++ b/src/main/java/com/uber/cadence/internal/worker/WorkflowPollTaskFactory.java @@ -18,6 +18,7 @@ package com.uber.cadence.internal.worker; import com.uber.cadence.PollForDecisionTaskResponse; +import com.uber.cadence.TaskListKind; import com.uber.cadence.serviceclient.IWorkflowService; import com.uber.m3.tally.Scope; import java.util.Objects; diff --git a/src/main/java/com/uber/cadence/internal/worker/WorkflowWorker.java b/src/main/java/com/uber/cadence/internal/worker/WorkflowWorker.java index e77a9491a..e6ae5a4db 100644 --- a/src/main/java/com/uber/cadence/internal/worker/WorkflowWorker.java +++ b/src/main/java/com/uber/cadence/internal/worker/WorkflowWorker.java @@ -29,6 +29,7 @@ import com.uber.cadence.RespondDecisionTaskFailedRequest; import com.uber.cadence.RespondQueryTaskCompletedRequest; import com.uber.cadence.ScheduleActivityTaskDecisionAttributes; +import com.uber.cadence.TaskListKind; import com.uber.cadence.WorkflowExecution; import com.uber.cadence.WorkflowExecutionStartedEventAttributes; import com.uber.cadence.WorkflowQuery; @@ -107,7 +108,7 @@ public void start() { service, domain, taskList, - TaskListKind.TASK_LIST_KIND_NORMAL, + TaskListKind.NORMAL, options.getMetricsScope(), options.getIdentity()), pollTaskExecutor, diff --git a/src/main/java/com/uber/cadence/worker/WorkerFactory.java b/src/main/java/com/uber/cadence/worker/WorkerFactory.java index fc19dcb34..19e716082 100644 --- a/src/main/java/com/uber/cadence/worker/WorkerFactory.java +++ b/src/main/java/com/uber/cadence/worker/WorkerFactory.java @@ -22,6 +22,7 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.uber.cadence.PollForDecisionTaskResponse; +import com.uber.cadence.TaskListKind; import com.uber.cadence.client.WorkflowClient; import com.uber.cadence.converter.DataConverter; import com.uber.cadence.converter.JsonDataConverter; @@ -134,7 +135,7 @@ public WorkerFactory(WorkflowClient workflowClient, WorkerFactoryOptions factory workflowClient.getService(), workflowClient.getOptions().getDomain(), getStickyTaskListName(), - TaskListKind.TASK_LIST_KIND_STICKY, + TaskListKind.STICKY, stickyScope, workflowClient.getOptions().getIdentity()) .get(), diff --git a/src/test/java/com/uber/cadence/internal/worker/TaskListKindTest.java b/src/test/java/com/uber/cadence/internal/worker/TaskListKindTest.java deleted file mode 100644 index 4bade807a..000000000 --- a/src/test/java/com/uber/cadence/internal/worker/TaskListKindTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Modifications copyright (C) 2017 Uber Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"). You may not - * use this file except in compliance with the License. A copy of the License is - * located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -package com.uber.cadence.internal.worker; - -import static junit.framework.TestCase.*; - -import org.junit.Test; - -public class TaskListKindTest { - @Test - public void toThrift() { - assertEquals( - TaskListKind.TASK_LIST_KIND_NORMAL.toThrift(), com.uber.cadence.TaskListKind.NORMAL); - assertEquals( - TaskListKind.TASK_LIST_KIND_STICKY.toThrift(), com.uber.cadence.TaskListKind.STICKY); - } -} diff --git a/src/test/java/com/uber/cadence/internal/worker/WorkflowPollTaskTest.java b/src/test/java/com/uber/cadence/internal/worker/WorkflowPollTaskTest.java index 9b36f551e..a96716d65 100644 --- a/src/test/java/com/uber/cadence/internal/worker/WorkflowPollTaskTest.java +++ b/src/test/java/com/uber/cadence/internal/worker/WorkflowPollTaskTest.java @@ -80,7 +80,7 @@ public void setup() { mockService, "test-domain", "test-taskList", - TaskListKind.TASK_LIST_KIND_NORMAL, + TaskListKind.NORMAL, mockMetricScope, "test-identity"); }