Skip to content

Commit 87f1a23

Browse files
committed
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
1 parent 063b1ad commit 87f1a23

File tree

537 files changed

+25955
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

537 files changed

+25955
-5
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Getter;
19+
import lombok.Setter;
20+
import lombok.experimental.Accessors;
21+
22+
/**
23+
* DO NOT EDIT THIS FILE.
24+
*
25+
* <p>This file is generated by cadence-idl custom generator for simple java entity
26+
*
27+
* <p>If you want to change the code, please modify the generator.
28+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
29+
*/
30+
@Getter
31+
@Setter
32+
@Accessors(chain = true)
33+
public class AccessDeniedError extends BaseError {
34+
35+
public AccessDeniedError() {
36+
super();
37+
}
38+
39+
public AccessDeniedError(String message, Throwable cause) {
40+
super(message, cause);
41+
}
42+
43+
public AccessDeniedError(Throwable cause) {
44+
super(cause);
45+
}
46+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityLocalDispatchInfo {
32+
private String activityId;
33+
private long scheduledTimestamp;
34+
private long startedTimestamp;
35+
private long scheduledTimestampOfThisAttempt;
36+
private byte[] taskToken;
37+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskCancelRequestedEventAttributes {
32+
private String activityId;
33+
private long decisionTaskCompletedEventId;
34+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskCanceledEventAttributes {
32+
private byte[] details;
33+
private long latestCancelRequestedEventId;
34+
private long scheduledEventId;
35+
private long startedEventId;
36+
private String identity;
37+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskCompletedEventAttributes {
32+
private byte[] result;
33+
private long scheduledEventId;
34+
private long startedEventId;
35+
private String identity;
36+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskFailedEventAttributes {
32+
private String reason;
33+
private byte[] details;
34+
private long scheduledEventId;
35+
private long startedEventId;
36+
private String identity;
37+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskScheduledEventAttributes {
32+
private String activityId;
33+
private ActivityType activityType;
34+
private String domain;
35+
private TaskList taskList;
36+
private byte[] input;
37+
private int scheduleToCloseTimeoutSeconds;
38+
private int scheduleToStartTimeoutSeconds;
39+
private int startToCloseTimeoutSeconds;
40+
private int heartbeatTimeoutSeconds;
41+
private long decisionTaskCompletedEventId;
42+
private RetryPolicy retryPolicy;
43+
private Header header;
44+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskStartedEventAttributes {
32+
private long scheduledEventId;
33+
private String identity;
34+
private String requestId;
35+
private int attempt;
36+
private String lastFailureReason;
37+
private byte[] lastFailureDetails;
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityTaskTimedOutEventAttributes {
32+
private byte[] details;
33+
private long scheduledEventId;
34+
private long startedEventId;
35+
private TimeoutType timeoutType;
36+
private String lastFailureReason;
37+
private byte[] lastFailureDetails;
38+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
15+
package com.uber.cadence.entities;
16+
17+
import java.util.*;
18+
import lombok.Data;
19+
import lombok.experimental.Accessors;
20+
21+
/**
22+
* DO NOT EDIT THIS FILE.
23+
*
24+
* <p>This file is generated by cadence-idl custom generator for simple java entity
25+
*
26+
* <p>If you want to change the code, please modify the generator.
27+
* https://github.com/cadence-workflow/cadence-idl/tree/main/java/thrift/generator
28+
*/
29+
@Data
30+
@Accessors(chain = true)
31+
public class ActivityType {
32+
private String name;
33+
}

0 commit comments

Comments
 (0)