diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd8958b9..c9cdaebb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
+- [#69](https://github.com/cludden/protoc-gen-go-temporal/pull/69) support external messages as rpc parameters
+
# [1.13.1](https://github.com/cludden/protoc-gen-go-temporal/releases/tag/v1.13.1) - 2024-05-14
diff --git a/gen/example/helloworld/v1/example_temporal.pb.go b/gen/example/helloworld/v1/example_temporal.pb.go
index e0c0dc06..6727f42d 100644
--- a/gen/example/helloworld/v1/example_temporal.pb.go
+++ b/gen/example/helloworld/v1/example_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -19,7 +19,7 @@ import (
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
testsuite "go.temporal.io/sdk/testsuite"
@@ -199,7 +199,7 @@ type HelloOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -224,7 +224,7 @@ func (o *HelloOptions) Build(req protoreflect.Message) (client.StartWorkflowOpti
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -269,7 +269,7 @@ func (o *HelloOptions) WithID(id string) *HelloOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *HelloOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *HelloOptions {
+func (o *HelloOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *HelloOptions {
o.idReusePolicy = policy
return o
}
@@ -485,13 +485,13 @@ type HelloChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -528,7 +528,7 @@ func (o *HelloChildOptions) Build(ctx workflow.Context, req protoreflect.Message
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -551,7 +551,7 @@ func (o *HelloChildOptions) Build(ctx workflow.Context, req protoreflect.Message
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -579,13 +579,13 @@ func (o *HelloChildOptions) WithID(id string) *HelloChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *HelloChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *HelloChildOptions {
+func (o *HelloChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *HelloChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *HelloChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *HelloChildOptions {
+func (o *HelloChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *HelloChildOptions {
o.parentClosePolicy = policy
return o
}
diff --git a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
index 4ce2dabf..1c4a3440 100644
--- a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
+++ b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,12 +13,12 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/helloworld/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -102,7 +102,7 @@ type HelloWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -130,7 +130,7 @@ func (opts *HelloWorkflowOptions) WithHeartbeatInterval(d time.Duration) *HelloW
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *HelloWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *HelloWorkflowOptions {
+func (opts *HelloWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *HelloWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -299,21 +299,21 @@ func HelloAsync(ctx workflow.Context, req *v1.HelloRequest, opts ...*HelloWorkfl
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &helloRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -435,7 +435,7 @@ func GoodbyeAsync(ctx workflow.Context, workflowID string, runID string, req *v1
ctx, cancel := workflow.WithCancel(ctx)
return &goodbyeSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -480,7 +480,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// Hello executes a(n) example.v1.Hello workflow via an activity
-func (a *exampleActivities) Hello(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.HelloResponse, err error) {
+func (a *exampleActivities) Hello(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.HelloResponse, err error) {
// unmarshal workflow request
var req v1.HelloRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -540,10 +540,10 @@ func (a *exampleActivities) Hello(ctx context.Context, input *v13.WorkflowReques
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -563,7 +563,7 @@ func (a *exampleActivities) Hello(ctx context.Context, input *v13.WorkflowReques
}
// Goodbye executes a(n) example.helloworld.v1.Example.Goodbye signal via an activity
-func (a *exampleActivities) Goodbye(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) Goodbye(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.GoodbyeRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
diff --git a/gen/example/mutex/v1/mutex_temporal.pb.go b/gen/example/mutex/v1/mutex_temporal.pb.go
index 6305144f..b694ec8f 100644
--- a/gen/example/mutex/v1/mutex_temporal.pb.go
+++ b/gen/example/mutex/v1/mutex_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -17,7 +17,7 @@ import (
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -312,7 +312,7 @@ type MutexOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -337,7 +337,7 @@ func (o *MutexOptions) Build(req protoreflect.Message) (client.StartWorkflowOpti
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -389,7 +389,7 @@ func (o *MutexOptions) WithID(id string) *MutexOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *MutexOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *MutexOptions {
+func (o *MutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexOptions {
o.idReusePolicy = policy
return o
}
@@ -502,7 +502,7 @@ type SampleWorkflowWithMutexOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -527,7 +527,7 @@ func (o *SampleWorkflowWithMutexOptions) Build(req protoreflect.Message) (client
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -572,7 +572,7 @@ func (o *SampleWorkflowWithMutexOptions) WithID(id string) *SampleWorkflowWithMu
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SampleWorkflowWithMutexOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexOptions {
+func (o *SampleWorkflowWithMutexOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexOptions {
o.idReusePolicy = policy
return o
}
@@ -804,13 +804,13 @@ type MutexChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -847,7 +847,7 @@ func (o *MutexChildOptions) Build(ctx workflow.Context, req protoreflect.Message
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -877,7 +877,7 @@ func (o *MutexChildOptions) Build(ctx workflow.Context, req protoreflect.Message
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -905,13 +905,13 @@ func (o *MutexChildOptions) WithID(id string) *MutexChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *MutexChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *MutexChildOptions {
+func (o *MutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *MutexChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *MutexChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *MutexChildOptions {
+func (o *MutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *MutexChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1084,13 +1084,13 @@ type SampleWorkflowWithMutexChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -1127,7 +1127,7 @@ func (o *SampleWorkflowWithMutexChildOptions) Build(ctx workflow.Context, req pr
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -1150,7 +1150,7 @@ func (o *SampleWorkflowWithMutexChildOptions) Build(ctx workflow.Context, req pr
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -1178,13 +1178,13 @@ func (o *SampleWorkflowWithMutexChildOptions) WithID(id string) *SampleWorkflowW
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SampleWorkflowWithMutexChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexChildOptions {
+func (o *SampleWorkflowWithMutexChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SampleWorkflowWithMutexChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SampleWorkflowWithMutexChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SampleWorkflowWithMutexChildOptions {
+func (o *SampleWorkflowWithMutexChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SampleWorkflowWithMutexChildOptions {
o.parentClosePolicy = policy
return o
}
diff --git a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
index 5b7d0fa4..e90141b8 100644
--- a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
+++ b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,12 +13,12 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/mutex/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -114,7 +114,7 @@ type MutexWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -142,7 +142,7 @@ func (opts *MutexWorkflowOptions) WithHeartbeatInterval(d time.Duration) *MutexW
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *MutexWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *MutexWorkflowOptions {
+func (opts *MutexWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *MutexWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -326,21 +326,21 @@ func MutexAsync(ctx workflow.Context, req *v1.MutexInput, opts ...*MutexWorkflow
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &mutexRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -445,21 +445,21 @@ func MutexWithAcquireLockAsync(ctx workflow.Context, req *v1.MutexInput, signal
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &mutexRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -475,7 +475,7 @@ type SampleWorkflowWithMutexWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -503,7 +503,7 @@ func (opts *SampleWorkflowWithMutexWorkflowOptions) WithHeartbeatInterval(d time
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SampleWorkflowWithMutexWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SampleWorkflowWithMutexWorkflowOptions {
+func (opts *SampleWorkflowWithMutexWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SampleWorkflowWithMutexWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -671,21 +671,21 @@ func SampleWorkflowWithMutexAsync(ctx workflow.Context, req *v1.SampleWorkflowWi
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &sampleWorkflowWithMutexRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -807,7 +807,7 @@ func AcquireLockAsync(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &acquireLockSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -928,7 +928,7 @@ func LockAcquiredAsync(ctx workflow.Context, workflowID string, runID string, re
ctx, cancel := workflow.WithCancel(ctx)
return &lockAcquiredSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1049,7 +1049,7 @@ func ReleaseLockAsync(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &releaseLockSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1094,7 +1094,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// Mutex executes a(n) example.mutex.v1.Example.Mutex workflow via an activity
-func (a *exampleActivities) Mutex(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *exampleActivities) Mutex(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.MutexInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1154,10 +1154,10 @@ func (a *exampleActivities) Mutex(ctx context.Context, input *v13.WorkflowReques
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1177,7 +1177,7 @@ func (a *exampleActivities) Mutex(ctx context.Context, input *v13.WorkflowReques
}
// MutexWithAcquireLock sends a(n) example.mutex.v1.Example.AcquireLock signal to a(n) example.mutex.v1.Example.Mutex workflow via an activity
-func (a *exampleActivities) MutexWithAcquireLock(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *exampleActivities) MutexWithAcquireLock(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.MutexInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1247,10 +1247,10 @@ func (a *exampleActivities) MutexWithAcquireLock(ctx context.Context, input *v13
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1270,7 +1270,7 @@ func (a *exampleActivities) MutexWithAcquireLock(ctx context.Context, input *v13
}
// SampleWorkflowWithMutex executes a(n) example.mutex.v1.Example.SampleWorkflowWithMutex workflow via an activity
-func (a *exampleActivities) SampleWorkflowWithMutex(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *exampleActivities) SampleWorkflowWithMutex(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.SampleWorkflowWithMutexInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1330,10 +1330,10 @@ func (a *exampleActivities) SampleWorkflowWithMutex(ctx context.Context, input *
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1353,7 +1353,7 @@ func (a *exampleActivities) SampleWorkflowWithMutex(ctx context.Context, input *
}
// AcquireLock executes a(n) example.mutex.v1.Example.AcquireLock signal via an activity
-func (a *exampleActivities) AcquireLock(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) AcquireLock(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.AcquireLockInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1389,7 +1389,7 @@ func (a *exampleActivities) AcquireLock(ctx context.Context, input *v13.SignalRe
}
// LockAcquired executes a(n) example.mutex.v1.Example.LockAcquired signal via an activity
-func (a *exampleActivities) LockAcquired(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) LockAcquired(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.LockAcquiredInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1425,7 +1425,7 @@ func (a *exampleActivities) LockAcquired(ctx context.Context, input *v13.SignalR
}
// ReleaseLock executes a(n) example.mutex.v1.Example.ReleaseLock signal via an activity
-func (a *exampleActivities) ReleaseLock(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) ReleaseLock(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.ReleaseLockInput
if err := input.Request.UnmarshalTo(&req); err != nil {
diff --git a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
index 0acc1f8c..ece4baab 100644
--- a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
+++ b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -17,7 +17,7 @@ import (
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
testsuite "go.temporal.io/sdk/testsuite"
@@ -190,7 +190,7 @@ type SearchAttributesOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -215,7 +215,7 @@ func (o *SearchAttributesOptions) Build(req protoreflect.Message) (client.StartW
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -274,7 +274,7 @@ func (o *SearchAttributesOptions) WithID(id string) *SearchAttributesOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SearchAttributesOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SearchAttributesOptions {
+func (o *SearchAttributesOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SearchAttributesOptions {
o.idReusePolicy = policy
return o
}
@@ -474,13 +474,13 @@ type SearchAttributesChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -517,7 +517,7 @@ func (o *SearchAttributesChildOptions) Build(ctx workflow.Context, req protorefl
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -578,7 +578,7 @@ func (o *SearchAttributesChildOptions) Build(ctx workflow.Context, req protorefl
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -606,13 +606,13 @@ func (o *SearchAttributesChildOptions) WithID(id string) *SearchAttributesChildO
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SearchAttributesChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SearchAttributesChildOptions {
+func (o *SearchAttributesChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SearchAttributesChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SearchAttributesChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SearchAttributesChildOptions {
+func (o *SearchAttributesChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SearchAttributesChildOptions {
o.parentClosePolicy = policy
return o
}
diff --git a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
index 533179ef..40d988a4 100644
--- a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
+++ b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,12 +13,12 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/searchattributes/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -99,7 +99,7 @@ type SearchAttributesWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -127,7 +127,7 @@ func (opts *SearchAttributesWorkflowOptions) WithHeartbeatInterval(d time.Durati
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SearchAttributesWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SearchAttributesWorkflowOptions {
+func (opts *SearchAttributesWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SearchAttributesWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -279,21 +279,21 @@ func SearchAttributesAsync(ctx workflow.Context, req *v1.SearchAttributesInput,
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &searchAttributesRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -339,7 +339,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// SearchAttributes executes a(n) example.searchattributes.v1.Example.SearchAttributes workflow via an activity
-func (a *exampleActivities) SearchAttributes(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *exampleActivities) SearchAttributes(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.SearchAttributesInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -399,10 +399,10 @@ func (a *exampleActivities) SearchAttributes(ctx context.Context, input *v13.Wor
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
diff --git a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
index 579bcf56..699d5c05 100644
--- a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
+++ b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -19,7 +19,7 @@ import (
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
testsuite "go.temporal.io/sdk/testsuite"
@@ -219,7 +219,7 @@ type UpdatableTimerOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -244,7 +244,7 @@ func (o *UpdatableTimerOptions) Build(req protoreflect.Message) (client.StartWor
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -289,7 +289,7 @@ func (o *UpdatableTimerOptions) WithID(id string) *UpdatableTimerOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *UpdatableTimerOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *UpdatableTimerOptions {
+func (o *UpdatableTimerOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerOptions {
o.idReusePolicy = policy
return o
}
@@ -515,13 +515,13 @@ type UpdatableTimerChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -558,7 +558,7 @@ func (o *UpdatableTimerChildOptions) Build(ctx workflow.Context, req protoreflec
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -581,7 +581,7 @@ func (o *UpdatableTimerChildOptions) Build(ctx workflow.Context, req protoreflec
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -609,13 +609,13 @@ func (o *UpdatableTimerChildOptions) WithID(id string) *UpdatableTimerChildOptio
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *UpdatableTimerChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *UpdatableTimerChildOptions {
+func (o *UpdatableTimerChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *UpdatableTimerChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *UpdatableTimerChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *UpdatableTimerChildOptions {
+func (o *UpdatableTimerChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *UpdatableTimerChildOptions {
o.parentClosePolicy = policy
return o
}
diff --git a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
index 4d5972f3..f642ab43 100644
--- a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
+++ b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,12 +13,12 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/updatabletimer/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -105,7 +105,7 @@ type UpdatableTimerWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -133,7 +133,7 @@ func (opts *UpdatableTimerWorkflowOptions) WithHeartbeatInterval(d time.Duration
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *UpdatableTimerWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *UpdatableTimerWorkflowOptions {
+func (opts *UpdatableTimerWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *UpdatableTimerWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -317,21 +317,21 @@ func UpdatableTimerAsync(ctx workflow.Context, req *v1.UpdatableTimerInput, opts
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &updatableTimerRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -453,7 +453,7 @@ func GetWakeUpTimeAsync(ctx workflow.Context, workflowID string, runID string, o
ctx, cancel := workflow.WithCancel(ctx)
return &getWakeUpTimeQueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -573,7 +573,7 @@ func UpdateWakeUpTimeAsync(ctx workflow.Context, workflowID string, runID string
ctx, cancel := workflow.WithCancel(ctx)
return &updateWakeUpTimeSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -618,7 +618,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// UpdatableTimer executes a(n) UpdatableTimer workflow via an activity
-func (a *exampleActivities) UpdatableTimer(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *exampleActivities) UpdatableTimer(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.UpdatableTimerInput
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -678,10 +678,10 @@ func (a *exampleActivities) UpdatableTimer(ctx context.Context, input *v13.Workf
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -701,7 +701,7 @@ func (a *exampleActivities) UpdatableTimer(ctx context.Context, input *v13.Workf
}
// GetWakeUpTime executes a(n) example.updatabletimer.v1.Example.GetWakeUpTime query via an activity
-func (a *exampleActivities) GetWakeUpTime(ctx context.Context, input *v13.QueryRequest) (resp *v1.GetWakeUpTimeOutput, err error) {
+func (a *exampleActivities) GetWakeUpTime(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.GetWakeUpTimeOutput, err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -728,7 +728,7 @@ func (a *exampleActivities) GetWakeUpTime(ctx context.Context, input *v13.QueryR
}
// UpdateWakeUpTime executes a(n) example.updatabletimer.v1.Example.UpdateWakeUpTime signal via an activity
-func (a *exampleActivities) UpdateWakeUpTime(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) UpdateWakeUpTime(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.UpdateWakeUpTimeInput
if err := input.Request.UnmarshalTo(&req); err != nil {
diff --git a/gen/example/v1/example_temporal.pb.go b/gen/example/v1/example_temporal.pb.go
index a04dad43..a4fa69bf 100644
--- a/gen/example/v1/example_temporal.pb.go
+++ b/gen/example/v1/example_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -20,9 +20,9 @@ import (
testutil "github.com/cludden/protoc-gen-go-temporal/pkg/testutil"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
serviceerror "go.temporal.io/api/serviceerror"
- v11 "go.temporal.io/api/update/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -288,7 +288,7 @@ func (c *exampleClient) UpdateFooProgress(ctx context.Context, workflowID string
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -334,7 +334,7 @@ type CreateFooOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -359,10 +359,10 @@ func (o *CreateFooOptions) Build(req protoreflect.Message) (client.StartWorkflow
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -408,7 +408,7 @@ func (o *CreateFooOptions) WithID(id string) *CreateFooOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CreateFooOptions {
+func (o *CreateFooOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CreateFooOptions {
o.idReusePolicy = policy
return o
}
@@ -603,7 +603,7 @@ func (h *updateFooProgressHandle) Get(ctx context.Context) (*GetFooProgressRespo
type UpdateFooProgressOptions struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewUpdateFooProgressOptions initializes a new UpdateFooProgressOptions value
@@ -638,8 +638,8 @@ func (o *UpdateFooProgressOptions) Build(workflowID string, runID string, req *S
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
}
return opts, nil
}
@@ -657,7 +657,7 @@ func (o *UpdateFooProgressOptions) WithUpdateWorkflowOptions(options client.Upda
}
// WithWaitPolicy sets the WaitPolicy
-func (o *UpdateFooProgressOptions) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *UpdateFooProgressOptions {
+func (o *UpdateFooProgressOptions) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *UpdateFooProgressOptions {
o.waitPolicy = policy
return o
}
@@ -789,13 +789,13 @@ type CreateFooChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -832,10 +832,10 @@ func (o *CreateFooChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -859,7 +859,7 @@ func (o *CreateFooChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -887,13 +887,13 @@ func (o *CreateFooChildOptions) WithID(id string) *CreateFooChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CreateFooChildOptions {
+func (o *CreateFooChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CreateFooChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *CreateFooChildOptions {
+func (o *CreateFooChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CreateFooChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1397,7 +1397,7 @@ func (c *TestExampleClient) UpdateFooProgress(ctx context.Context, workflowID st
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
diff --git a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
index a281599e..b24fbb50 100644
--- a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
+++ b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,13 +13,13 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
- v14 "go.temporal.io/api/update/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -112,7 +112,7 @@ type CreateFooWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -140,7 +140,7 @@ func (opts *CreateFooWorkflowOptions) WithHeartbeatInterval(d time.Duration) *Cr
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *CreateFooWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *CreateFooWorkflowOptions {
+func (opts *CreateFooWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CreateFooWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -341,21 +341,21 @@ func CreateFooAsync(ctx workflow.Context, req *v1.CreateFooRequest, opts ...*Cre
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &createFooRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -460,21 +460,21 @@ func CreateFooWithSetFooProgressAsync(ctx workflow.Context, req *v1.CreateFooReq
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &createFooRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -597,7 +597,7 @@ func GetFooProgressAsync(ctx workflow.Context, workflowID string, runID string,
ctx, cancel := workflow.WithCancel(ctx)
return &getFooProgressQueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -717,7 +717,7 @@ func SetFooProgressAsync(ctx workflow.Context, workflowID string, runID string,
ctx, cancel := workflow.WithCancel(ctx)
return &setFooProgressSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -899,7 +899,7 @@ func UpdateFooProgressAsync(ctx workflow.Context, workflowID string, runID strin
return &updateFooProgressHandle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -943,7 +943,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// CreateFoo executes a(n) example.v1.Example.CreateFoo workflow via an activity
-func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
+func (a *exampleActivities) CreateFoo(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
// unmarshal workflow request
var req v1.CreateFooRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1003,10 +1003,10 @@ func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRe
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1026,7 +1026,7 @@ func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRe
}
// CreateFooWithSetFooProgress sends a(n) example.v1.Example.SetFooProgress signal to a(n) example.v1.Example.CreateFoo workflow via an activity
-func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
+func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
// unmarshal workflow request
var req v1.CreateFooRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1096,10 +1096,10 @@ func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, inp
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1119,7 +1119,7 @@ func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, inp
}
// GetFooProgress executes a(n) example.v1.Example.GetFooProgress query via an activity
-func (a *exampleActivities) GetFooProgress(ctx context.Context, input *v13.QueryRequest) (resp *v1.GetFooProgressResponse, err error) {
+func (a *exampleActivities) GetFooProgress(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.GetFooProgressResponse, err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -1146,7 +1146,7 @@ func (a *exampleActivities) GetFooProgress(ctx context.Context, input *v13.Query
}
// SetFooProgress executes a(n) example.v1.Example.SetFooProgress signal via an activity
-func (a *exampleActivities) SetFooProgress(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) SetFooProgress(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.SetFooProgressRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1182,7 +1182,7 @@ func (a *exampleActivities) SetFooProgress(ctx context.Context, input *v13.Signa
}
// UpdateFooProgress executes a(n) example.v1.Example.UpdateFooProgress update via an activity
-func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *v13.UpdateRequest) (resp *v1.GetFooProgressResponse, err error) {
+func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.GetFooProgressResponse, err error) {
var handle v1.UpdateFooProgressHandle
if activity.HasHeartbeatDetails(ctx) {
// extract update id from heartbeat details
@@ -1212,8 +1212,8 @@ func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *v13.Up
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
diff --git a/gen/example/xns/v1/xns_temporal.pb.go b/gen/example/xns/v1/xns_temporal.pb.go
index 9a0828f6..261542ba 100644
--- a/gen/example/xns/v1/xns_temporal.pb.go
+++ b/gen/example/xns/v1/xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -20,9 +20,9 @@ import (
testutil "github.com/cludden/protoc-gen-go-temporal/pkg/testutil"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
serviceerror "go.temporal.io/api/serviceerror"
- v11 "go.temporal.io/api/update/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -191,7 +191,7 @@ type ProvisionFooOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -216,7 +216,7 @@ func (o *ProvisionFooOptions) Build(req protoreflect.Message) (client.StartWorkf
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -261,7 +261,7 @@ func (o *ProvisionFooOptions) WithID(id string) *ProvisionFooOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *ProvisionFooOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *ProvisionFooOptions {
+func (o *ProvisionFooOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ProvisionFooOptions {
o.idReusePolicy = policy
return o
}
@@ -465,13 +465,13 @@ type ProvisionFooChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -508,7 +508,7 @@ func (o *ProvisionFooChildOptions) Build(ctx workflow.Context, req protoreflect.
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -531,7 +531,7 @@ func (o *ProvisionFooChildOptions) Build(ctx workflow.Context, req protoreflect.
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -559,13 +559,13 @@ func (o *ProvisionFooChildOptions) WithID(id string) *ProvisionFooChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *ProvisionFooChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *ProvisionFooChildOptions {
+func (o *ProvisionFooChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *ProvisionFooChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *ProvisionFooChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *ProvisionFooChildOptions {
+func (o *ProvisionFooChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ProvisionFooChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1235,7 +1235,7 @@ func (c *exampleClient) UpdateFooProgress(ctx context.Context, workflowID string
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -1281,7 +1281,7 @@ type CreateFooOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -1306,10 +1306,10 @@ func (o *CreateFooOptions) Build(req protoreflect.Message) (client.StartWorkflow
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -1355,7 +1355,7 @@ func (o *CreateFooOptions) WithID(id string) *CreateFooOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CreateFooOptions {
+func (o *CreateFooOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CreateFooOptions {
o.idReusePolicy = policy
return o
}
@@ -1550,7 +1550,7 @@ func (h *updateFooProgressHandle) Get(ctx context.Context) (*GetFooProgressRespo
type UpdateFooProgressOptions struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewUpdateFooProgressOptions initializes a new UpdateFooProgressOptions value
@@ -1585,8 +1585,8 @@ func (o *UpdateFooProgressOptions) Build(workflowID string, runID string, req *S
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
}
return opts, nil
}
@@ -1604,7 +1604,7 @@ func (o *UpdateFooProgressOptions) WithUpdateWorkflowOptions(options client.Upda
}
// WithWaitPolicy sets the WaitPolicy
-func (o *UpdateFooProgressOptions) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *UpdateFooProgressOptions {
+func (o *UpdateFooProgressOptions) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *UpdateFooProgressOptions {
o.waitPolicy = policy
return o
}
@@ -1736,13 +1736,13 @@ type CreateFooChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -1779,10 +1779,10 @@ func (o *CreateFooChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -1806,7 +1806,7 @@ func (o *CreateFooChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -1834,13 +1834,13 @@ func (o *CreateFooChildOptions) WithID(id string) *CreateFooChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CreateFooChildOptions {
+func (o *CreateFooChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CreateFooChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *CreateFooChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *CreateFooChildOptions {
+func (o *CreateFooChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CreateFooChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -2344,7 +2344,7 @@ func (c *TestExampleClient) UpdateFooProgress(ctx context.Context, workflowID st
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.UpdateFooProgressAsync(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
diff --git a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
index 4058997f..cd3ea295 100644
--- a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
+++ b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -13,13 +13,13 @@ import (
"errors"
"fmt"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/example/xns/v1"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
- v14 "go.temporal.io/api/update/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -100,7 +100,7 @@ type ProvisionFooWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -128,7 +128,7 @@ func (opts *ProvisionFooWorkflowOptions) WithHeartbeatInterval(d time.Duration)
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *ProvisionFooWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *ProvisionFooWorkflowOptions {
+func (opts *ProvisionFooWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ProvisionFooWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -281,21 +281,21 @@ func ProvisionFooAsync(ctx workflow.Context, req *v1.ProvisionFooRequest, opts .
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &provisionFooRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -341,7 +341,7 @@ func (a *xnsActivities) CancelWorkflow(ctx context.Context, workflowID string, r
}
// ProvisionFoo executes a(n) example.xns.v1.Xns.ProvisionFoo workflow via an activity
-func (a *xnsActivities) ProvisionFoo(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.ProvisionFooResponse, err error) {
+func (a *xnsActivities) ProvisionFoo(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.ProvisionFooResponse, err error) {
// unmarshal workflow request
var req v1.ProvisionFooRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -401,10 +401,10 @@ func (a *xnsActivities) ProvisionFoo(ctx context.Context, input *v13.WorkflowReq
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -505,7 +505,7 @@ type CreateFooWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -533,7 +533,7 @@ func (opts *CreateFooWorkflowOptions) WithHeartbeatInterval(d time.Duration) *Cr
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *CreateFooWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *CreateFooWorkflowOptions {
+func (opts *CreateFooWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CreateFooWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -734,21 +734,21 @@ func CreateFooAsync(ctx workflow.Context, req *v1.CreateFooRequest, opts ...*Cre
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &createFooRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -853,21 +853,21 @@ func CreateFooWithSetFooProgressAsync(ctx workflow.Context, req *v1.CreateFooReq
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &createFooRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -990,7 +990,7 @@ func GetFooProgressAsync(ctx workflow.Context, workflowID string, runID string,
ctx, cancel := workflow.WithCancel(ctx)
return &getFooProgressQueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1110,7 +1110,7 @@ func SetFooProgressAsync(ctx workflow.Context, workflowID string, runID string,
ctx, cancel := workflow.WithCancel(ctx)
return &setFooProgressSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1292,7 +1292,7 @@ func UpdateFooProgressAsync(ctx workflow.Context, workflowID string, runID strin
return &updateFooProgressHandle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -1336,7 +1336,7 @@ func (a *exampleActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// CreateFoo executes a(n) example.xns.v1.Example.CreateFoo workflow via an activity
-func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
+func (a *exampleActivities) CreateFoo(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
// unmarshal workflow request
var req v1.CreateFooRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1396,10 +1396,10 @@ func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRe
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1419,7 +1419,7 @@ func (a *exampleActivities) CreateFoo(ctx context.Context, input *v13.WorkflowRe
}
// CreateFooWithSetFooProgress sends a(n) example.xns.v1.Example.SetFooProgress signal to a(n) example.xns.v1.Example.CreateFoo workflow via an activity
-func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
+func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.CreateFooResponse, err error) {
// unmarshal workflow request
var req v1.CreateFooRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1489,10 +1489,10 @@ func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, inp
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1512,7 +1512,7 @@ func (a *exampleActivities) CreateFooWithSetFooProgress(ctx context.Context, inp
}
// GetFooProgress executes a(n) example.xns.v1.Example.GetFooProgress query via an activity
-func (a *exampleActivities) GetFooProgress(ctx context.Context, input *v13.QueryRequest) (resp *v1.GetFooProgressResponse, err error) {
+func (a *exampleActivities) GetFooProgress(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.GetFooProgressResponse, err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -1539,7 +1539,7 @@ func (a *exampleActivities) GetFooProgress(ctx context.Context, input *v13.Query
}
// SetFooProgress executes a(n) example.xns.v1.Example.SetFooProgress signal via an activity
-func (a *exampleActivities) SetFooProgress(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *exampleActivities) SetFooProgress(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.SetFooProgressRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1575,7 +1575,7 @@ func (a *exampleActivities) SetFooProgress(ctx context.Context, input *v13.Signa
}
// UpdateFooProgress executes a(n) example.xns.v1.Example.UpdateFooProgress update via an activity
-func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *v13.UpdateRequest) (resp *v1.GetFooProgressResponse, err error) {
+func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.GetFooProgressResponse, err error) {
var handle v1.UpdateFooProgressHandle
if activity.HasHeartbeatDetails(ctx) {
// extract update id from heartbeat details
@@ -1605,8 +1605,8 @@ func (a *exampleActivities) UpdateFooProgress(ctx context.Context, input *v13.Up
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
diff --git a/gen/test/option/v1/option_temporal.pb.go b/gen/test/option/v1/option_temporal.pb.go
index 784ca176..243d0267 100644
--- a/gen/test/option/v1/option_temporal.pb.go
+++ b/gen/test/option/v1/option_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -18,9 +18,9 @@ import (
testutil "github.com/cludden/protoc-gen-go-temporal/pkg/testutil"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
serviceerror "go.temporal.io/api/serviceerror"
- v11 "go.temporal.io/api/update/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -222,7 +222,7 @@ func (c *testClient) UpdateWithInput(ctx context.Context, workflowID string, run
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.UpdateWithInputAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.UpdateWithInputAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return err
}
@@ -268,7 +268,7 @@ type WorkflowWithInputOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -293,10 +293,10 @@ func (o *WorkflowWithInputOptions) Build(req protoreflect.Message) (client.Start
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -364,7 +364,7 @@ func (o *WorkflowWithInputOptions) WithID(id string) *WorkflowWithInputOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *WorkflowWithInputOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *WorkflowWithInputOptions {
+func (o *WorkflowWithInputOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *WorkflowWithInputOptions {
o.idReusePolicy = policy
return o
}
@@ -535,7 +535,7 @@ func (h *updateWithInputHandle) Get(ctx context.Context) error {
type UpdateWithInputOptions struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewUpdateWithInputOptions initializes a new UpdateWithInputOptions value
@@ -570,10 +570,10 @@ func (o *UpdateWithInputOptions) Build(workflowID string, runID string, req *Upd
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
- } else if opts.WaitPolicy.GetLifecycleStage() == v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
+ } else if opts.WaitPolicy.GetLifecycleStage() == enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
}
return opts, nil
}
@@ -591,7 +591,7 @@ func (o *UpdateWithInputOptions) WithUpdateWorkflowOptions(options client.Update
}
// WithWaitPolicy sets the WaitPolicy
-func (o *UpdateWithInputOptions) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *UpdateWithInputOptions {
+func (o *UpdateWithInputOptions) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *UpdateWithInputOptions {
o.waitPolicy = policy
return o
}
@@ -713,13 +713,13 @@ type WorkflowWithInputChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -756,10 +756,10 @@ func (o *WorkflowWithInputChildOptions) Build(ctx workflow.Context, req protoref
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -829,10 +829,10 @@ func (o *WorkflowWithInputChildOptions) Build(ctx workflow.Context, req protoref
} else if opts.WorkflowTaskTimeout == 0 {
opts.WorkflowTaskTimeout = 10000000000 // 10 seconds
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
- } else if opts.ParentClosePolicy == v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
- opts.ParentClosePolicy = v1.PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ } else if opts.ParentClosePolicy == enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ opts.ParentClosePolicy = enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL
}
if v := o.waitForCancellation; v != nil {
opts.WaitForCancellation = *v
@@ -861,13 +861,13 @@ func (o *WorkflowWithInputChildOptions) WithID(id string) *WorkflowWithInputChil
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *WorkflowWithInputChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *WorkflowWithInputChildOptions {
+func (o *WorkflowWithInputChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *WorkflowWithInputChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *WorkflowWithInputChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *WorkflowWithInputChildOptions {
+func (o *WorkflowWithInputChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *WorkflowWithInputChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1278,7 +1278,7 @@ func (c *TestTestClient) UpdateWithInput(ctx context.Context, workflowID string,
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.UpdateWithInputAsync(ctx, workflowID, runID, req, options)
if err != nil {
return err
diff --git a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
index 3d93d0d3..4860f6a2 100644
--- a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
+++ b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -12,14 +12,14 @@ import (
"context"
"errors"
"fmt"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/option/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
- v14 "go.temporal.io/api/update/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -103,7 +103,7 @@ type WorkflowWithInputWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -131,7 +131,7 @@ func (opts *WorkflowWithInputWorkflowOptions) WithHeartbeatInterval(d time.Durat
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *WorkflowWithInputWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *WorkflowWithInputWorkflowOptions {
+func (opts *WorkflowWithInputWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *WorkflowWithInputWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -299,21 +299,21 @@ func WorkflowWithInputAsync(ctx workflow.Context, req *v1.WorkflowWithInputReque
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- parentClosePolicy := v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ parentClosePolicy := temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &workflowWithInputRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -495,7 +495,7 @@ func UpdateWithInputAsync(ctx workflow.Context, workflowID string, runID string,
return &updateWithInputHandle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -539,7 +539,7 @@ func (a *testActivities) CancelWorkflow(ctx context.Context, workflowID string,
}
// WorkflowWithInput executes a(n) test.option.v1.Test.WorkflowWithInput workflow via an activity
-func (a *testActivities) WorkflowWithInput(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *testActivities) WorkflowWithInput(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.WorkflowWithInputRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -599,10 +599,10 @@ func (a *testActivities) WorkflowWithInput(ctx context.Context, input *v13.Workf
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -622,7 +622,7 @@ func (a *testActivities) WorkflowWithInput(ctx context.Context, input *v13.Workf
}
// UpdateWithInput executes a(n) test.option.v1.Test.UpdateWithInput update via an activity
-func (a *testActivities) UpdateWithInput(ctx context.Context, input *v13.UpdateRequest) (err error) {
+func (a *testActivities) UpdateWithInput(ctx context.Context, input *xnsv1.UpdateRequest) (err error) {
var handle v1.UpdateWithInputHandle
if activity.HasHeartbeatDetails(ctx) {
// extract update id from heartbeat details
@@ -652,8 +652,8 @@ func (a *testActivities) UpdateWithInput(ctx context.Context, input *v13.UpdateR
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
diff --git a/gen/test/simple/common/v1/common.pb.go b/gen/test/simple/common/v1/common.pb.go
new file mode 100644
index 00000000..e631f50b
--- /dev/null
+++ b/gen/test/simple/common/v1/common.pb.go
@@ -0,0 +1,250 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.34.1
+// protoc (unknown)
+// source: test/simple/common/v1/common.proto
+
+// buf:lint:ignore PACKAGE_DIRECTORY_MATCH
+
+package commonv1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PaginatedRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
+ Cursor []byte `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
+}
+
+func (x *PaginatedRequest) Reset() {
+ *x = PaginatedRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_simple_common_v1_common_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PaginatedRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaginatedRequest) ProtoMessage() {}
+
+func (x *PaginatedRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_test_simple_common_v1_common_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PaginatedRequest.ProtoReflect.Descriptor instead.
+func (*PaginatedRequest) Descriptor() ([]byte, []int) {
+ return file_test_simple_common_v1_common_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PaginatedRequest) GetLimit() uint32 {
+ if x != nil {
+ return x.Limit
+ }
+ return 0
+}
+
+func (x *PaginatedRequest) GetCursor() []byte {
+ if x != nil {
+ return x.Cursor
+ }
+ return nil
+}
+
+type PaginatedResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Items []*anypb.Any `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+ NextCursor []byte `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
+}
+
+func (x *PaginatedResponse) Reset() {
+ *x = PaginatedResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_simple_common_v1_common_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PaginatedResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaginatedResponse) ProtoMessage() {}
+
+func (x *PaginatedResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_test_simple_common_v1_common_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PaginatedResponse.ProtoReflect.Descriptor instead.
+func (*PaginatedResponse) Descriptor() ([]byte, []int) {
+ return file_test_simple_common_v1_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PaginatedResponse) GetItems() []*anypb.Any {
+ if x != nil {
+ return x.Items
+ }
+ return nil
+}
+
+func (x *PaginatedResponse) GetNextCursor() []byte {
+ if x != nil {
+ return x.NextCursor
+ }
+ return nil
+}
+
+var File_test_simple_common_v1_common_proto protoreflect.FileDescriptor
+
+var file_test_simple_common_v1_common_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e,
+ 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
+ 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x10, 0x50,
+ 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
+ 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x60, 0x0a,
+ 0x11, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x42,
+ 0x86, 0x02, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
+ 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c,
+ 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
+ 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e,
+ 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x31, 0xa2,
+ 0x02, 0x03, 0x4d, 0x53, 0x43, 0xaa, 0x02, 0x1a, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
+ 0x56, 0x31, 0xca, 0x02, 0x1a, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5c, 0x53,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2,
+ 0x02, 0x26, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5c, 0x53, 0x69, 0x6d, 0x70,
+ 0x6c, 0x65, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x4d, 0x79, 0x63, 0x6f, 0x6d,
+ 0x70, 0x61, 0x6e, 0x79, 0x3a, 0x3a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_test_simple_common_v1_common_proto_rawDescOnce sync.Once
+ file_test_simple_common_v1_common_proto_rawDescData = file_test_simple_common_v1_common_proto_rawDesc
+)
+
+func file_test_simple_common_v1_common_proto_rawDescGZIP() []byte {
+ file_test_simple_common_v1_common_proto_rawDescOnce.Do(func() {
+ file_test_simple_common_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_simple_common_v1_common_proto_rawDescData)
+ })
+ return file_test_simple_common_v1_common_proto_rawDescData
+}
+
+var file_test_simple_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_test_simple_common_v1_common_proto_goTypes = []interface{}{
+ (*PaginatedRequest)(nil), // 0: mycompany.simple.common.v1.PaginatedRequest
+ (*PaginatedResponse)(nil), // 1: mycompany.simple.common.v1.PaginatedResponse
+ (*anypb.Any)(nil), // 2: google.protobuf.Any
+}
+var file_test_simple_common_v1_common_proto_depIdxs = []int32{
+ 2, // 0: mycompany.simple.common.v1.PaginatedResponse.items:type_name -> google.protobuf.Any
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_test_simple_common_v1_common_proto_init() }
+func file_test_simple_common_v1_common_proto_init() {
+ if File_test_simple_common_v1_common_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_test_simple_common_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PaginatedRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_test_simple_common_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PaginatedResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_test_simple_common_v1_common_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_test_simple_common_v1_common_proto_goTypes,
+ DependencyIndexes: file_test_simple_common_v1_common_proto_depIdxs,
+ MessageInfos: file_test_simple_common_v1_common_proto_msgTypes,
+ }.Build()
+ File_test_simple_common_v1_common_proto = out.File
+ file_test_simple_common_v1_common_proto_rawDesc = nil
+ file_test_simple_common_v1_common_proto_goTypes = nil
+ file_test_simple_common_v1_common_proto_depIdxs = nil
+}
diff --git a/gen/test/simple/v1/simple.pb.go b/gen/test/simple/v1/simple.pb.go
index 1b984627..c8a178e7 100644
--- a/gen/test/simple/v1/simple.pb.go
+++ b/gen/test/simple/v1/simple.pb.go
@@ -10,6 +10,7 @@ package v1
import (
_ "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
@@ -1699,412 +1700,424 @@ var file_test_simple_v1_simple_proto_rawDesc = []byte{
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x74,
0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6f,
- 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x14, 0x53, 0x6f, 0x6d,
- 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56,
- 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
- 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
- 0x6f, 0x77, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x47,
- 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x33, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x41,
- 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c,
- 0x22, 0x37, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
- 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x6f, 0x6d,
- 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76,
- 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x34,
- 0x0a, 0x11, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x52, 0x65, 0x71, 0x75,
+ 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x74, 0x65, 0x73, 0x74, 0x2f,
+ 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31,
+ 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a,
+ 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f,
+ 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56,
+ 0x61, 0x6c, 0x22, 0x47, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
+ 0x6f, 0x77, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x14, 0x53,
+ 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x32, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76,
0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72,
- 0x79, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a,
- 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76,
- 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x13, 0x53,
- 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76,
- 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x13,
- 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f,
- 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0xae, 0x09, 0x0a, 0x14, 0x4f, 0x74, 0x68, 0x65, 0x72,
- 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x19, 0x0a, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x03, 0x62, 0x61,
- 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
- 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72,
- 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
- 0x42, 0x61, 0x7a, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x12, 0x27, 0x0a, 0x03, 0x71, 0x75, 0x78, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
- 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x78, 0x52, 0x03, 0x71, 0x75,
- 0x78, 0x12, 0x29, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
- 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
- 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x48, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x3e, 0x0a, 0x03,
- 0x62, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x79, 0x63, 0x6f,
- 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68,
- 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x2e, 0x42, 0x61, 0x72, 0x48, 0x00, 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x25, 0x0a, 0x0d,
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20,
- 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x42, 0x79,
- 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x64,
- 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0d,
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x08, 0x20,
- 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x6c,
- 0x6f, 0x61, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x69,
- 0x6e, 0x74, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28,
- 0x03, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x36,
- 0x34, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x75, 0x69, 0x6e,
- 0x74, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61,
- 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01,
- 0x28, 0x04, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x69, 0x6e,
- 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73,
- 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x11, 0x48, 0x00, 0x52, 0x0d, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27, 0x0a, 0x0e,
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x0e,
- 0x20, 0x01, 0x28, 0x12, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53,
- 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00,
- 0x52, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32,
- 0x12, 0x29, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x78, 0x65,
- 0x64, 0x36, 0x34, 0x18, 0x10, 0x20, 0x01, 0x28, 0x06, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x78, 0x61,
- 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x2b, 0x0a, 0x10, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18,
- 0x11, 0x20, 0x01, 0x28, 0x0f, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x10, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x12, 0x20, 0x01,
- 0x28, 0x10, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x66, 0x69,
- 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x23, 0x0a, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x04, 0x71, 0x75,
- 0x75, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x71, 0x75, 0x75, 0x78,
- 0x12, 0x46, 0x0a, 0x10, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x49, 0x0a, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x17, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00,
- 0x52, 0x10, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
- 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x65, 0x6e,
- 0x75, 0x6d, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65,
- 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x17, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62,
- 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x61, 0x72, 0x1a, 0x17, 0x0a,
- 0x03, 0x42, 0x61, 0x7a, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x42, 0x0f, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x17, 0x0a, 0x15, 0x4f, 0x74, 0x68, 0x65, 0x72,
- 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x2c, 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x28,
- 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65,
- 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
- 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f,
- 0x64, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x03, 0x46, 0x6f, 0x6f,
- 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66,
- 0x6f, 0x6f, 0x22, 0x17, 0x0a, 0x03, 0x51, 0x75, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x75, 0x78,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x71, 0x75, 0x78, 0x22, 0x21, 0x0a, 0x0b, 0x57,
- 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6c,
- 0x61, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6c, 0x61, 0x68, 0x22, 0x18,
- 0x0a, 0x16, 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
- 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x6f, 0x6e, 0x65,
- 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65,
- 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x40, 0x0a, 0x09,
- 0x4f, 0x74, 0x68, 0x65, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x54, 0x48,
- 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
- 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x01, 0x12,
- 0x0d, 0x0a, 0x09, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x02, 0x32, 0xcb,
- 0x0d, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x86, 0x02, 0x0a, 0x0d, 0x53, 0x6f,
- 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x12, 0x26, 0x2e, 0x6d, 0x79,
- 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53,
- 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e,
- 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66,
- 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x8a,
- 0xc4, 0x03, 0x9e, 0x01, 0x0a, 0x0c, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72,
- 0x79, 0x31, 0x0a, 0x0c, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32,
- 0x12, 0x0d, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x12,
- 0x0d, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x2a, 0x28,
- 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x31, 0x2f,
- 0x24, 0x7b, 0x21, 0x20, 0x69, 0x64, 0x20, 0x7d, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x75, 0x75, 0x69,
- 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x20, 0x7d, 0x72, 0x1e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
+ 0x74, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69,
+ 0x76, 0x69, 0x74, 0x79, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x3a, 0x0a,
+ 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x33, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x12, 0x53, 0x6f, 0x6d,
+ 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56,
+ 0x61, 0x6c, 0x22, 0x34, 0x0a, 0x11, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x37, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21,
+ 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61,
+ 0x6c, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6f, 0x6d, 0x65,
+ 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x22,
+ 0x38, 0x0a, 0x13, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6f, 0x6d,
+ 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c,
+ 0x22, 0x38, 0x0a, 0x13, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x22, 0xae, 0x09, 0x0a, 0x14, 0x4f,
+ 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x12, 0x3c,
+ 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x79,
+ 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f,
+ 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x2e, 0x42, 0x61, 0x7a, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x12, 0x27, 0x0a, 0x03,
+ 0x71, 0x75, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x79, 0x63, 0x6f,
+ 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x78,
+ 0x52, 0x03, 0x71, 0x75, 0x78, 0x12, 0x29, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x48, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f,
+ 0x12, 0x3e, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x61, 0x72, 0x48, 0x00, 0x52, 0x03, 0x62, 0x61, 0x72,
+ 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65,
+ 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48,
+ 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65,
+ 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61,
+ 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00,
+ 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x25,
+ 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52,
+ 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x27,
+ 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34,
+ 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x11, 0x48,
+ 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32,
+ 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x12, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x0f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0f, 0x20, 0x01,
+ 0x28, 0x07, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x78,
+ 0x65, 0x64, 0x33, 0x32, 0x12, 0x29, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f,
+ 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x10, 0x20, 0x01, 0x28, 0x06, 0x48, 0x00, 0x52,
+ 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12,
+ 0x2b, 0x0a, 0x10, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65,
+ 0x64, 0x33, 0x32, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0f, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x2b, 0x0a, 0x10,
+ 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
+ 0x18, 0x12, 0x20, 0x01, 0x28, 0x10, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x23, 0x0a, 0x0c, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x48,
+ 0x00, 0x52, 0x0b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x14,
+ 0x0a, 0x04, 0x71, 0x75, 0x75, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04,
+ 0x71, 0x75, 0x75, 0x78, 0x12, 0x46, 0x0a, 0x10, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f,
+ 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d,
+ 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x16, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x49, 0x0a, 0x11, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d,
+ 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
+ 0x4f, 0x74, 0x68, 0x65, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x17, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12,
+ 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x61,
+ 0x72, 0x1a, 0x17, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x42, 0x0f, 0x0a, 0x0d, 0x65, 0x78,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x17, 0x0a, 0x15, 0x4f,
+ 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x51, 0x75, 0x65,
+ 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x22, 0x28, 0x0a, 0x12, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x28, 0x0a, 0x12,
+ 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a,
+ 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x22, 0x17, 0x0a, 0x03, 0x51, 0x75, 0x78, 0x12, 0x10, 0x0a,
+ 0x03, 0x71, 0x75, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x71, 0x75, 0x78, 0x22,
+ 0x21, 0x0a, 0x0b, 0x57, 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
+ 0x0a, 0x04, 0x62, 0x6c, 0x61, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6c,
+ 0x61, 0x68, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69,
+ 0x76, 0x69, 0x74, 0x79, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, 0x17,
+ 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x2a, 0x40, 0x0a, 0x09, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x15, 0x0a,
+ 0x11, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x46, 0x4f,
+ 0x4f, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x42, 0x41, 0x52,
+ 0x10, 0x02, 0x32, 0xe1, 0x0e, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x86, 0x02,
+ 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x12,
+ 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70,
+ 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57,
- 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x8a, 0x01, 0x17, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
- 0x77, 0x31, 0x12, 0xad, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66,
- 0x6c, 0x6f, 0x77, 0x32, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x6c, 0x8a, 0xc4, 0x03, 0x68, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x6f,
- 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x10, 0x01, 0x1a, 0x0d, 0x0a, 0x0b, 0x53,
- 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x2a, 0x1f, 0x73, 0x6f, 0x6d, 0x65,
- 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x32, 0x2f, 0x24, 0x7b, 0x21, 0x20,
- 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x20, 0x7d, 0x72, 0x1e, 0x6d, 0x79, 0x63,
- 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f,
- 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x92, 0x01, 0x04, 0x08, 0x01,
- 0x10, 0x02, 0x12, 0xb7, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66,
- 0x6c, 0x6f, 0x77, 0x33, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
- 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b,
- 0x66, 0x6c, 0x6f, 0x77, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x66, 0x8a, 0xc4, 0x03, 0x5f, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x6f,
- 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x10, 0x01, 0x22, 0x03, 0x08, 0x90, 0x1c,
- 0x2a, 0x29, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2d,
- 0x33, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x69, 0x64, 0x20, 0x7d, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x72,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x20, 0x7d, 0x30, 0x01, 0x4a, 0x02, 0x20,
- 0x02, 0x5a, 0x0f, 0x6d, 0x79, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65,
- 0x2d, 0x32, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x03, 0x88, 0x02, 0x01, 0x12, 0x65, 0x0a, 0x0d,
- 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x16, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x92,
- 0xc4, 0x03, 0x20, 0x3a, 0x1e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
- 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
- 0x74, 0x79, 0x31, 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76,
- 0x69, 0x74, 0x79, 0x32, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
- 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69,
- 0x76, 0x69, 0x74, 0x79, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0x92, 0xc4, 0x03, 0x0c, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04,
- 0x1a, 0x02, 0x08, 0x1e, 0x40, 0x01, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41,
- 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x33, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
+ 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0xa3, 0x01, 0x8a, 0xc4, 0x03, 0x9e, 0x01, 0x0a, 0x0c, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x0a, 0x0c, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x32, 0x12, 0x0d, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e,
+ 0x61, 0x6c, 0x31, 0x12, 0x0d, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x32, 0x2a, 0x28, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
+ 0x77, 0x2d, 0x31, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x69, 0x64, 0x20, 0x7d, 0x2f, 0x24, 0x7b, 0x21,
+ 0x20, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x20, 0x7d, 0x72, 0x1e, 0x6d, 0x79,
+ 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53,
+ 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x8a, 0x01, 0x17, 0x6d,
+ 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72,
+ 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x12, 0xad, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57,
+ 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x6c, 0x8a, 0xc4, 0x03, 0x68, 0x12, 0x0f,
+ 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x10, 0x01, 0x1a,
+ 0x0d, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x2a, 0x1f,
+ 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x32, 0x2f,
+ 0x24, 0x7b, 0x21, 0x20, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x20, 0x7d, 0x72,
+ 0x1e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x92,
+ 0x01, 0x04, 0x08, 0x01, 0x10, 0x02, 0x12, 0xb7, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57,
+ 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x33, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
- 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
- 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
- 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x92, 0xc4, 0x03, 0x1f, 0x0a,
- 0x15, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b,
- 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x02, 0x20, 0x05, 0x12, 0x73,
- 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x34, 0x12,
+ 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x66, 0x8a, 0xc4, 0x03, 0x5f, 0x12, 0x0f,
+ 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x10, 0x01, 0x22,
+ 0x03, 0x08, 0x90, 0x1c, 0x2a, 0x29, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66,
+ 0x6c, 0x6f, 0x77, 0x2d, 0x33, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x69, 0x64, 0x20, 0x7d, 0x2f, 0x24,
+ 0x7b, 0x21, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x20, 0x7d, 0x30,
+ 0x01, 0x4a, 0x02, 0x20, 0x02, 0x5a, 0x0f, 0x6d, 0x79, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71,
+ 0x75, 0x65, 0x75, 0x65, 0x2d, 0x32, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x03, 0x88, 0x02, 0x01,
+ 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
+ 0x77, 0x34, 0x12, 0x2c, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x2d, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61,
+ 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x25, 0x8a, 0xc4, 0x03, 0x21, 0x2a, 0x1f, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x77, 0x6f, 0x72, 0x6b,
+ 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x34, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x75, 0x75, 0x69, 0x64, 0x5f,
+ 0x76, 0x34, 0x28, 0x29, 0x20, 0x7d, 0x12, 0x65, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63,
+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
- 0x32, 0x92, 0xc4, 0x03, 0x2e, 0x0a, 0x15, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6f, 0x74, 0x68, 0x65,
- 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x03, 0x08, 0xac,
- 0x02, 0x1a, 0x02, 0x08, 0x05, 0x22, 0x02, 0x08, 0x3c, 0x2a, 0x02, 0x08, 0x1e, 0x32, 0x02, 0x20,
- 0x05, 0x40, 0x01, 0x12, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79,
- 0x31, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f,
- 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d,
- 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
- 0x04, 0x9a, 0xc4, 0x03, 0x00, 0x12, 0x5d, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x32, 0x12, 0x23, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e,
- 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79,
- 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
- 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04,
- 0x9a, 0xc4, 0x03, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e,
- 0x61, 0x6c, 0x31, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
- 0x70, 0x74, 0x79, 0x22, 0x0c, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xa2, 0xc4, 0x03,
- 0x00, 0x12, 0x59, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32,
- 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
- 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x52,
+ 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x92, 0xc4, 0x03, 0x20, 0x3a, 0x1e, 0x6d,
+ 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
+ 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x61, 0x0a,
+ 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x32, 0x12, 0x26,
+ 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x32, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0c,
- 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xa2, 0xc4, 0x03, 0x00, 0x12, 0x68, 0x0a, 0x0b,
- 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x12, 0x24, 0x2e, 0x6d, 0x79,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10,
+ 0x92, 0xc4, 0x03, 0x0c, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04, 0x1a, 0x02, 0x08, 0x1e, 0x40, 0x01,
+ 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
+ 0x79, 0x33, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
+ 0x74, 0x79, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63,
+ 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f,
+ 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x23, 0x92, 0xc4, 0x03, 0x1f, 0x0a, 0x15, 0x73, 0x6f, 0x6d, 0x65, 0x2d,
+ 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65,
+ 0x22, 0x02, 0x08, 0x0a, 0x32, 0x02, 0x20, 0x05, 0x12, 0x73, 0x0a, 0x0d, 0x53, 0x6f, 0x6d, 0x65,
+ 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x34, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
+ 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x92, 0xc4, 0x03, 0x2e, 0x0a,
+ 0x15, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b,
+ 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x03, 0x08, 0xac, 0x02, 0x1a, 0x02, 0x08, 0x05, 0x22,
+ 0x02, 0x08, 0x3c, 0x2a, 0x02, 0x08, 0x1e, 0x32, 0x02, 0x20, 0x05, 0x40, 0x01, 0x12, 0x50, 0x0a,
+ 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x16, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e,
+ 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x9a, 0xc4, 0x03, 0x00, 0x12,
+ 0x5d, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x23, 0x2e,
+ 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x9a, 0xc4, 0x03, 0x00, 0x12, 0x4b,
+ 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x12, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0c, 0x92,
+ 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xa2, 0xc4, 0x03, 0x00, 0x12, 0x59, 0x0a, 0x0b, 0x53,
+ 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63,
+ 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f,
+ 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0c, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02,
+ 0x08, 0x0a, 0xa2, 0xc4, 0x03, 0x00, 0x12, 0x68, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69,
+ 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x79,
0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53,
- 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69,
- 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0c, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02,
- 0x08, 0x0a, 0xa2, 0xc4, 0x03, 0x00, 0x12, 0xae, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
+ 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x33, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x0c, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xa2, 0xc4, 0x03, 0x00,
+ 0x12, 0xae, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31,
+ 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d,
- 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
- 0x53, 0x6f, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xaa, 0xc4, 0x03,
- 0x46, 0x0a, 0x40, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x24,
- 0x7b, 0x21, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x2e, 0x6e, 0x6f,
- 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x29, 0x2e, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28,
- 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x29, 0x2e, 0x73, 0x6c, 0x75, 0x67, 0x28,
- 0x29, 0x20, 0x7d, 0x10, 0x01, 0x18, 0x03, 0x1a, 0x13, 0x8a, 0xc4, 0x03, 0x0f, 0x0a, 0x0d, 0x6d,
- 0x79, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x32, 0xdd, 0x03, 0x0a,
- 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x8c, 0x01, 0x0a, 0x0d, 0x4f, 0x74, 0x68, 0x65, 0x72,
- 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65,
- 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
- 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
- 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x8a, 0xc4, 0x03, 0x1e, 0x2a,
- 0x1c, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f,
- 0x24, 0x7b, 0x21, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x7d, 0x92, 0xc4, 0x03,
- 0x04, 0x22, 0x02, 0x08, 0x1e, 0x12, 0x50, 0x0a, 0x0a, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x51, 0x75,
- 0x65, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x6d, 0x79,
- 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f,
- 0x74, 0x68, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x04, 0x9a, 0xc4, 0x03, 0x00, 0x12, 0x57, 0x0a, 0x0b, 0x4f, 0x74, 0x68, 0x65, 0x72,
- 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
- 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53,
- 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0a, 0xa2, 0xc4, 0x03, 0x00, 0xb2, 0xc4, 0x03, 0x02, 0x08, 0x01,
- 0x12, 0x7c, 0x0a, 0x0b, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
- 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92,
+ 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x0a, 0xaa, 0xc4, 0x03, 0x46, 0x0a, 0x40, 0x73, 0x6f, 0x6d,
+ 0x65, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x24, 0x7b, 0x21, 0x20, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74,
+ 0x79, 0x28, 0x29, 0x2e, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x22, 0x29, 0x2e, 0x73, 0x6c, 0x75, 0x67, 0x28, 0x29, 0x20, 0x7d, 0x10, 0x01, 0x18,
+ 0x03, 0x1a, 0x13, 0x8a, 0xc4, 0x03, 0x0f, 0x0a, 0x0d, 0x6d, 0x79, 0x2d, 0x74, 0x61, 0x73, 0x6b,
+ 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x32, 0xdd, 0x03, 0x0a, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72,
+ 0x12, 0x8c, 0x01, 0x0a, 0x0d, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
+ 0x6f, 0x77, 0x12, 0x26, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66,
+ 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63,
+ 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74,
+ 0x68, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x8a, 0xc4, 0x03, 0x1e, 0x2a, 0x1c, 0x6f, 0x74, 0x68, 0x65, 0x72,
+ 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x24, 0x7b, 0x21, 0x75, 0x75, 0x69,
+ 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x7d, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x1e, 0x12,
+ 0x50, 0x0a, 0x0a, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x04, 0x9a, 0xc4, 0x03,
+ 0x00, 0x12, 0x57, 0x0a, 0x0b, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c,
+ 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x0a,
+ 0xa2, 0xc4, 0x03, 0x00, 0xb2, 0xc4, 0x03, 0x02, 0x08, 0x01, 0x12, 0x7c, 0x0a, 0x0b, 0x4f, 0x74,
+ 0x68, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6d, 0x79, 0x63, 0x6f,
+ 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68,
+ 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x25, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70,
0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
- 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xc4,
- 0x03, 0x1c, 0x0a, 0x1a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x2f, 0x24, 0x7b, 0x21, 0x75, 0x75, 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x7d, 0x1a, 0x1c,
- 0x8a, 0xc4, 0x03, 0x18, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b,
- 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x1a, 0x04, 0x08, 0x01, 0x10, 0x01, 0x32, 0x40, 0x0a, 0x07,
- 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x35, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x16,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x68,
- 0x0a, 0x07, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x04, 0x57, 0x68, 0x61,
- 0x74, 0x12, 0x1d, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69,
- 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x57, 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xc4, 0x03, 0x1c, 0x0a, 0x1a, 0x6f, 0x74,
+ 0x68, 0x65, 0x72, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x24, 0x7b, 0x21, 0x75, 0x75,
+ 0x69, 0x64, 0x5f, 0x76, 0x34, 0x28, 0x29, 0x7d, 0x1a, 0x1c, 0x8a, 0xc4, 0x03, 0x18, 0x0a, 0x10,
+ 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75, 0x65, 0x75, 0x65,
+ 0x1a, 0x04, 0x08, 0x01, 0x10, 0x01, 0x32, 0x40, 0x0a, 0x07, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x12, 0x35, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x16, 0x8a, 0xc4, 0x03, 0x12, 0x2a, 0x10,
- 0x77, 0x68, 0x61, 0x74, 0x2f, 0x24, 0x7b, 0x21, 0x6b, 0x73, 0x75, 0x69, 0x64, 0x28, 0x29, 0x7d,
- 0x1a, 0x06, 0x92, 0xc4, 0x03, 0x02, 0x08, 0x01, 0x32, 0x82, 0x01, 0x0a, 0x0e, 0x4f, 0x6e, 0x6c,
- 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x0f, 0x4c,
- 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x28,
- 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
- 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
- 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x68, 0x0a, 0x07, 0x49, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x04, 0x57, 0x68, 0x61, 0x74, 0x12, 0x1d, 0x2e, 0x6d, 0x79,
+ 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x57,
+ 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0x16, 0x8a, 0xc4, 0x03, 0x12, 0x2a, 0x10, 0x77, 0x68, 0x61, 0x74, 0x2f, 0x24,
+ 0x7b, 0x21, 0x6b, 0x73, 0x75, 0x69, 0x64, 0x28, 0x29, 0x7d, 0x1a, 0x06, 0x92, 0xc4, 0x03, 0x02,
+ 0x08, 0x01, 0x32, 0x82, 0x01, 0x0a, 0x0e, 0x4f, 0x6e, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76,
+ 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x0f, 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41,
+ 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x28, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x65,
- 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x08, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x05, 0x32, 0x9a, 0x0a,
- 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0xc0, 0x01, 0x0a,
- 0x17, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x57,
- 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
- 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69,
- 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
- 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x53, 0x8a, 0xc4, 0x03, 0x4c,
- 0x0a, 0x16, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
- 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65,
- 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c,
- 0x31, 0x10, 0x01, 0x1a, 0x17, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65,
- 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x88, 0x02, 0x01, 0x12,
- 0xc0, 0x01, 0x0a, 0x17, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
- 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79,
+ 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x41, 0x63, 0x74, 0x69,
+ 0x76, 0x69, 0x74, 0x79, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0x92,
+ 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x05, 0x32, 0x9a, 0x0a, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x53, 0x6f, 0x6d, 0x65, 0x44,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
+ 0x77, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79,
0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53,
0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73,
- 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
- 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72,
- 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x53, 0x8a,
- 0xc4, 0x03, 0x4c, 0x0a, 0x16, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65,
- 0x63, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x19, 0x0a, 0x15, 0x53,
- 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67,
- 0x6e, 0x61, 0x6c, 0x32, 0x10, 0x01, 0x1a, 0x17, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0x88,
- 0x02, 0x01, 0x12, 0x78, 0x0a, 0x17, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
- 0x61, 0x74, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x27, 0x2e,
- 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65,
- 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d,
- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
- 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22,
- 0x0b, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x05, 0x88, 0x02, 0x01, 0x12, 0x78, 0x0a, 0x17,
+ 0x73, 0x61, 0x67, 0x65, 0x22, 0x53, 0x8a, 0xc4, 0x03, 0x4c, 0x0a, 0x16, 0x0a, 0x14, 0x53, 0x6f,
+ 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72,
+ 0x79, 0x31, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x10, 0x01, 0x1a, 0x17, 0x0a,
+ 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x88, 0x02, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x53, 0x6f,
+ 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b,
+ 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70,
+ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27,
+ 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x53, 0x8a, 0xc4, 0x03, 0x4c, 0x0a, 0x16, 0x0a,
+ 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x51,
+ 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70,
+ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x10, 0x01,
+ 0x1a, 0x17, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0x88, 0x02, 0x01, 0x12, 0x78, 0x0a, 0x17,
0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x41, 0x63,
- 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44,
0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0b, 0x92, 0xc4, 0x03, 0x04, 0x22,
- 0x02, 0x08, 0x05, 0x88, 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x27,
- 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
- 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70,
- 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44,
- 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x22, 0x07, 0x9a, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, 0x53, 0x6f, 0x6d,
- 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x02, 0x08, 0x05, 0x88, 0x02, 0x01, 0x12, 0x78, 0x0a, 0x17, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69,
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63,
0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f,
0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x22, 0x07, 0x9a, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x61, 0x0a, 0x15,
- 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
- 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70,
- 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x07, 0xa2, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12,
- 0x61, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
- 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
+ 0x61, 0x67, 0x65, 0x22, 0x0b, 0x92, 0xc4, 0x03, 0x04, 0x22, 0x02, 0x08, 0x05, 0x88, 0x02, 0x01,
+ 0x12, 0x71, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x07, 0xa2, 0xc4, 0x03, 0x00, 0x88,
- 0x02, 0x01, 0x12, 0x72, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
- 0x61, 0x74, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79,
+ 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69,
+ 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0x9a, 0xc4, 0x03, 0x00,
+ 0x88, 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65,
+ 0x63, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79,
0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53,
0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72,
- 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0xaa,
- 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x72, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
- 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0x12,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0x9a,
+ 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x61, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x31, 0x12,
0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70,
0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
- 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d,
- 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65,
- 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x22, 0x07, 0xaa, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63,
- 0x6f, 0x6d, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d,
- 0x70, 0x6c, 0x65, 0x42, 0x0b, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
- 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
- 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65,
- 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65,
- 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31,
- 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
- 0x6e, 0x79, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0xca, 0x02, 0x10, 0x4d, 0x79, 0x63, 0x6f,
- 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5c, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0xe2, 0x02, 0x1c, 0x4d,
- 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5c, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5c,
- 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4d, 0x79,
- 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x3a, 0x3a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x07, 0xa2, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x61, 0x0a, 0x15, 0x53, 0x6f, 0x6d,
+ 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x22, 0x07, 0xa2, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01, 0x12, 0x72, 0x0a, 0x15,
+ 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x31, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70,
+ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27,
+ 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0xaa, 0xc4, 0x03, 0x00, 0x88, 0x02, 0x01,
+ 0x12, 0x72, 0x0a, 0x15, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0x12, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f,
+ 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d,
+ 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0xaa, 0xc4, 0x03,
+ 0x00, 0x88, 0x02, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x79, 0x63,
+ 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x42, 0x0b, 0x53,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74,
+ 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74,
+ 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58,
+ 0xaa, 0x02, 0x10, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x53, 0x69, 0x6d,
+ 0x70, 0x6c, 0x65, 0xca, 0x02, 0x10, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x5c,
+ 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0xe2, 0x02, 0x1c, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61,
+ 0x6e, 0x79, 0x5c, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4d, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
+ 0x79, 0x3a, 0x3a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
}
var (
@@ -2154,6 +2167,8 @@ var file_test_simple_v1_simple_proto_goTypes = []interface{}{
(*durationpb.Duration)(nil), // 29: google.protobuf.Duration
(*emptypb.Empty)(nil), // 30: google.protobuf.Empty
(*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp
+ (*v1.PaginatedRequest)(nil), // 32: mycompany.simple.common.v1.PaginatedRequest
+ (*v1.PaginatedResponse)(nil), // 33: mycompany.simple.common.v1.PaginatedResponse
}
var file_test_simple_v1_simple_proto_depIdxs = []int32{
28, // 0: mycompany.simple.OtherWorkflowRequest.baz:type_name -> mycompany.simple.OtherWorkflowRequest.Baz
@@ -2167,65 +2182,67 @@ var file_test_simple_v1_simple_proto_depIdxs = []int32{
1, // 8: mycompany.simple.Simple.SomeWorkflow1:input_type -> mycompany.simple.SomeWorkflow1Request
30, // 9: mycompany.simple.Simple.SomeWorkflow2:input_type -> google.protobuf.Empty
3, // 10: mycompany.simple.Simple.SomeWorkflow3:input_type -> mycompany.simple.SomeWorkflow3Request
- 30, // 11: mycompany.simple.Simple.SomeActivity1:input_type -> google.protobuf.Empty
- 4, // 12: mycompany.simple.Simple.SomeActivity2:input_type -> mycompany.simple.SomeActivity2Request
- 5, // 13: mycompany.simple.Simple.SomeActivity3:input_type -> mycompany.simple.SomeActivity3Request
- 30, // 14: mycompany.simple.Simple.SomeActivity4:input_type -> google.protobuf.Empty
- 30, // 15: mycompany.simple.Simple.SomeQuery1:input_type -> google.protobuf.Empty
- 8, // 16: mycompany.simple.Simple.SomeQuery2:input_type -> mycompany.simple.SomeQuery2Request
- 30, // 17: mycompany.simple.Simple.SomeSignal1:input_type -> google.protobuf.Empty
- 10, // 18: mycompany.simple.Simple.SomeSignal2:input_type -> mycompany.simple.SomeSignal2Request
- 11, // 19: mycompany.simple.Simple.SomeSignal3:input_type -> mycompany.simple.SomeSignal3Request
- 13, // 20: mycompany.simple.Simple.SomeUpdate1:input_type -> mycompany.simple.SomeUpdate1Request
- 15, // 21: mycompany.simple.Other.OtherWorkflow:input_type -> mycompany.simple.OtherWorkflowRequest
- 30, // 22: mycompany.simple.Other.OtherQuery:input_type -> google.protobuf.Empty
- 18, // 23: mycompany.simple.Other.OtherSignal:input_type -> mycompany.simple.OtherSignalRequest
- 19, // 24: mycompany.simple.Other.OtherUpdate:input_type -> mycompany.simple.OtherUpdateRequest
- 30, // 25: mycompany.simple.Nothing.Foo:input_type -> google.protobuf.Empty
- 23, // 26: mycompany.simple.Ignored.What:input_type -> mycompany.simple.WhatRequest
- 24, // 27: mycompany.simple.OnlyActivities.LonelyActivity1:input_type -> mycompany.simple.LonelyActivity1Request
- 26, // 28: mycompany.simple.Deprecated.SomeDeprecatedWorkflow1:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 29: mycompany.simple.Deprecated.SomeDeprecatedWorkflow2:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 30: mycompany.simple.Deprecated.SomeDeprecatedActivity1:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 31: mycompany.simple.Deprecated.SomeDeprecatedActivity2:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 32: mycompany.simple.Deprecated.SomeDeprecatedQuery1:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 33: mycompany.simple.Deprecated.SomeDeprecatedQuery2:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 34: mycompany.simple.Deprecated.SomeDeprecatedSignal1:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 35: mycompany.simple.Deprecated.SomeDeprecatedSignal2:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 36: mycompany.simple.Deprecated.SomeDeprecatedUpdate1:input_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 37: mycompany.simple.Deprecated.SomeDeprecatedUpdate2:input_type -> mycompany.simple.SomeDeprecatedMessage
- 2, // 38: mycompany.simple.Simple.SomeWorkflow1:output_type -> mycompany.simple.SomeWorkflow1Response
- 30, // 39: mycompany.simple.Simple.SomeWorkflow2:output_type -> google.protobuf.Empty
- 30, // 40: mycompany.simple.Simple.SomeWorkflow3:output_type -> google.protobuf.Empty
- 30, // 41: mycompany.simple.Simple.SomeActivity1:output_type -> google.protobuf.Empty
- 30, // 42: mycompany.simple.Simple.SomeActivity2:output_type -> google.protobuf.Empty
- 6, // 43: mycompany.simple.Simple.SomeActivity3:output_type -> mycompany.simple.SomeActivity3Response
- 30, // 44: mycompany.simple.Simple.SomeActivity4:output_type -> google.protobuf.Empty
- 7, // 45: mycompany.simple.Simple.SomeQuery1:output_type -> mycompany.simple.SomeQuery1Response
- 9, // 46: mycompany.simple.Simple.SomeQuery2:output_type -> mycompany.simple.SomeQuery2Response
- 30, // 47: mycompany.simple.Simple.SomeSignal1:output_type -> google.protobuf.Empty
- 30, // 48: mycompany.simple.Simple.SomeSignal2:output_type -> google.protobuf.Empty
- 12, // 49: mycompany.simple.Simple.SomeSignal3:output_type -> mycompany.simple.SomeSignal3Response
- 14, // 50: mycompany.simple.Simple.SomeUpdate1:output_type -> mycompany.simple.SomeUpdate1Response
- 16, // 51: mycompany.simple.Other.OtherWorkflow:output_type -> mycompany.simple.OtherWorkflowResponse
- 17, // 52: mycompany.simple.Other.OtherQuery:output_type -> mycompany.simple.OtherQueryResponse
- 30, // 53: mycompany.simple.Other.OtherSignal:output_type -> google.protobuf.Empty
- 20, // 54: mycompany.simple.Other.OtherUpdate:output_type -> mycompany.simple.OtherUpdateResponse
- 30, // 55: mycompany.simple.Nothing.Foo:output_type -> google.protobuf.Empty
- 30, // 56: mycompany.simple.Ignored.What:output_type -> google.protobuf.Empty
- 25, // 57: mycompany.simple.OnlyActivities.LonelyActivity1:output_type -> mycompany.simple.LonelyActivity1Response
- 26, // 58: mycompany.simple.Deprecated.SomeDeprecatedWorkflow1:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 59: mycompany.simple.Deprecated.SomeDeprecatedWorkflow2:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 60: mycompany.simple.Deprecated.SomeDeprecatedActivity1:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 61: mycompany.simple.Deprecated.SomeDeprecatedActivity2:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 62: mycompany.simple.Deprecated.SomeDeprecatedQuery1:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 63: mycompany.simple.Deprecated.SomeDeprecatedQuery2:output_type -> mycompany.simple.SomeDeprecatedMessage
- 30, // 64: mycompany.simple.Deprecated.SomeDeprecatedSignal1:output_type -> google.protobuf.Empty
- 30, // 65: mycompany.simple.Deprecated.SomeDeprecatedSignal2:output_type -> google.protobuf.Empty
- 26, // 66: mycompany.simple.Deprecated.SomeDeprecatedUpdate1:output_type -> mycompany.simple.SomeDeprecatedMessage
- 26, // 67: mycompany.simple.Deprecated.SomeDeprecatedUpdate2:output_type -> mycompany.simple.SomeDeprecatedMessage
- 38, // [38:68] is the sub-list for method output_type
- 8, // [8:38] is the sub-list for method input_type
+ 32, // 11: mycompany.simple.Simple.SomeWorkflow4:input_type -> mycompany.simple.common.v1.PaginatedRequest
+ 30, // 12: mycompany.simple.Simple.SomeActivity1:input_type -> google.protobuf.Empty
+ 4, // 13: mycompany.simple.Simple.SomeActivity2:input_type -> mycompany.simple.SomeActivity2Request
+ 5, // 14: mycompany.simple.Simple.SomeActivity3:input_type -> mycompany.simple.SomeActivity3Request
+ 30, // 15: mycompany.simple.Simple.SomeActivity4:input_type -> google.protobuf.Empty
+ 30, // 16: mycompany.simple.Simple.SomeQuery1:input_type -> google.protobuf.Empty
+ 8, // 17: mycompany.simple.Simple.SomeQuery2:input_type -> mycompany.simple.SomeQuery2Request
+ 30, // 18: mycompany.simple.Simple.SomeSignal1:input_type -> google.protobuf.Empty
+ 10, // 19: mycompany.simple.Simple.SomeSignal2:input_type -> mycompany.simple.SomeSignal2Request
+ 11, // 20: mycompany.simple.Simple.SomeSignal3:input_type -> mycompany.simple.SomeSignal3Request
+ 13, // 21: mycompany.simple.Simple.SomeUpdate1:input_type -> mycompany.simple.SomeUpdate1Request
+ 15, // 22: mycompany.simple.Other.OtherWorkflow:input_type -> mycompany.simple.OtherWorkflowRequest
+ 30, // 23: mycompany.simple.Other.OtherQuery:input_type -> google.protobuf.Empty
+ 18, // 24: mycompany.simple.Other.OtherSignal:input_type -> mycompany.simple.OtherSignalRequest
+ 19, // 25: mycompany.simple.Other.OtherUpdate:input_type -> mycompany.simple.OtherUpdateRequest
+ 30, // 26: mycompany.simple.Nothing.Foo:input_type -> google.protobuf.Empty
+ 23, // 27: mycompany.simple.Ignored.What:input_type -> mycompany.simple.WhatRequest
+ 24, // 28: mycompany.simple.OnlyActivities.LonelyActivity1:input_type -> mycompany.simple.LonelyActivity1Request
+ 26, // 29: mycompany.simple.Deprecated.SomeDeprecatedWorkflow1:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 30: mycompany.simple.Deprecated.SomeDeprecatedWorkflow2:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 31: mycompany.simple.Deprecated.SomeDeprecatedActivity1:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 32: mycompany.simple.Deprecated.SomeDeprecatedActivity2:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 33: mycompany.simple.Deprecated.SomeDeprecatedQuery1:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 34: mycompany.simple.Deprecated.SomeDeprecatedQuery2:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 35: mycompany.simple.Deprecated.SomeDeprecatedSignal1:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 36: mycompany.simple.Deprecated.SomeDeprecatedSignal2:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 37: mycompany.simple.Deprecated.SomeDeprecatedUpdate1:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 38: mycompany.simple.Deprecated.SomeDeprecatedUpdate2:input_type -> mycompany.simple.SomeDeprecatedMessage
+ 2, // 39: mycompany.simple.Simple.SomeWorkflow1:output_type -> mycompany.simple.SomeWorkflow1Response
+ 30, // 40: mycompany.simple.Simple.SomeWorkflow2:output_type -> google.protobuf.Empty
+ 30, // 41: mycompany.simple.Simple.SomeWorkflow3:output_type -> google.protobuf.Empty
+ 33, // 42: mycompany.simple.Simple.SomeWorkflow4:output_type -> mycompany.simple.common.v1.PaginatedResponse
+ 30, // 43: mycompany.simple.Simple.SomeActivity1:output_type -> google.protobuf.Empty
+ 30, // 44: mycompany.simple.Simple.SomeActivity2:output_type -> google.protobuf.Empty
+ 6, // 45: mycompany.simple.Simple.SomeActivity3:output_type -> mycompany.simple.SomeActivity3Response
+ 30, // 46: mycompany.simple.Simple.SomeActivity4:output_type -> google.protobuf.Empty
+ 7, // 47: mycompany.simple.Simple.SomeQuery1:output_type -> mycompany.simple.SomeQuery1Response
+ 9, // 48: mycompany.simple.Simple.SomeQuery2:output_type -> mycompany.simple.SomeQuery2Response
+ 30, // 49: mycompany.simple.Simple.SomeSignal1:output_type -> google.protobuf.Empty
+ 30, // 50: mycompany.simple.Simple.SomeSignal2:output_type -> google.protobuf.Empty
+ 12, // 51: mycompany.simple.Simple.SomeSignal3:output_type -> mycompany.simple.SomeSignal3Response
+ 14, // 52: mycompany.simple.Simple.SomeUpdate1:output_type -> mycompany.simple.SomeUpdate1Response
+ 16, // 53: mycompany.simple.Other.OtherWorkflow:output_type -> mycompany.simple.OtherWorkflowResponse
+ 17, // 54: mycompany.simple.Other.OtherQuery:output_type -> mycompany.simple.OtherQueryResponse
+ 30, // 55: mycompany.simple.Other.OtherSignal:output_type -> google.protobuf.Empty
+ 20, // 56: mycompany.simple.Other.OtherUpdate:output_type -> mycompany.simple.OtherUpdateResponse
+ 30, // 57: mycompany.simple.Nothing.Foo:output_type -> google.protobuf.Empty
+ 30, // 58: mycompany.simple.Ignored.What:output_type -> google.protobuf.Empty
+ 25, // 59: mycompany.simple.OnlyActivities.LonelyActivity1:output_type -> mycompany.simple.LonelyActivity1Response
+ 26, // 60: mycompany.simple.Deprecated.SomeDeprecatedWorkflow1:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 61: mycompany.simple.Deprecated.SomeDeprecatedWorkflow2:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 62: mycompany.simple.Deprecated.SomeDeprecatedActivity1:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 63: mycompany.simple.Deprecated.SomeDeprecatedActivity2:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 64: mycompany.simple.Deprecated.SomeDeprecatedQuery1:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 65: mycompany.simple.Deprecated.SomeDeprecatedQuery2:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 30, // 66: mycompany.simple.Deprecated.SomeDeprecatedSignal1:output_type -> google.protobuf.Empty
+ 30, // 67: mycompany.simple.Deprecated.SomeDeprecatedSignal2:output_type -> google.protobuf.Empty
+ 26, // 68: mycompany.simple.Deprecated.SomeDeprecatedUpdate1:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 26, // 69: mycompany.simple.Deprecated.SomeDeprecatedUpdate2:output_type -> mycompany.simple.SomeDeprecatedMessage
+ 39, // [39:70] is the sub-list for method output_type
+ 8, // [8:39] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
diff --git a/gen/test/simple/v1/simple_temporal.pb.go b/gen/test/simple/v1/simple_temporal.pb.go
index 40a01fbd..a80743d3 100644
--- a/gen/test/simple/v1/simple_temporal.pb.go
+++ b/gen/test/simple/v1/simple_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -15,15 +15,16 @@ import (
"encoding/json"
"errors"
"fmt"
+ v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
helpers "github.com/cludden/protoc-gen-go-temporal/pkg/helpers"
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
testutil "github.com/cludden/protoc-gen-go-temporal/pkg/testutil"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
serviceerror "go.temporal.io/api/serviceerror"
- v11 "go.temporal.io/api/update/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -49,6 +50,7 @@ const (
SomeWorkflow1WorkflowName = "mycompany.simple.SomeWorkflow1"
SomeWorkflow2WorkflowName = "mycompany.simple.SomeWorkflow2"
SomeWorkflow3WorkflowName = "mycompany.simple.Simple.SomeWorkflow3"
+ SomeWorkflow4WorkflowName = "mycompany.simple.Simple.SomeWorkflow4"
)
// mycompany.simple.Simple workflow id expressions
@@ -56,6 +58,7 @@ var (
SomeWorkflow1Idexpression = expression.MustParseExpression("some-workflow-1/${! id }/${! uuid_v4() }")
SomeWorkflow2Idexpression = expression.MustParseExpression("some-workflow-2/${! uuid_v4() }")
SomeWorkflow3Idexpression = expression.MustParseExpression("some-workflow-3/${! id }/${! requestVal }")
+ SomeWorkflow4Idexpression = expression.MustParseExpression("some-workflow-4/${! uuid_v4() }")
)
// mycompany.simple.Simple activity names
@@ -143,6 +146,15 @@ type SimpleClient interface {
// Deprecated: Do not use.
SomeWorkflow3WithSomeSignal2Async(ctx context.Context, req *SomeWorkflow3Request, signal *SomeSignal2Request, opts ...*SomeWorkflow3Options) (SomeWorkflow3Run, error)
+ // SomeWorkflow4 retrieves a paginated list of items
+ SomeWorkflow4(ctx context.Context, req *v1.PaginatedRequest, opts ...*SomeWorkflow4Options) (*v1.PaginatedResponse, error)
+
+ // SomeWorkflow4Async starts a(n) mycompany.simple.Simple.SomeWorkflow4 workflow and returns a handle to the workflow run
+ SomeWorkflow4Async(ctx context.Context, req *v1.PaginatedRequest, opts ...*SomeWorkflow4Options) (SomeWorkflow4Run, error)
+
+ // GetSomeWorkflow4 retrieves a handle to an existing mycompany.simple.Simple.SomeWorkflow4 workflow execution
+ GetSomeWorkflow4(ctx context.Context, workflowID string, runID string) SomeWorkflow4Run
+
// CancelWorkflow requests cancellation of an existing workflow execution
CancelWorkflow(ctx context.Context, workflowID string, runID string) error
@@ -439,6 +451,48 @@ func (c *simpleClient) SomeWorkflow3WithSomeSignal2Async(ctx context.Context, re
}, nil
}
+// SomeWorkflow4 retrieves a paginated list of items
+func (c *simpleClient) SomeWorkflow4(ctx context.Context, req *v1.PaginatedRequest, options ...*SomeWorkflow4Options) (*v1.PaginatedResponse, error) {
+ run, err := c.SomeWorkflow4Async(ctx, req, options...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// SomeWorkflow4 retrieves a paginated list of items
+func (c *simpleClient) SomeWorkflow4Async(ctx context.Context, req *v1.PaginatedRequest, options ...*SomeWorkflow4Options) (SomeWorkflow4Run, error) {
+ var o *SomeWorkflow4Options
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewSomeWorkflow4Options()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ run, err := c.client.ExecuteWorkflow(ctx, opts, SomeWorkflow4WorkflowName, req)
+ if err != nil {
+ return nil, err
+ }
+ if run == nil {
+ return nil, errors.New("execute workflow returned nil run")
+ }
+ return &someWorkflow4Run{
+ client: c,
+ run: run,
+ }, nil
+}
+
+// GetSomeWorkflow4 fetches an existing mycompany.simple.Simple.SomeWorkflow4 execution
+func (c *simpleClient) GetSomeWorkflow4(ctx context.Context, workflowID string, runID string) SomeWorkflow4Run {
+ return &someWorkflow4Run{
+ client: c,
+ run: c.client.GetWorkflow(ctx, workflowID, runID),
+ }
+}
+
// CancelWorkflow requests cancellation of an existing workflow execution
func (c *simpleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error {
return c.client.CancelWorkflow(ctx, workflowID, runID)
@@ -495,7 +549,7 @@ func (c *simpleClient) SomeUpdate1(ctx context.Context, workflowID string, runID
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.SomeUpdate1Async(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.SomeUpdate1Async(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -541,7 +595,7 @@ type SomeWorkflow1Options struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -566,7 +620,7 @@ func (o *SomeWorkflow1Options) Build(req protoreflect.Message) (client.StartWork
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -611,7 +665,7 @@ func (o *SomeWorkflow1Options) WithID(id string) *SomeWorkflow1Options {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow1Options) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow1Options {
+func (o *SomeWorkflow1Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow1Options {
o.idReusePolicy = policy
return o
}
@@ -744,7 +798,7 @@ type SomeWorkflow2Options struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -769,7 +823,7 @@ func (o *SomeWorkflow2Options) Build(req protoreflect.Message) (client.StartWork
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -814,7 +868,7 @@ func (o *SomeWorkflow2Options) WithID(id string) *SomeWorkflow2Options {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow2Options) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow2Options {
+func (o *SomeWorkflow2Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow2Options {
o.idReusePolicy = policy
return o
}
@@ -935,7 +989,7 @@ type SomeWorkflow3Options struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -960,10 +1014,10 @@ func (o *SomeWorkflow3Options) Build(req protoreflect.Message) (client.StartWork
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -1013,7 +1067,7 @@ func (o *SomeWorkflow3Options) WithID(id string) *SomeWorkflow3Options {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow3Options) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow3Options {
+func (o *SomeWorkflow3Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow3Options {
o.idReusePolicy = policy
return o
}
@@ -1113,6 +1167,177 @@ func (r *someWorkflow3Run) SomeSignal2(ctx context.Context, req *SomeSignal2Requ
return r.client.SomeSignal2(ctx, r.ID(), "", req)
}
+// SomeWorkflow4Options provides configuration for a mycompany.simple.Simple.SomeWorkflow4 workflow operation
+type SomeWorkflow4Options struct {
+ options client.StartWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+}
+
+// NewSomeWorkflow4Options initializes a new SomeWorkflow4Options value
+func NewSomeWorkflow4Options() *SomeWorkflow4Options {
+ return &SomeWorkflow4Options{}
+}
+
+// Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
+func (o *SomeWorkflow4Options) Build(req protoreflect.Message) (client.StartWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.ID = *v
+ } else if opts.ID == "" {
+ id, err := expression.EvalExpression(SomeWorkflow4Idexpression, req)
+ if err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow4WorkflowName, err)
+ }
+ opts.ID = id
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = SimpleTaskQueue
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ return opts, nil
+}
+
+// WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
+func (o *SomeWorkflow4Options) WithStartWorkflowOptions(options client.StartWorkflowOptions) *SomeWorkflow4Options {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *SomeWorkflow4Options) WithExecutionTimeout(d time.Duration) *SomeWorkflow4Options {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the ID value
+func (o *SomeWorkflow4Options) WithID(id string) *SomeWorkflow4Options {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *SomeWorkflow4Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow4Options {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *SomeWorkflow4Options) WithRetryPolicy(policy *temporal.RetryPolicy) *SomeWorkflow4Options {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *SomeWorkflow4Options) WithRunTimeout(d time.Duration) *SomeWorkflow4Options {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *SomeWorkflow4Options) WithSearchAttributes(sa map[string]any) *SomeWorkflow4Options {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *SomeWorkflow4Options) WithTaskTimeout(d time.Duration) *SomeWorkflow4Options {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *SomeWorkflow4Options) WithTaskQueue(tq string) *SomeWorkflow4Options {
+ o.taskQueue = &tq
+ return o
+}
+
+// SomeWorkflow4Run describes a(n) mycompany.simple.Simple.SomeWorkflow4 workflow run
+type SomeWorkflow4Run interface {
+ // ID returns the workflow ID
+ ID() string
+
+ // RunID returns the workflow instance ID
+ RunID() string
+
+ // Run returns the inner client.WorkflowRun
+ Run() client.WorkflowRun
+
+ // Get blocks until the workflow is complete and returns the result
+ Get(ctx context.Context) (*v1.PaginatedResponse, error)
+
+ // Cancel requests cancellation of a workflow in execution, returning an error if applicable
+ Cancel(ctx context.Context) error
+
+ // Terminate terminates a workflow in execution, returning an error if applicable
+ Terminate(ctx context.Context, reason string, details ...interface{}) error
+}
+
+// someWorkflow4Run provides an internal implementation of a(n) SomeWorkflow4RunRun
+type someWorkflow4Run struct {
+ client *simpleClient
+ run client.WorkflowRun
+}
+
+// ID returns the workflow ID
+func (r *someWorkflow4Run) ID() string {
+ return r.run.GetID()
+}
+
+// Run returns the inner client.WorkflowRun
+func (r *someWorkflow4Run) Run() client.WorkflowRun {
+ return r.run
+}
+
+// RunID returns the execution ID
+func (r *someWorkflow4Run) RunID() string {
+ return r.run.GetRunID()
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *someWorkflow4Run) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get blocks until the workflow is complete, returning the result if applicable
+func (r *someWorkflow4Run) Get(ctx context.Context) (*v1.PaginatedResponse, error) {
+ var resp v1.PaginatedResponse
+ if err := r.run.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *someWorkflow4Run) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
// SomeUpdate1Handle describes a(n) mycompany.simple.Simple.SomeUpdate1 update handle
type SomeUpdate1Handle interface {
// WorkflowID returns the workflow ID
@@ -1180,7 +1405,7 @@ func (h *someUpdate1Handle) Get(ctx context.Context) (*SomeUpdate1Response, erro
type SomeUpdate1Options struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewSomeUpdate1Options initializes a new SomeUpdate1Options value
@@ -1215,10 +1440,10 @@ func (o *SomeUpdate1Options) Build(workflowID string, runID string, req *SomeUpd
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
- } else if opts.WaitPolicy.GetLifecycleStage() == v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
+ } else if opts.WaitPolicy.GetLifecycleStage() == enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
}
return opts, nil
}
@@ -1236,7 +1461,7 @@ func (o *SomeUpdate1Options) WithUpdateWorkflowOptions(options client.UpdateWork
}
// WithWaitPolicy sets the WaitPolicy
-func (o *SomeUpdate1Options) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *SomeUpdate1Options {
+func (o *SomeUpdate1Options) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *SomeUpdate1Options {
o.waitPolicy = policy
return o
}
@@ -1250,6 +1475,8 @@ var (
// SomeWorkflow3 does some workflow thing.
// Deprecated: Use SomeWorkflow2 instead.
SomeWorkflow3Function func(workflow.Context, *SomeWorkflow3Request) error
+ // SomeWorkflow4 retrieves a paginated list of items
+ SomeWorkflow4Function func(workflow.Context, *v1.PaginatedRequest) (*v1.PaginatedResponse, error)
)
// SimpleWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
@@ -1263,6 +1490,8 @@ type (
// SomeWorkflow3 does some workflow thing.
// Deprecated: Use SomeWorkflow2 instead.
SomeWorkflow3(workflow.Context, *SomeWorkflow3Request) error
+ // SomeWorkflow4 retrieves a paginated list of items
+ SomeWorkflow4(workflow.Context, *v1.PaginatedRequest) (*v1.PaginatedResponse, error)
}
// simpleWorkflowFunctions provides an internal SimpleWorkflowFunctions implementation
simpleWorkflowFunctions struct{}
@@ -1297,6 +1526,14 @@ func (f *simpleWorkflowFunctions) SomeWorkflow3(ctx workflow.Context, req *SomeW
return SomeWorkflow3Function(ctx, req)
}
+// SomeWorkflow4 retrieves a paginated list of items
+func (f *simpleWorkflowFunctions) SomeWorkflow4(ctx workflow.Context, req *v1.PaginatedRequest) (*v1.PaginatedResponse, error) {
+ if SomeWorkflow4Function == nil {
+ return nil, errors.New("SomeWorkflow4 requires workflow registration via RegisterSimpleWorkflows or RegisterSomeWorkflow4Workflow")
+ }
+ return SomeWorkflow4Function(ctx, req)
+}
+
// SimpleWorkflows provides methods for initializing new mycompany.simple.Simple workflow values
type SimpleWorkflows interface {
// SomeWorkflow1 does some workflow thing.
@@ -1308,6 +1545,9 @@ type SimpleWorkflows interface {
// SomeWorkflow3 does some workflow thing.
// Deprecated: Use SomeWorkflow2 instead.
SomeWorkflow3(ctx workflow.Context, input *SomeWorkflow3WorkflowInput) (SomeWorkflow3Workflow, error)
+
+ // SomeWorkflow4 retrieves a paginated list of items
+ SomeWorkflow4(ctx workflow.Context, input *SomeWorkflow4WorkflowInput) (SomeWorkflow4Workflow, error)
}
// RegisterSimpleWorkflows registers mycompany.simple.Simple workflows with the given worker
@@ -1315,6 +1555,7 @@ func RegisterSimpleWorkflows(r worker.WorkflowRegistry, workflows SimpleWorkflow
RegisterSomeWorkflow1Workflow(r, workflows.SomeWorkflow1)
RegisterSomeWorkflow2Workflow(r, workflows.SomeWorkflow2)
RegisterSomeWorkflow3Workflow(r, workflows.SomeWorkflow3)
+ RegisterSomeWorkflow4Workflow(r, workflows.SomeWorkflow4)
}
// RegisterSomeWorkflow1Workflow registers a mycompany.simple.Simple.SomeWorkflow1 workflow with the given worker
@@ -1406,13 +1647,13 @@ type SomeWorkflow1ChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -1449,7 +1690,7 @@ func (o *SomeWorkflow1ChildOptions) Build(ctx workflow.Context, req protoreflect
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -1472,7 +1713,7 @@ func (o *SomeWorkflow1ChildOptions) Build(ctx workflow.Context, req protoreflect
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -1500,13 +1741,13 @@ func (o *SomeWorkflow1ChildOptions) WithID(id string) *SomeWorkflow1ChildOptions
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow1ChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow1ChildOptions {
+func (o *SomeWorkflow1ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow1ChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow1ChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SomeWorkflow1ChildOptions {
+func (o *SomeWorkflow1ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow1ChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1690,13 +1931,13 @@ type SomeWorkflow2ChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -1723,7 +1964,7 @@ func (o *SomeWorkflow2ChildOptions) Build(ctx workflow.Context, req protoreflect
return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow2WorkflowName, err)
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -1746,7 +1987,7 @@ func (o *SomeWorkflow2ChildOptions) Build(ctx workflow.Context, req protoreflect
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -1774,13 +2015,13 @@ func (o *SomeWorkflow2ChildOptions) WithID(id string) *SomeWorkflow2ChildOptions
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow2ChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow2ChildOptions {
+func (o *SomeWorkflow2ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow2ChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow2ChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SomeWorkflow2ChildOptions {
+func (o *SomeWorkflow2ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow2ChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1877,128 +2118,387 @@ func RegisterSomeWorkflow3Workflow(r worker.WorkflowRegistry, wf func(workflow.C
r.RegisterWorkflowWithOptions(SomeWorkflow3Function, workflow.RegisterOptions{Name: SomeWorkflow3WorkflowName})
}
-// buildSomeWorkflow3 converts a SomeWorkflow3 workflow struct into a valid workflow function
-func buildSomeWorkflow3(ctor func(workflow.Context, *SomeWorkflow3WorkflowInput) (SomeWorkflow3Workflow, error)) func(workflow.Context, *SomeWorkflow3Request) error {
- return func(ctx workflow.Context, req *SomeWorkflow3Request) error {
- input := &SomeWorkflow3WorkflowInput{
+// buildSomeWorkflow3 converts a SomeWorkflow3 workflow struct into a valid workflow function
+func buildSomeWorkflow3(ctor func(workflow.Context, *SomeWorkflow3WorkflowInput) (SomeWorkflow3Workflow, error)) func(workflow.Context, *SomeWorkflow3Request) error {
+ return func(ctx workflow.Context, req *SomeWorkflow3Request) error {
+ input := &SomeWorkflow3WorkflowInput{
+ Req: req,
+ SomeSignal2: &SomeSignal2Signal{
+ Channel: workflow.GetSignalChannel(ctx, SomeSignal2SignalName),
+ },
+ }
+ wf, err := ctor(ctx, input)
+ if err != nil {
+ return err
+ }
+ if initializable, ok := wf.(helpers.Initializable); ok {
+ if err := initializable.Initialize(ctx); err != nil {
+ return err
+ }
+ }
+ return wf.Execute(ctx)
+ }
+}
+
+// SomeWorkflow3WorkflowInput describes the input to a(n) mycompany.simple.Simple.SomeWorkflow3 workflow constructor
+type SomeWorkflow3WorkflowInput struct {
+ Req *SomeWorkflow3Request
+ SomeSignal2 *SomeSignal2Signal
+}
+
+// SomeWorkflow3 does some workflow thing.
+// Deprecated: Use SomeWorkflow2 instead.
+//
+// workflow details: (name: "mycompany.simple.Simple.SomeWorkflow3", id: "some-workflow-3/${! id }/${! requestVal }")
+type SomeWorkflow3Workflow interface {
+ // Execute defines the entrypoint to a(n) mycompany.simple.Simple.SomeWorkflow3 workflow
+ //
+ // Deprecated: Do not use.
+ Execute(ctx workflow.Context) error
+}
+
+// SomeWorkflow3 does some workflow thing.
+// Deprecated: Use SomeWorkflow2 instead.
+func SomeWorkflow3Child(ctx workflow.Context, req *SomeWorkflow3Request, options ...*SomeWorkflow3ChildOptions) error {
+ childRun, err := SomeWorkflow3ChildAsync(ctx, req, options...)
+ if err != nil {
+ return err
+ }
+ return childRun.Get(ctx)
+}
+
+// SomeWorkflow3 does some workflow thing.
+// Deprecated: Use SomeWorkflow2 instead.
+func SomeWorkflow3ChildAsync(ctx workflow.Context, req *SomeWorkflow3Request, options ...*SomeWorkflow3ChildOptions) (*SomeWorkflow3ChildRun, error) {
+ var o *SomeWorkflow3ChildOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewSomeWorkflow3ChildOptions()
+ }
+ opts, err := o.Build(ctx, req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing workflow.ChildWorkflowOptions: %w", err)
+ }
+ ctx = workflow.WithChildOptions(ctx, opts)
+ return &SomeWorkflow3ChildRun{Future: workflow.ExecuteChildWorkflow(ctx, SomeWorkflow3WorkflowName, req)}, nil
+}
+
+// SomeWorkflow3ChildOptions provides configuration for a child mycompany.simple.Simple.SomeWorkflow3 workflow operation
+type SomeWorkflow3ChildOptions struct {
+ options workflow.ChildWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+ parentClosePolicy enumsv1.ParentClosePolicy
+ waitForCancellation *bool
+}
+
+// NewSomeWorkflow3ChildOptions initializes a new SomeWorkflow3ChildOptions value
+func NewSomeWorkflow3ChildOptions() *SomeWorkflow3ChildOptions {
+ return &SomeWorkflow3ChildOptions{}
+}
+
+// Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
+func (o *SomeWorkflow3ChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.WorkflowID = *v
+ } else if opts.WorkflowID == "" {
+ id, err := expression.EvalExpression(SomeWorkflow3Idexpression, req)
+ if err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow3WorkflowName, err)
+ }
+ opts.WorkflowID = id
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = "my-task-queue-2"
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ } else if opts.RetryPolicy == nil {
+ opts.RetryPolicy = &temporal.RetryPolicy{
+ MaximumAttempts: int32(2),
+ }
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ } else if opts.WorkflowExecutionTimeout == 0 {
+ opts.WorkflowExecutionTimeout = 3600000000000 // 1 hour
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ opts.ParentClosePolicy = v
+ }
+ if v := o.waitForCancellation; v != nil {
+ opts.WaitForCancellation = *v
+ }
+ return opts, nil
+}
+
+// WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
+func (o *SomeWorkflow3ChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SomeWorkflow3ChildOptions {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *SomeWorkflow3ChildOptions) WithExecutionTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the WorkflowID value
+func (o *SomeWorkflow3ChildOptions) WithID(id string) *SomeWorkflow3ChildOptions {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *SomeWorkflow3ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow3ChildOptions {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithParentClosePolicy sets the WorkflowIDReusePolicy value
+func (o *SomeWorkflow3ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow3ChildOptions {
+ o.parentClosePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *SomeWorkflow3ChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SomeWorkflow3ChildOptions {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *SomeWorkflow3ChildOptions) WithRunTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *SomeWorkflow3ChildOptions) WithSearchAttributes(sa map[string]any) *SomeWorkflow3ChildOptions {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *SomeWorkflow3ChildOptions) WithTaskTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *SomeWorkflow3ChildOptions) WithTaskQueue(tq string) *SomeWorkflow3ChildOptions {
+ o.taskQueue = &tq
+ return o
+}
+
+// WithWaitForCancellation sets the WaitForCancellation value
+func (o *SomeWorkflow3ChildOptions) WithWaitForCancellation(wait bool) *SomeWorkflow3ChildOptions {
+ o.waitForCancellation = &wait
+ return o
+}
+
+// SomeWorkflow3ChildRun describes a child SomeWorkflow3 workflow run
+type SomeWorkflow3ChildRun struct {
+ Future workflow.ChildWorkflowFuture
+}
+
+// Get blocks until the workflow is completed, returning the response value
+func (r *SomeWorkflow3ChildRun) Get(ctx workflow.Context) error {
+ if err := r.Future.Get(ctx, nil); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Select adds this completion to the selector. Callback can be nil.
+func (r *SomeWorkflow3ChildRun) Select(sel workflow.Selector, fn func(*SomeWorkflow3ChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future, func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// SelectStart adds waiting for start to the selector. Callback can be nil.
+func (r *SomeWorkflow3ChildRun) SelectStart(sel workflow.Selector, fn func(*SomeWorkflow3ChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future.GetChildWorkflowExecution(), func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// WaitStart waits for the child workflow to start
+func (r *SomeWorkflow3ChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error) {
+ var exec workflow.Execution
+ if err := r.Future.GetChildWorkflowExecution().Get(ctx, &exec); err != nil {
+ return nil, err
+ }
+ return &exec, nil
+}
+
+// SomeSignal2 sends a(n) "mycompany.simple.Simple.SomeSignal2" signal request to the child workflow
+func (r *SomeWorkflow3ChildRun) SomeSignal2(ctx workflow.Context, input *SomeSignal2Request) error {
+ return r.SomeSignal2Async(ctx, input).Get(ctx, nil)
+}
+
+// SomeSignal2Async sends a(n) "mycompany.simple.Simple.SomeSignal2" signal request to the child workflow
+func (r *SomeWorkflow3ChildRun) SomeSignal2Async(ctx workflow.Context, input *SomeSignal2Request) workflow.Future {
+ return r.Future.SignalChildWorkflow(ctx, SomeSignal2SignalName, input)
+}
+
+// RegisterSomeWorkflow4Workflow registers a mycompany.simple.Simple.SomeWorkflow4 workflow with the given worker
+func RegisterSomeWorkflow4Workflow(r worker.WorkflowRegistry, wf func(workflow.Context, *SomeWorkflow4WorkflowInput) (SomeWorkflow4Workflow, error)) {
+ SomeWorkflow4Function = buildSomeWorkflow4(wf)
+ r.RegisterWorkflowWithOptions(SomeWorkflow4Function, workflow.RegisterOptions{Name: SomeWorkflow4WorkflowName})
+}
+
+// buildSomeWorkflow4 converts a SomeWorkflow4 workflow struct into a valid workflow function
+func buildSomeWorkflow4(ctor func(workflow.Context, *SomeWorkflow4WorkflowInput) (SomeWorkflow4Workflow, error)) func(workflow.Context, *v1.PaginatedRequest) (*v1.PaginatedResponse, error) {
+ return func(ctx workflow.Context, req *v1.PaginatedRequest) (*v1.PaginatedResponse, error) {
+ input := &SomeWorkflow4WorkflowInput{
Req: req,
- SomeSignal2: &SomeSignal2Signal{
- Channel: workflow.GetSignalChannel(ctx, SomeSignal2SignalName),
- },
}
wf, err := ctor(ctx, input)
if err != nil {
- return err
+ return nil, err
}
if initializable, ok := wf.(helpers.Initializable); ok {
if err := initializable.Initialize(ctx); err != nil {
- return err
+ return nil, err
}
}
return wf.Execute(ctx)
}
}
-// SomeWorkflow3WorkflowInput describes the input to a(n) mycompany.simple.Simple.SomeWorkflow3 workflow constructor
-type SomeWorkflow3WorkflowInput struct {
- Req *SomeWorkflow3Request
- SomeSignal2 *SomeSignal2Signal
+// SomeWorkflow4WorkflowInput describes the input to a(n) mycompany.simple.Simple.SomeWorkflow4 workflow constructor
+type SomeWorkflow4WorkflowInput struct {
+ Req *v1.PaginatedRequest
}
-// SomeWorkflow3 does some workflow thing.
-// Deprecated: Use SomeWorkflow2 instead.
+// SomeWorkflow4 retrieves a paginated list of items
//
-// workflow details: (name: "mycompany.simple.Simple.SomeWorkflow3", id: "some-workflow-3/${! id }/${! requestVal }")
-type SomeWorkflow3Workflow interface {
- // Execute defines the entrypoint to a(n) mycompany.simple.Simple.SomeWorkflow3 workflow
- //
- // Deprecated: Do not use.
- Execute(ctx workflow.Context) error
+// workflow details: (name: "mycompany.simple.Simple.SomeWorkflow4", id: "some-workflow-4/${! uuid_v4() }")
+type SomeWorkflow4Workflow interface {
+ // Execute defines the entrypoint to a(n) mycompany.simple.Simple.SomeWorkflow4 workflow
+ Execute(ctx workflow.Context) (*v1.PaginatedResponse, error)
}
-// SomeWorkflow3 does some workflow thing.
-// Deprecated: Use SomeWorkflow2 instead.
-func SomeWorkflow3Child(ctx workflow.Context, req *SomeWorkflow3Request, options ...*SomeWorkflow3ChildOptions) error {
- childRun, err := SomeWorkflow3ChildAsync(ctx, req, options...)
+// SomeWorkflow4 retrieves a paginated list of items
+func SomeWorkflow4Child(ctx workflow.Context, req *v1.PaginatedRequest, options ...*SomeWorkflow4ChildOptions) (*v1.PaginatedResponse, error) {
+ childRun, err := SomeWorkflow4ChildAsync(ctx, req, options...)
if err != nil {
- return err
+ return nil, err
}
return childRun.Get(ctx)
}
-// SomeWorkflow3 does some workflow thing.
-// Deprecated: Use SomeWorkflow2 instead.
-func SomeWorkflow3ChildAsync(ctx workflow.Context, req *SomeWorkflow3Request, options ...*SomeWorkflow3ChildOptions) (*SomeWorkflow3ChildRun, error) {
- var o *SomeWorkflow3ChildOptions
+// SomeWorkflow4 retrieves a paginated list of items
+func SomeWorkflow4ChildAsync(ctx workflow.Context, req *v1.PaginatedRequest, options ...*SomeWorkflow4ChildOptions) (*SomeWorkflow4ChildRun, error) {
+ var o *SomeWorkflow4ChildOptions
if len(options) > 0 && options[0] != nil {
o = options[0]
} else {
- o = NewSomeWorkflow3ChildOptions()
+ o = NewSomeWorkflow4ChildOptions()
}
opts, err := o.Build(ctx, req.ProtoReflect())
if err != nil {
return nil, fmt.Errorf("error initializing workflow.ChildWorkflowOptions: %w", err)
}
ctx = workflow.WithChildOptions(ctx, opts)
- return &SomeWorkflow3ChildRun{Future: workflow.ExecuteChildWorkflow(ctx, SomeWorkflow3WorkflowName, req)}, nil
+ return &SomeWorkflow4ChildRun{Future: workflow.ExecuteChildWorkflow(ctx, SomeWorkflow4WorkflowName, req)}, nil
}
-// SomeWorkflow3ChildOptions provides configuration for a child mycompany.simple.Simple.SomeWorkflow3 workflow operation
-type SomeWorkflow3ChildOptions struct {
+// SomeWorkflow4ChildOptions provides configuration for a child mycompany.simple.Simple.SomeWorkflow4 workflow operation
+type SomeWorkflow4ChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
-// NewSomeWorkflow3ChildOptions initializes a new SomeWorkflow3ChildOptions value
-func NewSomeWorkflow3ChildOptions() *SomeWorkflow3ChildOptions {
- return &SomeWorkflow3ChildOptions{}
+// NewSomeWorkflow4ChildOptions initializes a new SomeWorkflow4ChildOptions value
+func NewSomeWorkflow4ChildOptions() *SomeWorkflow4ChildOptions {
+ return &SomeWorkflow4ChildOptions{}
}
// Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
-func (o *SomeWorkflow3ChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
+func (o *SomeWorkflow4ChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
opts := o.options
if v := o.id; v != nil {
opts.WorkflowID = *v
} else if opts.WorkflowID == "" {
- id, err := expression.EvalExpression(SomeWorkflow3Idexpression, req)
- if err != nil {
- return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow3WorkflowName, err)
+ // wrap expression evaluation in local activity
+ // more info: https://cludden.github.io/protoc-gen-go-temporal/docs/guides/patches#pv_64-expression-evaluation-local-activity
+ if workflow.GetVersion(ctx, "cludden_protoc-gen-go-temporal_64_expression-evaluation-local-activity", workflow.DefaultVersion, 1) == 1 {
+ lao := workflow.GetLocalActivityOptions(ctx)
+ lao.ScheduleToCloseTimeout = time.Second * 10
+ if err := workflow.ExecuteLocalActivity(workflow.WithLocalActivityOptions(ctx, lao), func(ctx context.Context) (string, error) {
+ id, err := expression.EvalExpression(SomeWorkflow4Idexpression, req)
+ if err != nil {
+ return "", fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow4WorkflowName, err)
+ }
+ return id, nil
+ }).Get(ctx, &opts.WorkflowID); err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow4WorkflowName, err)
+ }
+ } else {
+ id, err := expression.EvalExpression(SomeWorkflow4Idexpression, req)
+ if err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", SomeWorkflow4WorkflowName, err)
+ }
+ opts.WorkflowID = id
}
- opts.WorkflowID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
} else if opts.TaskQueue == "" {
- opts.TaskQueue = "my-task-queue-2"
+ opts.TaskQueue = SimpleTaskQueue
}
if v := o.retryPolicy; v != nil {
opts.RetryPolicy = v
- } else if opts.RetryPolicy == nil {
- opts.RetryPolicy = &temporal.RetryPolicy{
- MaximumAttempts: int32(2),
- }
}
if v := o.searchAttributes; v != nil {
opts.SearchAttributes = o.searchAttributes
}
if v := o.executionTimeout; v != nil {
opts.WorkflowExecutionTimeout = *v
- } else if opts.WorkflowExecutionTimeout == 0 {
- opts.WorkflowExecutionTimeout = 3600000000000 // 1 hour
}
if v := o.runTimeout; v != nil {
opts.WorkflowRunTimeout = *v
@@ -2006,7 +2506,7 @@ func (o *SomeWorkflow3ChildOptions) Build(ctx workflow.Context, req protoreflect
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -2016,86 +2516,87 @@ func (o *SomeWorkflow3ChildOptions) Build(ctx workflow.Context, req protoreflect
}
// WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
-func (o *SomeWorkflow3ChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *SomeWorkflow4ChildOptions {
o.options = options
return o
}
// WithExecutionTimeout sets the WorkflowExecutionTimeout value
-func (o *SomeWorkflow3ChildOptions) WithExecutionTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithExecutionTimeout(d time.Duration) *SomeWorkflow4ChildOptions {
o.executionTimeout = &d
return o
}
// WithID sets the WorkflowID value
-func (o *SomeWorkflow3ChildOptions) WithID(id string) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithID(id string) *SomeWorkflow4ChildOptions {
o.id = &id
return o
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow3ChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeWorkflow4ChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeWorkflow3ChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow4ChildOptions {
o.parentClosePolicy = policy
return o
}
// WithRetryPolicy sets the RetryPolicy value
-func (o *SomeWorkflow3ChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *SomeWorkflow4ChildOptions {
o.retryPolicy = policy
return o
}
// WithRunTimeout sets the WorkflowRunTimeout value
-func (o *SomeWorkflow3ChildOptions) WithRunTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithRunTimeout(d time.Duration) *SomeWorkflow4ChildOptions {
o.runTimeout = &d
return o
}
// WithSearchAttributes sets the SearchAttributes value
-func (o *SomeWorkflow3ChildOptions) WithSearchAttributes(sa map[string]any) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithSearchAttributes(sa map[string]any) *SomeWorkflow4ChildOptions {
o.searchAttributes = sa
return o
}
// WithTaskTimeout sets the WorkflowTaskTimeout value
-func (o *SomeWorkflow3ChildOptions) WithTaskTimeout(d time.Duration) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithTaskTimeout(d time.Duration) *SomeWorkflow4ChildOptions {
o.taskTimeout = &d
return o
}
// WithTaskQueue sets the TaskQueue value
-func (o *SomeWorkflow3ChildOptions) WithTaskQueue(tq string) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithTaskQueue(tq string) *SomeWorkflow4ChildOptions {
o.taskQueue = &tq
return o
}
// WithWaitForCancellation sets the WaitForCancellation value
-func (o *SomeWorkflow3ChildOptions) WithWaitForCancellation(wait bool) *SomeWorkflow3ChildOptions {
+func (o *SomeWorkflow4ChildOptions) WithWaitForCancellation(wait bool) *SomeWorkflow4ChildOptions {
o.waitForCancellation = &wait
return o
}
-// SomeWorkflow3ChildRun describes a child SomeWorkflow3 workflow run
-type SomeWorkflow3ChildRun struct {
+// SomeWorkflow4ChildRun describes a child SomeWorkflow4 workflow run
+type SomeWorkflow4ChildRun struct {
Future workflow.ChildWorkflowFuture
}
// Get blocks until the workflow is completed, returning the response value
-func (r *SomeWorkflow3ChildRun) Get(ctx workflow.Context) error {
- if err := r.Future.Get(ctx, nil); err != nil {
- return err
+func (r *SomeWorkflow4ChildRun) Get(ctx workflow.Context) (*v1.PaginatedResponse, error) {
+ var resp v1.PaginatedResponse
+ if err := r.Future.Get(ctx, &resp); err != nil {
+ return nil, err
}
- return nil
+ return &resp, nil
}
// Select adds this completion to the selector. Callback can be nil.
-func (r *SomeWorkflow3ChildRun) Select(sel workflow.Selector, fn func(*SomeWorkflow3ChildRun)) workflow.Selector {
+func (r *SomeWorkflow4ChildRun) Select(sel workflow.Selector, fn func(*SomeWorkflow4ChildRun)) workflow.Selector {
return sel.AddFuture(r.Future, func(workflow.Future) {
if fn != nil {
fn(r)
@@ -2104,7 +2605,7 @@ func (r *SomeWorkflow3ChildRun) Select(sel workflow.Selector, fn func(*SomeWorkf
}
// SelectStart adds waiting for start to the selector. Callback can be nil.
-func (r *SomeWorkflow3ChildRun) SelectStart(sel workflow.Selector, fn func(*SomeWorkflow3ChildRun)) workflow.Selector {
+func (r *SomeWorkflow4ChildRun) SelectStart(sel workflow.Selector, fn func(*SomeWorkflow4ChildRun)) workflow.Selector {
return sel.AddFuture(r.Future.GetChildWorkflowExecution(), func(workflow.Future) {
if fn != nil {
fn(r)
@@ -2113,7 +2614,7 @@ func (r *SomeWorkflow3ChildRun) SelectStart(sel workflow.Selector, fn func(*Some
}
// WaitStart waits for the child workflow to start
-func (r *SomeWorkflow3ChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error) {
+func (r *SomeWorkflow4ChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error) {
var exec workflow.Execution
if err := r.Future.GetChildWorkflowExecution().Get(ctx, &exec); err != nil {
return nil, err
@@ -2121,16 +2622,6 @@ func (r *SomeWorkflow3ChildRun) WaitStart(ctx workflow.Context) (*workflow.Execu
return &exec, nil
}
-// SomeSignal2 sends a(n) "mycompany.simple.Simple.SomeSignal2" signal request to the child workflow
-func (r *SomeWorkflow3ChildRun) SomeSignal2(ctx workflow.Context, input *SomeSignal2Request) error {
- return r.SomeSignal2Async(ctx, input).Get(ctx, nil)
-}
-
-// SomeSignal2Async sends a(n) "mycompany.simple.Simple.SomeSignal2" signal request to the child workflow
-func (r *SomeWorkflow3ChildRun) SomeSignal2Async(ctx workflow.Context, input *SomeSignal2Request) workflow.Future {
- return r.Future.SignalChildWorkflow(ctx, SomeSignal2SignalName, input)
-}
-
// SomeSignal1Signal describes a(n) mycompany.simple.Simple.SomeSignal1 signal
type SomeSignal1Signal struct {
Channel workflow.ReceiveChannel
@@ -4395,6 +4886,35 @@ func (c *TestSimpleClient) SomeWorkflow3WithSomeSignal2Async(ctx context.Context
return c.SomeWorkflow3Async(ctx, req, opts...)
}
+// SomeWorkflow4 executes a(n) mycompany.simple.Simple.SomeWorkflow4 workflow in the test environment
+func (c *TestSimpleClient) SomeWorkflow4(ctx context.Context, req *v1.PaginatedRequest, opts ...*SomeWorkflow4Options) (*v1.PaginatedResponse, error) {
+ run, err := c.SomeWorkflow4Async(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// SomeWorkflow4Async executes a(n) mycompany.simple.Simple.SomeWorkflow4 workflow in the test environment
+func (c *TestSimpleClient) SomeWorkflow4Async(ctx context.Context, req *v1.PaginatedRequest, options ...*SomeWorkflow4Options) (SomeWorkflow4Run, error) {
+ var o *SomeWorkflow4Options
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewSomeWorkflow4Options()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ return &testSomeWorkflow4Run{client: c, env: c.env, opts: &opts, req: req, workflows: c.workflows}, nil
+}
+
+// GetSomeWorkflow4 is a noop
+func (c *TestSimpleClient) GetSomeWorkflow4(ctx context.Context, workflowID string, runID string) SomeWorkflow4Run {
+ return &testSomeWorkflow4Run{env: c.env, workflows: c.workflows}
+}
+
// CancelWorkflow requests cancellation of an existing workflow execution
func (c *TestSimpleClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error {
c.env.CancelWorkflow()
@@ -4462,7 +4982,7 @@ func (c *TestSimpleClient) SomeUpdate1(ctx context.Context, workflowID string, r
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.SomeUpdate1Async(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
@@ -4734,6 +5254,61 @@ func (r *testSomeWorkflow3Run) SomeSignal2(ctx context.Context, req *SomeSignal2
return r.client.SomeSignal2(ctx, r.ID(), r.RunID(), req)
}
+var _ SomeWorkflow4Run = &testSomeWorkflow4Run{}
+
+// testSomeWorkflow4Run provides convenience methods for interacting with a(n) mycompany.simple.Simple.SomeWorkflow4 workflow in the test environment
+type testSomeWorkflow4Run struct {
+ client *TestSimpleClient
+ env *testsuite.TestWorkflowEnvironment
+ opts *client.StartWorkflowOptions
+ req *v1.PaginatedRequest
+ workflows SimpleWorkflows
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *testSomeWorkflow4Run) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get retrieves a test mycompany.simple.Simple.SomeWorkflow4 workflow result
+func (r *testSomeWorkflow4Run) Get(context.Context) (*v1.PaginatedResponse, error) {
+ r.env.ExecuteWorkflow(SomeWorkflow4WorkflowName, r.req)
+ if !r.env.IsWorkflowCompleted() {
+ return nil, errors.New("workflow in progress")
+ }
+ if err := r.env.GetWorkflowError(); err != nil {
+ return nil, err
+ }
+ var result v1.PaginatedResponse
+ if err := r.env.GetWorkflowResult(&result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// ID returns a test mycompany.simple.Simple.SomeWorkflow4 workflow run's workflow ID
+func (r *testSomeWorkflow4Run) ID() string {
+ if r.opts != nil {
+ return r.opts.ID
+ }
+ return ""
+}
+
+// Run noop implementation
+func (r *testSomeWorkflow4Run) Run() client.WorkflowRun {
+ return nil
+}
+
+// RunID noop implementation
+func (r *testSomeWorkflow4Run) RunID() string {
+ return ""
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *testSomeWorkflow4Run) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
// SimpleCliOptions describes runtime configuration for mycompany.simple.Simple cli
type SimpleCliOptions struct {
after func(*v2.Context) error
@@ -5410,6 +5985,83 @@ func newSimpleCommands(options ...*SimpleCliOptions) ([]*v2.Command, error) {
}
},
},
+ {
+ Name: "some-workflow-4",
+ Usage: "SomeWorkflow4 retrieves a paginated list of items",
+ Category: "WORKFLOWS",
+ UseShortOptionHandling: true,
+ Before: opts.before,
+ After: opts.after,
+ Flags: []v2.Flag{
+ &v2.BoolFlag{
+ Name: "detach",
+ Usage: "run workflow in the background and print workflow and execution id",
+ Aliases: []string{"d"},
+ },
+ &v2.StringFlag{
+ Name: "task-queue",
+ Usage: "task queue name",
+ Aliases: []string{"t"},
+ EnvVars: []string{"TEMPORAL_TASK_QUEUE_NAME", "TEMPORAL_TASK_QUEUE", "TASK_QUEUE_NAME", "TASK_QUEUE"},
+ Value: "my-task-queue",
+ },
+ &v2.StringFlag{
+ Name: "input-file",
+ Usage: "path to json-formatted input file",
+ Aliases: []string{"f"},
+ },
+ &v2.Uint64Flag{
+ Name: "limit",
+ Usage: "set the value of the operation's \"Limit\" parameter",
+ Category: "INPUT",
+ },
+ &v2.StringFlag{
+ Name: "cursor",
+ Usage: "set the value of the operation's \"Cursor\" parameter (base64-encoded)",
+ Category: "INPUT",
+ },
+ },
+ Action: func(cmd *v2.Context) error {
+ tc, err := opts.clientForCommand(cmd)
+ if err != nil {
+ return fmt.Errorf("error initializing client for command: %w", err)
+ }
+ defer tc.Close()
+ c := NewSimpleClient(tc)
+ req, err := UnmarshalCliFlagsToPaginatedRequest(cmd)
+ if err != nil {
+ return fmt.Errorf("error unmarshalling request: %w", err)
+ }
+ opts := client.StartWorkflowOptions{}
+ if tq := cmd.String("task-queue"); tq != "" {
+ opts.TaskQueue = tq
+ }
+ run, err := c.SomeWorkflow4Async(cmd.Context, req, NewSomeWorkflow4Options().WithStartWorkflowOptions(opts))
+ if err != nil {
+ return fmt.Errorf("error starting %s workflow: %w", SomeWorkflow4WorkflowName, err)
+ }
+ if cmd.Bool("detach") {
+ fmt.Println("success")
+ fmt.Printf("workflow id: %s\n", run.ID())
+ fmt.Printf("run id: %s\n", run.RunID())
+ return nil
+ }
+ if resp, err := run.Get(cmd.Context); err != nil {
+ return err
+ } else {
+ b, err := protojson.Marshal(resp)
+ if err != nil {
+ return fmt.Errorf("error serializing response json: %w", err)
+ }
+ var out bytes.Buffer
+ if err := json.Indent(&out, b, "", " "); err != nil {
+ return fmt.Errorf("error formatting json: %w", err)
+ }
+ fmt.Println(out.String())
+ return nil
+ }
+ },
+ },
}
if opts.worker != nil {
commands = append(commands, []*v2.Command{
@@ -5623,6 +6275,42 @@ func UnmarshalCliFlagsToSomeWorkflow3Request(cmd *v2.Context) (*SomeWorkflow3Req
return &result, nil
}
+// UnmarshalCliFlagsToPaginatedRequest unmarshals a PaginatedRequest from command line flags
+func UnmarshalCliFlagsToPaginatedRequest(cmd *v2.Context) (*v1.PaginatedRequest, error) {
+ var result v1.PaginatedRequest
+ var hasValues bool
+ if cmd.IsSet("input-file") {
+ inputFile, err := gohomedir.Expand(cmd.String("input-file"))
+ if err != nil {
+ inputFile = cmd.String("input-file")
+ }
+ b, err := os.ReadFile(inputFile)
+ if err != nil {
+ return nil, fmt.Errorf("error reading input-file: %w", err)
+ }
+ if err := protojson.Unmarshal(b, &result); err != nil {
+ return nil, fmt.Errorf("error parsing input-file json: %w", err)
+ }
+ hasValues = true
+ }
+ if cmd.IsSet("limit") {
+ hasValues = true
+ result.Limit = uint32(cmd.Uint64("limit"))
+ }
+ if cmd.IsSet("cursor") {
+ hasValues = true
+ v, err := base64.StdEncoding.DecodeString(cmd.String("cursor"))
+ if err != nil {
+ return nil, fmt.Errorf("error base64-decoding \"cursor\" flag: %w", err)
+ }
+ result.Cursor = v
+ }
+ if !hasValues {
+ return nil, nil
+ }
+ return &result, nil
+}
+
// WithSimpleSchemeTypes registers all Simple protobuf types with the given scheme
func WithSimpleSchemeTypes() scheme.Option {
return func(s *scheme.Scheme) {
@@ -5856,7 +6544,7 @@ func (c *otherClient) OtherUpdate(ctx context.Context, workflowID string, runID
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.OtherUpdateAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.OtherUpdateAsync(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -5902,7 +6590,7 @@ type OtherWorkflowOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -5927,7 +6615,7 @@ func (o *OtherWorkflowOptions) Build(req protoreflect.Message) (client.StartWork
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -5972,7 +6660,7 @@ func (o *OtherWorkflowOptions) WithID(id string) *OtherWorkflowOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *OtherWorkflowOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *OtherWorkflowOptions {
+func (o *OtherWorkflowOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *OtherWorkflowOptions {
o.idReusePolicy = policy
return o
}
@@ -6135,7 +6823,7 @@ func (h *otherUpdateHandle) Get(ctx context.Context) (*OtherUpdateResponse, erro
type OtherUpdateOptions struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewOtherUpdateOptions initializes a new OtherUpdateOptions value
@@ -6170,8 +6858,8 @@ func (o *OtherUpdateOptions) Build(workflowID string, runID string, req *OtherUp
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
}
return opts, nil
}
@@ -6189,7 +6877,7 @@ func (o *OtherUpdateOptions) WithUpdateWorkflowOptions(options client.UpdateWork
}
// WithWaitPolicy sets the WaitPolicy
-func (o *OtherUpdateOptions) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *OtherUpdateOptions {
+func (o *OtherUpdateOptions) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *OtherUpdateOptions {
o.waitPolicy = policy
return o
}
@@ -6302,13 +6990,13 @@ type OtherWorkflowChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -6336,7 +7024,7 @@ func (o *OtherWorkflowChildOptions) Build(ctx workflow.Context, req protoreflect
return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", OtherWorkflowWorkflowName, err)
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -6359,7 +7047,7 @@ func (o *OtherWorkflowChildOptions) Build(ctx workflow.Context, req protoreflect
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -6387,13 +7075,13 @@ func (o *OtherWorkflowChildOptions) WithID(id string) *OtherWorkflowChildOptions
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *OtherWorkflowChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *OtherWorkflowChildOptions {
+func (o *OtherWorkflowChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *OtherWorkflowChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *OtherWorkflowChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *OtherWorkflowChildOptions {
+func (o *OtherWorkflowChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *OtherWorkflowChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -6871,7 +7559,7 @@ func (c *TestOtherClient) OtherUpdate(ctx context.Context, workflowID string, ru
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.OtherUpdateAsync(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
@@ -7758,7 +8446,7 @@ type WhatOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -7783,7 +8471,7 @@ func (o *WhatOptions) Build(req protoreflect.Message) (client.StartWorkflowOptio
}
opts.ID = id
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -7828,7 +8516,7 @@ func (o *WhatOptions) WithID(id string) *WhatOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *WhatOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *WhatOptions {
+func (o *WhatOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *WhatOptions {
o.idReusePolicy = policy
return o
}
@@ -8028,13 +8716,13 @@ type WhatChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -8071,7 +8759,7 @@ func (o *WhatChildOptions) Build(ctx workflow.Context, req protoreflect.Message)
opts.WorkflowID = id
}
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -8094,7 +8782,7 @@ func (o *WhatChildOptions) Build(ctx workflow.Context, req protoreflect.Message)
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -8122,13 +8810,13 @@ func (o *WhatChildOptions) WithID(id string) *WhatChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *WhatChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *WhatChildOptions {
+func (o *WhatChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *WhatChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *WhatChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *WhatChildOptions {
+func (o *WhatChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *WhatChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -9293,7 +9981,7 @@ func (c *deprecatedClient) SomeDeprecatedUpdate1(ctx context.Context, workflowID
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.SomeDeprecatedUpdate1Async(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.SomeDeprecatedUpdate1Async(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -9351,7 +10039,7 @@ func (c *deprecatedClient) SomeDeprecatedUpdate2(ctx context.Context, workflowID
}
// call sync update with UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED wait policy
- handle, err := c.SomeDeprecatedUpdate2Async(ctx, workflowID, runID, req, o.WithWaitPolicy(v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
+ handle, err := c.SomeDeprecatedUpdate2Async(ctx, workflowID, runID, req, o.WithWaitPolicy(enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED))
if err != nil {
return nil, err
}
@@ -9401,7 +10089,7 @@ type SomeDeprecatedWorkflow1Options struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -9420,7 +10108,7 @@ func (o *SomeDeprecatedWorkflow1Options) Build(req protoreflect.Message) (client
if v := o.id; v != nil {
opts.ID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -9465,7 +10153,7 @@ func (o *SomeDeprecatedWorkflow1Options) WithID(id string) *SomeDeprecatedWorkfl
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow1Options) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow1Options {
+func (o *SomeDeprecatedWorkflow1Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow1Options {
o.idReusePolicy = policy
return o
}
@@ -9614,7 +10302,7 @@ type SomeDeprecatedWorkflow2Options struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -9633,7 +10321,7 @@ func (o *SomeDeprecatedWorkflow2Options) Build(req protoreflect.Message) (client
if v := o.id; v != nil {
opts.ID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -9678,7 +10366,7 @@ func (o *SomeDeprecatedWorkflow2Options) WithID(id string) *SomeDeprecatedWorkfl
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow2Options) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow2Options {
+func (o *SomeDeprecatedWorkflow2Options) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow2Options {
o.idReusePolicy = policy
return o
}
@@ -9889,7 +10577,7 @@ func (h *someDeprecatedUpdate1Handle) Get(ctx context.Context) (*SomeDeprecatedM
type SomeDeprecatedUpdate1Options struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewSomeDeprecatedUpdate1Options initializes a new SomeDeprecatedUpdate1Options value
@@ -9918,8 +10606,8 @@ func (o *SomeDeprecatedUpdate1Options) Build(workflowID string, runID string, re
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
}
return opts, nil
}
@@ -9937,7 +10625,7 @@ func (o *SomeDeprecatedUpdate1Options) WithUpdateWorkflowOptions(options client.
}
// WithWaitPolicy sets the WaitPolicy
-func (o *SomeDeprecatedUpdate1Options) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *SomeDeprecatedUpdate1Options {
+func (o *SomeDeprecatedUpdate1Options) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *SomeDeprecatedUpdate1Options {
o.waitPolicy = policy
return o
}
@@ -10009,7 +10697,7 @@ func (h *someDeprecatedUpdate2Handle) Get(ctx context.Context) (*SomeDeprecatedM
type SomeDeprecatedUpdate2Options struct {
Options *client.UpdateWorkflowWithOptionsRequest
id *string
- waitPolicy v1.UpdateWorkflowExecutionLifecycleStage
+ waitPolicy enumsv1.UpdateWorkflowExecutionLifecycleStage
}
// NewSomeDeprecatedUpdate2Options initializes a new SomeDeprecatedUpdate2Options value
@@ -10038,8 +10726,8 @@ func (o *SomeDeprecatedUpdate2Options) Build(workflowID string, runID string, re
}
// set WaitPolicy
- if v := o.waitPolicy; v != v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
- opts.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v}
+ if v := o.waitPolicy; v != enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED {
+ opts.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: v}
}
return opts, nil
}
@@ -10057,7 +10745,7 @@ func (o *SomeDeprecatedUpdate2Options) WithUpdateWorkflowOptions(options client.
}
// WithWaitPolicy sets the WaitPolicy
-func (o *SomeDeprecatedUpdate2Options) WithWaitPolicy(policy v1.UpdateWorkflowExecutionLifecycleStage) *SomeDeprecatedUpdate2Options {
+func (o *SomeDeprecatedUpdate2Options) WithWaitPolicy(policy enumsv1.UpdateWorkflowExecutionLifecycleStage) *SomeDeprecatedUpdate2Options {
o.waitPolicy = policy
return o
}
@@ -10233,13 +10921,13 @@ type SomeDeprecatedWorkflow1ChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -10254,7 +10942,7 @@ func (o *SomeDeprecatedWorkflow1ChildOptions) Build(ctx workflow.Context, req pr
if v := o.id; v != nil {
opts.WorkflowID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -10277,7 +10965,7 @@ func (o *SomeDeprecatedWorkflow1ChildOptions) Build(ctx workflow.Context, req pr
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -10305,13 +10993,13 @@ func (o *SomeDeprecatedWorkflow1ChildOptions) WithID(id string) *SomeDeprecatedW
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow1ChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow1ChildOptions {
+func (o *SomeDeprecatedWorkflow1ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow1ChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow1ChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SomeDeprecatedWorkflow1ChildOptions {
+func (o *SomeDeprecatedWorkflow1ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeDeprecatedWorkflow1ChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -10502,13 +11190,13 @@ type SomeDeprecatedWorkflow2ChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -10523,7 +11211,7 @@ func (o *SomeDeprecatedWorkflow2ChildOptions) Build(ctx workflow.Context, req pr
if v := o.id; v != nil {
opts.WorkflowID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -10546,7 +11234,7 @@ func (o *SomeDeprecatedWorkflow2ChildOptions) Build(ctx workflow.Context, req pr
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -10574,13 +11262,13 @@ func (o *SomeDeprecatedWorkflow2ChildOptions) WithID(id string) *SomeDeprecatedW
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow2ChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow2ChildOptions {
+func (o *SomeDeprecatedWorkflow2ChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SomeDeprecatedWorkflow2ChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SomeDeprecatedWorkflow2ChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SomeDeprecatedWorkflow2ChildOptions {
+func (o *SomeDeprecatedWorkflow2ChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeDeprecatedWorkflow2ChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -11489,7 +12177,7 @@ func (c *TestDeprecatedClient) SomeDeprecatedUpdate1(ctx context.Context, workfl
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.SomeDeprecatedUpdate1Async(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
@@ -11571,7 +12259,7 @@ func (c *TestDeprecatedClient) SomeDeprecatedUpdate2(ctx context.Context, workfl
if len(opts) > 0 && opts[0].Options != nil {
options = opts[0]
}
- options.Options.WaitPolicy = &v11.WaitPolicy{LifecycleStage: v1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
+ options.Options.WaitPolicy = &updatev1.WaitPolicy{LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED}
handle, err := c.SomeDeprecatedUpdate2Async(ctx, workflowID, runID, req, options)
if err != nil {
return nil, err
diff --git a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
index d2f6d1ba..1e4b362b 100644
--- a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
+++ b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -12,14 +12,15 @@ import (
"context"
"errors"
"fmt"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ v11 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
- v14 "go.temporal.io/api/update/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
+ updatev1 "go.temporal.io/api/update/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -105,6 +106,9 @@ func RegisterSimpleActivities(r worker.ActivityRegistry, c v1.SimpleClient, opti
if name := simpleOptions.filterActivity("mycompany.simple.Simple.SomeWorkflow3WithSomeSignal2"); name != "" {
r.RegisterActivityWithOptions(a.SomeWorkflow3WithSomeSignal2, activity.RegisterOptions{Name: name})
}
+ if name := simpleOptions.filterActivity(v1.SomeWorkflow4WorkflowName); name != "" {
+ r.RegisterActivityWithOptions(a.SomeWorkflow4, activity.RegisterOptions{Name: name})
+ }
if name := simpleOptions.filterActivity(v1.SomeQuery1QueryName); name != "" {
r.RegisterActivityWithOptions(a.SomeQuery1, activity.RegisterOptions{Name: name})
}
@@ -130,7 +134,7 @@ type SomeWorkflow1WorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -158,7 +162,7 @@ func (opts *SomeWorkflow1WorkflowOptions) WithHeartbeatInterval(d time.Duration)
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SomeWorkflow1WorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SomeWorkflow1WorkflowOptions {
+func (opts *SomeWorkflow1WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow1WorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -375,21 +379,21 @@ func SomeWorkflow1Async(ctx workflow.Context, req *v1.SomeWorkflow1Request, opts
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someWorkflow1Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -404,7 +408,7 @@ type SomeWorkflow2WorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -432,7 +436,7 @@ func (opts *SomeWorkflow2WorkflowOptions) WithHeartbeatInterval(d time.Duration)
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SomeWorkflow2WorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SomeWorkflow2WorkflowOptions {
+func (opts *SomeWorkflow2WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow2WorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -610,21 +614,21 @@ func SomeWorkflow2Async(ctx workflow.Context, opts ...*SomeWorkflow2WorkflowOpti
return nil, fmt.Errorf("error marshalling start workflow options: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someWorkflow2Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -716,21 +720,21 @@ func SomeWorkflow2WithSomeSignal1Async(ctx workflow.Context, opts ...*SomeWorkfl
return nil, fmt.Errorf("error marshalling start workflow options: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someWorkflow2Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -744,7 +748,7 @@ type SomeWorkflow3WorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -772,7 +776,7 @@ func (opts *SomeWorkflow3WorkflowOptions) WithHeartbeatInterval(d time.Duration)
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SomeWorkflow3WorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SomeWorkflow3WorkflowOptions {
+func (opts *SomeWorkflow3WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow3WorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -944,21 +948,21 @@ func SomeWorkflow3Async(ctx workflow.Context, req *v1.SomeWorkflow3Request, opts
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someWorkflow3Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -1069,21 +1073,21 @@ func SomeWorkflow3WithSomeSignal2Async(ctx workflow.Context, req *v1.SomeWorkflo
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someWorkflow3Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -1094,6 +1098,216 @@ func SomeWorkflow3WithSomeSignal2Async(ctx workflow.Context, req *v1.SomeWorkflo
}, nil
}
+// SomeWorkflow4WorkflowOptions are used to configure a(n) mycompany.simple.Simple.SomeWorkflow4 workflow execution
+type SomeWorkflow4WorkflowOptions struct {
+ ActivityOptions *workflow.ActivityOptions
+ Detached bool
+ HeartbeatInterval time.Duration
+ ParentClosePolicy enumsv1.ParentClosePolicy
+ StartWorkflowOptions *client.StartWorkflowOptions
+}
+
+// NewSomeWorkflow4WorkflowOptions initializes a new SomeWorkflow4WorkflowOptions value
+func NewSomeWorkflow4WorkflowOptions() *SomeWorkflow4WorkflowOptions {
+ return &SomeWorkflow4WorkflowOptions{}
+}
+
+// WithActivityOptions can be used to customize the activity options
+func (opts *SomeWorkflow4WorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *SomeWorkflow4WorkflowOptions {
+ opts.ActivityOptions = &ao
+ return opts
+}
+
+// WithDetached can be used to start a workflow execution and exit immediately
+func (opts *SomeWorkflow4WorkflowOptions) WithDetached(d bool) *SomeWorkflow4WorkflowOptions {
+ opts.Detached = d
+ return opts
+}
+
+// WithHeartbeatInterval can be used to customize the activity heartbeat interval
+func (opts *SomeWorkflow4WorkflowOptions) WithHeartbeatInterval(d time.Duration) *SomeWorkflow4WorkflowOptions {
+ opts.HeartbeatInterval = d
+ return opts
+}
+
+// WithParentClosePolicy can be used to customize the cancellation propagation behavior
+func (opts *SomeWorkflow4WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeWorkflow4WorkflowOptions {
+ opts.ParentClosePolicy = policy
+ return opts
+}
+
+// WithStartWorkflowOptions can be used to customize the start workflow options
+func (opts *SomeWorkflow4WorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *SomeWorkflow4WorkflowOptions {
+ opts.StartWorkflowOptions = &swo
+ return opts
+}
+
+// SomeWorkflow4Run provides a handle to a mycompany.simple.Simple.SomeWorkflow4 workflow execution
+type SomeWorkflow4Run interface {
+ // Cancel cancels the workflow
+ Cancel(workflow.Context) error
+
+ // Future returns the inner workflow.Future
+ Future() workflow.Future
+
+ // Get returns the inner workflow.Future
+ Get(workflow.Context) (*v11.PaginatedResponse, error)
+
+ // ID returns the workflow id
+ ID() string
+}
+
+// someWorkflow4Run provides a(n) SomeWorkflow4Run implementation
+type someWorkflow4Run struct {
+ cancel func()
+ future workflow.Future
+ id string
+}
+
+// Cancel the underlying workflow execution
+func (r *someWorkflow4Run) Cancel(ctx workflow.Context) error {
+ if r.cancel != nil {
+ r.cancel()
+ if _, err := r.Get(ctx); err != nil && !errors.Is(err, workflow.ErrCanceled) {
+ return err
+ }
+ return nil
+ }
+ return CancelSimpleWorkflow(ctx, r.id, "")
+}
+
+// Future returns the underlying activity future
+func (r *someWorkflow4Run) Future() workflow.Future {
+ return r.future
+}
+
+// Get blocks on activity completion and returns the underlying workflow result
+func (r *someWorkflow4Run) Get(ctx workflow.Context) (*v11.PaginatedResponse, error) {
+ var resp v11.PaginatedResponse
+ if err := r.future.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// ID returns the underlying workflow id
+func (r *someWorkflow4Run) ID() string {
+ return r.id
+}
+
+// SomeWorkflow4 retrieves a paginated list of items
+func SomeWorkflow4(ctx workflow.Context, req *v11.PaginatedRequest, opts ...*SomeWorkflow4WorkflowOptions) (*v11.PaginatedResponse, error) {
+ run, err := SomeWorkflow4Async(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// SomeWorkflow4 retrieves a paginated list of items
+func SomeWorkflow4Async(ctx workflow.Context, req *v11.PaginatedRequest, opts ...*SomeWorkflow4WorkflowOptions) (SomeWorkflow4Run, error) {
+ activityName := simpleOptions.filterActivity(v1.SomeWorkflow4WorkflowName)
+ if activityName == "" {
+ return nil, temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("no activity registered for %s", v1.SomeWorkflow4WorkflowName),
+ "Unimplemented",
+ nil,
+ )
+ }
+
+ opt := &SomeWorkflow4WorkflowOptions{}
+ if len(opts) > 0 && opts[0] != nil {
+ opt = opts[0]
+ }
+ if opt.HeartbeatInterval == 0 {
+ opt.HeartbeatInterval = time.Second * 30
+ }
+
+ // configure activity options
+ ao := workflow.GetActivityOptions(ctx)
+ if opt.ActivityOptions != nil {
+ ao = *opt.ActivityOptions
+ }
+ if ao.HeartbeatTimeout == 0 {
+ ao.HeartbeatTimeout = opt.HeartbeatInterval * 2
+ }
+ // WaitForCancellation must be set otherwise the underlying workflow is not guaranteed to be canceled
+ ao.WaitForCancellation = true
+
+ if ao.StartToCloseTimeout == 0 && ao.ScheduleToCloseTimeout == 0 {
+ ao.ScheduleToCloseTimeout = 86400000000000 // 1 day
+ }
+ ctx = workflow.WithActivityOptions(ctx, ao)
+
+ // configure start workflow options
+ wo := client.StartWorkflowOptions{}
+ if opt.StartWorkflowOptions != nil {
+ wo = *opt.StartWorkflowOptions
+ }
+ if wo.ID == "" {
+ if err := workflow.SideEffect(ctx, func(ctx workflow.Context) any {
+ id, err := expression.EvalExpression(v1.SomeWorkflow4Idexpression, req.ProtoReflect())
+ if err != nil {
+ workflow.GetLogger(ctx).Error("error evaluating id expression for \"mycompany.simple.Simple.SomeWorkflow4\" workflow", "error", err)
+ return nil
+ }
+ return id
+ }).Get(&wo.ID); err != nil {
+ return nil, err
+ }
+ }
+ if wo.ID == "" {
+ if err := workflow.SideEffect(ctx, func(ctx workflow.Context) any {
+ id, err := uuid.NewRandom()
+ if err != nil {
+ workflow.GetLogger(ctx).Error("error generating workflow id", "error", err)
+ return nil
+ }
+ return id
+ }).Get(&wo.ID); err != nil {
+ return nil, err
+ }
+ }
+ if wo.ID == "" {
+ return nil, temporal.NewNonRetryableApplicationError("workflow id is required", "InvalidArgument", nil)
+ }
+
+ // marshal start workflow options protobuf message
+ swo, err := xns.MarshalStartWorkflowOptions(wo)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling start workflow options: %w", err)
+ }
+
+ // marshal workflow request protobuf message
+ wreq, err := anypb.New(req)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling workflow request: %w", err)
+ }
+
+ var parentClosePolicy temporalv1.ParentClosePolicy
+ switch opt.ParentClosePolicy {
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ }
+
+ ctx, cancel := workflow.WithCancel(ctx)
+ return &someWorkflow4Run{
+ cancel: cancel,
+ id: wo.ID,
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
+ Detached: opt.Detached,
+ HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
+ ParentClosePolicy: parentClosePolicy,
+ Request: wreq,
+ StartWorkflowOptions: swo,
+ }),
+ }, nil
+}
+
// SomeQuery1QueryOptions are used to configure a(n) mycompany.simple.Simple.SomeQuery1 query execution
type SomeQuery1QueryOptions struct {
ActivityOptions *workflow.ActivityOptions
@@ -1206,7 +1420,7 @@ func SomeQuery1Async(ctx workflow.Context, workflowID string, runID string, opts
ctx, cancel := workflow.WithCancel(ctx)
return &someQuery1QueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1332,7 +1546,7 @@ func SomeQuery2Async(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &someQuery2QueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1447,7 +1661,7 @@ func SomeSignal1Async(ctx workflow.Context, workflowID string, runID string, opt
ctx, cancel := workflow.WithCancel(ctx)
return &someSignal1SignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1567,7 +1781,7 @@ func SomeSignal2Async(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &someSignal2SignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1688,7 +1902,7 @@ func SomeSignal3Async(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &someSignal3SignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -1870,7 +2084,7 @@ func SomeUpdate1Async(ctx workflow.Context, workflowID string, runID string, req
return &someUpdate1Handle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -1914,7 +2128,7 @@ func (a *simpleActivities) CancelWorkflow(ctx context.Context, workflowID string
}
// SomeWorkflow1 executes a(n) mycompany.simple.SomeWorkflow1 workflow via an activity
-func (a *simpleActivities) SomeWorkflow1(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.SomeWorkflow1Response, err error) {
+func (a *simpleActivities) SomeWorkflow1(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.SomeWorkflow1Response, err error) {
// unmarshal workflow request
var req v1.SomeWorkflow1Request
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -1974,10 +2188,10 @@ func (a *simpleActivities) SomeWorkflow1(ctx context.Context, input *v13.Workflo
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -1997,7 +2211,7 @@ func (a *simpleActivities) SomeWorkflow1(ctx context.Context, input *v13.Workflo
}
// SomeWorkflow2 executes a(n) mycompany.simple.SomeWorkflow2 workflow via an activity
-func (a *simpleActivities) SomeWorkflow2(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *simpleActivities) SomeWorkflow2(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// initialize workflow execution
var run v1.SomeWorkflow2Run
run, err = a.client.SomeWorkflow2Async(ctx, v1.NewSomeWorkflow2Options().WithStartWorkflowOptions(
@@ -2047,10 +2261,10 @@ func (a *simpleActivities) SomeWorkflow2(ctx context.Context, input *v13.Workflo
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -2070,7 +2284,7 @@ func (a *simpleActivities) SomeWorkflow2(ctx context.Context, input *v13.Workflo
}
// SomeWorkflow2WithSomeSignal1 sends a(n) mycompany.simple.Simple.SomeSignal1 signal to a(n) mycompany.simple.SomeWorkflow2 workflow via an activity
-func (a *simpleActivities) SomeWorkflow2WithSomeSignal1(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *simpleActivities) SomeWorkflow2WithSomeSignal1(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// initialize workflow execution
var run v1.SomeWorkflow2Run
run, err = a.client.SomeWorkflow2WithSomeSignal1Async(ctx, v1.NewSomeWorkflow2Options().WithStartWorkflowOptions(
@@ -2120,10 +2334,10 @@ func (a *simpleActivities) SomeWorkflow2WithSomeSignal1(ctx context.Context, inp
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -2145,7 +2359,7 @@ func (a *simpleActivities) SomeWorkflow2WithSomeSignal1(ctx context.Context, inp
// SomeWorkflow3 executes a(n) mycompany.simple.Simple.SomeWorkflow3 workflow via an activity
//
// Deprecated: Do not use.
-func (a *simpleActivities) SomeWorkflow3(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *simpleActivities) SomeWorkflow3(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeWorkflow3WorkflowName)
// unmarshal workflow request
@@ -2207,10 +2421,10 @@ func (a *simpleActivities) SomeWorkflow3(ctx context.Context, input *v13.Workflo
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -2232,7 +2446,7 @@ func (a *simpleActivities) SomeWorkflow3(ctx context.Context, input *v13.Workflo
// SomeWorkflow3WithSomeSignal2 sends a(n) mycompany.simple.Simple.SomeSignal2 signal to a(n) mycompany.simple.Simple.SomeWorkflow3 workflow via an activity
//
// Deprecated: Do not use.
-func (a *simpleActivities) SomeWorkflow3WithSomeSignal2(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *simpleActivities) SomeWorkflow3WithSomeSignal2(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeWorkflow3WorkflowName)
// unmarshal workflow request
@@ -2304,10 +2518,10 @@ func (a *simpleActivities) SomeWorkflow3WithSomeSignal2(ctx context.Context, inp
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -2326,8 +2540,91 @@ func (a *simpleActivities) SomeWorkflow3WithSomeSignal2(ctx context.Context, inp
}
}
+// SomeWorkflow4 executes a(n) mycompany.simple.Simple.SomeWorkflow4 workflow via an activity
+func (a *simpleActivities) SomeWorkflow4(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v11.PaginatedResponse, err error) {
+ // unmarshal workflow request
+ var req v11.PaginatedRequest
+ if err := input.Request.UnmarshalTo(&req); err != nil {
+ return nil, simpleOptions.convertError(temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("error unmarshalling workflow request of type %s as github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1.PaginatedRequest", input.Request.GetTypeUrl()),
+ "InvalidArgument",
+ err,
+ ))
+ }
+
+ // initialize workflow execution
+ var run v1.SomeWorkflow4Run
+ run, err = a.client.SomeWorkflow4Async(ctx, &req, v1.NewSomeWorkflow4Options().WithStartWorkflowOptions(
+ xns.UnmarshalStartWorkflowOptions(input.GetStartWorkflowOptions()),
+ ))
+ if err != nil {
+ return nil, simpleOptions.convertError(err)
+ }
+
+ // exit early if detached enabled
+ if input.GetDetached() {
+ return nil, nil
+ }
+
+ // otherwise, wait for execution to complete in child goroutine
+ doneCh := make(chan struct{})
+ go func() {
+ resp, err = run.Get(ctx)
+ close(doneCh)
+ }()
+
+ heartbeatInterval := input.GetHeartbeatInterval().AsDuration()
+ if heartbeatInterval == 0 {
+ heartbeatInterval = time.Second * 30
+ }
+
+ // heartbeat activity while waiting for workflow execution to complete
+ for {
+ select {
+ // send heartbeats periodically
+ case <-time.After(heartbeatInterval):
+ activity.RecordHeartbeat(ctx, run.ID())
+
+ // return retryable error on worker close
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+
+ // catch parent activity context cancellation. in most cases, this should indicate a
+ // server-sent cancellation, but there's a non-zero possibility that this cancellation
+ // is received due to the worker stopping, prior to detecting the closing of the worker
+ // stop channel. to give us an opportunity to detect a cancellation stemming from the
+ // worker closing, we again check to see if the worker stop channel is closed before
+ // propagating the cancellation
+ case <-ctx.Done():
+ select {
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+ default:
+ parentClosePolicy := input.GetParentClosePolicy()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
+ defer cancel()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ err = run.Cancel(disconnectedCtx)
+ } else {
+ err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
+ }
+ if err != nil {
+ return nil, simpleOptions.convertError(err)
+ }
+ }
+ return nil, simpleOptions.convertError(temporal.NewCanceledError(ctx.Err().Error()))
+ }
+
+ // handle workflow completion
+ case <-doneCh:
+ return resp, simpleOptions.convertError(err)
+ }
+ }
+}
+
// SomeQuery1 executes a(n) mycompany.simple.Simple.SomeQuery1 query via an activity
-func (a *simpleActivities) SomeQuery1(ctx context.Context, input *v13.QueryRequest) (resp *v1.SomeQuery1Response, err error) {
+func (a *simpleActivities) SomeQuery1(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.SomeQuery1Response, err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -2354,7 +2651,7 @@ func (a *simpleActivities) SomeQuery1(ctx context.Context, input *v13.QueryReque
}
// SomeQuery2 executes a(n) mycompany.simple.Simple.SomeQuery2 query via an activity
-func (a *simpleActivities) SomeQuery2(ctx context.Context, input *v13.QueryRequest) (resp *v1.SomeQuery2Response, err error) {
+func (a *simpleActivities) SomeQuery2(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.SomeQuery2Response, err error) {
// unmarshal query request
var req v1.SomeQuery2Request
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -2390,7 +2687,7 @@ func (a *simpleActivities) SomeQuery2(ctx context.Context, input *v13.QueryReque
}
// SomeSignal1 executes a(n) mycompany.simple.Simple.SomeSignal1 signal via an activity
-func (a *simpleActivities) SomeSignal1(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *simpleActivities) SomeSignal1(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -2417,7 +2714,7 @@ func (a *simpleActivities) SomeSignal1(ctx context.Context, input *v13.SignalReq
}
// SomeSignal2 executes a(n) mycompany.simple.Simple.SomeSignal2 signal via an activity
-func (a *simpleActivities) SomeSignal2(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *simpleActivities) SomeSignal2(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.SomeSignal2Request
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -2453,7 +2750,7 @@ func (a *simpleActivities) SomeSignal2(ctx context.Context, input *v13.SignalReq
}
// SomeSignal3 executes a(n) mycompany.simple.Simple.SomeSignal3 signal via an activity
-func (a *simpleActivities) SomeSignal3(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *simpleActivities) SomeSignal3(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.SomeSignal3Request
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -2489,7 +2786,7 @@ func (a *simpleActivities) SomeSignal3(ctx context.Context, input *v13.SignalReq
}
// SomeUpdate1 executes a(n) mycompany.simple.Simple.SomeUpdate1 update via an activity
-func (a *simpleActivities) SomeUpdate1(ctx context.Context, input *v13.UpdateRequest) (resp *v1.SomeUpdate1Response, err error) {
+func (a *simpleActivities) SomeUpdate1(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.SomeUpdate1Response, err error) {
var handle v1.SomeUpdate1Handle
if activity.HasHeartbeatDetails(ctx) {
// extract update id from heartbeat details
@@ -2519,8 +2816,8 @@ func (a *simpleActivities) SomeUpdate1(ctx context.Context, input *v13.UpdateReq
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
@@ -2641,7 +2938,7 @@ type OtherWorkflowWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -2669,7 +2966,7 @@ func (opts *OtherWorkflowWorkflowOptions) WithHeartbeatInterval(d time.Duration)
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *OtherWorkflowWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *OtherWorkflowWorkflowOptions {
+func (opts *OtherWorkflowWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *OtherWorkflowWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -2822,21 +3119,21 @@ func OtherWorkflowAsync(ctx workflow.Context, req *v1.OtherWorkflowRequest, opts
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &otherWorkflowRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -2958,7 +3255,7 @@ func OtherQueryAsync(ctx workflow.Context, workflowID string, runID string, opts
ctx, cancel := workflow.WithCancel(ctx)
return &otherQueryQueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -3078,7 +3375,7 @@ func OtherSignalAsync(ctx workflow.Context, workflowID string, runID string, req
ctx, cancel := workflow.WithCancel(ctx)
return &otherSignalSignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -3260,7 +3557,7 @@ func OtherUpdateAsync(ctx workflow.Context, workflowID string, runID string, req
return &otherUpdateHandle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -3304,7 +3601,7 @@ func (a *otherActivities) CancelWorkflow(ctx context.Context, workflowID string,
}
// OtherWorkflow executes a(n) mycompany.simple.Other.OtherWorkflow workflow via an activity
-func (a *otherActivities) OtherWorkflow(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.OtherWorkflowResponse, err error) {
+func (a *otherActivities) OtherWorkflow(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.OtherWorkflowResponse, err error) {
// unmarshal workflow request
var req v1.OtherWorkflowRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -3364,10 +3661,10 @@ func (a *otherActivities) OtherWorkflow(ctx context.Context, input *v13.Workflow
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -3387,7 +3684,7 @@ func (a *otherActivities) OtherWorkflow(ctx context.Context, input *v13.Workflow
}
// OtherQuery executes a(n) mycompany.simple.Other.OtherQuery query via an activity
-func (a *otherActivities) OtherQuery(ctx context.Context, input *v13.QueryRequest) (resp *v1.OtherQueryResponse, err error) {
+func (a *otherActivities) OtherQuery(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.OtherQueryResponse, err error) {
// execute signal in child goroutine
doneCh := make(chan struct{})
go func() {
@@ -3414,7 +3711,7 @@ func (a *otherActivities) OtherQuery(ctx context.Context, input *v13.QueryReques
}
// OtherSignal executes a(n) mycompany.simple.Other.OtherSignal signal via an activity
-func (a *otherActivities) OtherSignal(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *otherActivities) OtherSignal(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
// unmarshal signal request
var req v1.OtherSignalRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -3450,7 +3747,7 @@ func (a *otherActivities) OtherSignal(ctx context.Context, input *v13.SignalRequ
}
// OtherUpdate executes a(n) mycompany.simple.Other.OtherUpdate update via an activity
-func (a *otherActivities) OtherUpdate(ctx context.Context, input *v13.UpdateRequest) (resp *v1.OtherUpdateResponse, err error) {
+func (a *otherActivities) OtherUpdate(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.OtherUpdateResponse, err error) {
var handle v1.OtherUpdateHandle
if activity.HasHeartbeatDetails(ctx) {
// extract update id from heartbeat details
@@ -3480,8 +3777,8 @@ func (a *otherActivities) OtherUpdate(ctx context.Context, input *v13.UpdateRequ
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
@@ -3593,7 +3890,7 @@ type WhatWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -3621,7 +3918,7 @@ func (opts *WhatWorkflowOptions) WithHeartbeatInterval(d time.Duration) *WhatWor
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *WhatWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *WhatWorkflowOptions {
+func (opts *WhatWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *WhatWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -3773,21 +4070,21 @@ func WhatAsync(ctx workflow.Context, req *v1.WhatRequest, opts ...*WhatWorkflowO
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &whatRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -3833,7 +4130,7 @@ func (a *ignoredActivities) CancelWorkflow(ctx context.Context, workflowID strin
}
// What executes a(n) mycompany.simple.Ignored.What workflow via an activity
-func (a *ignoredActivities) What(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *ignoredActivities) What(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.WhatRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -3893,10 +4190,10 @@ func (a *ignoredActivities) What(ctx context.Context, input *v13.WorkflowRequest
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -4109,7 +4406,7 @@ type SomeDeprecatedWorkflow1WorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -4137,7 +4434,7 @@ func (opts *SomeDeprecatedWorkflow1WorkflowOptions) WithHeartbeatInterval(d time
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SomeDeprecatedWorkflow1WorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SomeDeprecatedWorkflow1WorkflowOptions {
+func (opts *SomeDeprecatedWorkflow1WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeDeprecatedWorkflow1WorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -4356,21 +4653,21 @@ func SomeDeprecatedWorkflow1Async(ctx workflow.Context, req *v1.SomeDeprecatedMe
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedWorkflow1Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -4470,21 +4767,21 @@ func SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1Async(ctx workflow.Context,
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedWorkflow1Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -4500,7 +4797,7 @@ type SomeDeprecatedWorkflow2WorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -4528,7 +4825,7 @@ func (opts *SomeDeprecatedWorkflow2WorkflowOptions) WithHeartbeatInterval(d time
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SomeDeprecatedWorkflow2WorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SomeDeprecatedWorkflow2WorkflowOptions {
+func (opts *SomeDeprecatedWorkflow2WorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SomeDeprecatedWorkflow2WorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -4747,21 +5044,21 @@ func SomeDeprecatedWorkflow2Async(ctx workflow.Context, req *v1.SomeDeprecatedMe
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedWorkflow2Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -4861,21 +5158,21 @@ func SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2Async(ctx workflow.Context,
return nil, fmt.Errorf("error marshalling signal request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedWorkflow2Run{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -5010,7 +5307,7 @@ func SomeDeprecatedQuery1Async(ctx workflow.Context, workflowID string, runID st
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedQuery1QueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -5143,7 +5440,7 @@ func SomeDeprecatedQuery2Async(ctx workflow.Context, workflowID string, runID st
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedQuery2QueryHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.QueryRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.QueryRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -5270,7 +5567,7 @@ func SomeDeprecatedSignal1Async(ctx workflow.Context, workflowID string, runID s
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedSignal1SignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -5397,7 +5694,7 @@ func SomeDeprecatedSignal2Async(ctx workflow.Context, workflowID string, runID s
ctx, cancel := workflow.WithCancel(ctx)
return &someDeprecatedSignal2SignalHandle{
cancel: cancel,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.SignalRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.SignalRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
WorkflowId: workflowID,
RunId: runID,
@@ -5573,7 +5870,7 @@ func SomeDeprecatedUpdate1Async(ctx workflow.Context, workflowID string, runID s
return &someDeprecatedUpdate1Handle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -5748,7 +6045,7 @@ func SomeDeprecatedUpdate2Async(ctx workflow.Context, workflowID string, runID s
return &someDeprecatedUpdate2Handle{
cancel: cancel,
id: uo.UpdateID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.UpdateRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.UpdateRequest{
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
Request: wreq,
UpdateWorkflowOptions: uopb,
@@ -5794,7 +6091,7 @@ func (a *deprecatedActivities) CancelWorkflow(ctx context.Context, workflowID st
// SomeDeprecatedWorkflow1 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedWorkflow1 workflow via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedWorkflow1(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedWorkflow1(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeDeprecatedWorkflow1WorkflowName)
// unmarshal workflow request
@@ -5856,10 +6153,10 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow1(ctx context.Context, inpu
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -5881,7 +6178,7 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow1(ctx context.Context, inpu
// SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1 sends a(n) mycompany.simple.Deprecated.SomeDeprecatedSignal1 signal to a(n) mycompany.simple.Deprecated.SomeDeprecatedWorkflow1 workflow via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeDeprecatedWorkflow1WorkflowName)
activity.GetLogger(ctx).Warn("use of deprecated signal detected", "signal", v1.SomeDeprecatedSignal1SignalName)
@@ -5954,10 +6251,10 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1(
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -5979,7 +6276,7 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow1WithSomeDeprecatedSignal1(
// SomeDeprecatedWorkflow2 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedWorkflow2 workflow via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedWorkflow2(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedWorkflow2(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeDeprecatedWorkflow2WorkflowName)
// unmarshal workflow request
@@ -6041,10 +6338,10 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow2(ctx context.Context, inpu
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -6066,7 +6363,7 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow2(ctx context.Context, inpu
// SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2 sends a(n) mycompany.simple.Deprecated.SomeDeprecatedSignal2 signal to a(n) mycompany.simple.Deprecated.SomeDeprecatedWorkflow2 workflow via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2(ctx context.Context, input *v13.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated workflow detected", "workflow", v1.SomeDeprecatedWorkflow2WorkflowName)
activity.GetLogger(ctx).Warn("use of deprecated signal detected", "signal", v1.SomeDeprecatedSignal2SignalName)
@@ -6139,10 +6436,10 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2(
return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -6164,7 +6461,7 @@ func (a *deprecatedActivities) SomeDeprecatedWorkflow2WithSomeDeprecatedSignal2(
// SomeDeprecatedQuery1 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedQuery1 query via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedQuery1(ctx context.Context, input *v13.QueryRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedQuery1(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated query detected", "query", v1.SomeDeprecatedQuery1QueryName)
// unmarshal query request
@@ -6204,7 +6501,7 @@ func (a *deprecatedActivities) SomeDeprecatedQuery1(ctx context.Context, input *
// SomeDeprecatedQuery2 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedQuery2 query via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedQuery2(ctx context.Context, input *v13.QueryRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedQuery2(ctx context.Context, input *xnsv1.QueryRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated query detected", "query", v1.SomeDeprecatedQuery2QueryName)
// unmarshal query request
@@ -6244,7 +6541,7 @@ func (a *deprecatedActivities) SomeDeprecatedQuery2(ctx context.Context, input *
// SomeDeprecatedSignal1 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedSignal1 signal via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedSignal1(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *deprecatedActivities) SomeDeprecatedSignal1(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
activity.GetLogger(ctx).Warn("use of deprecated signal detected", "signal", v1.SomeDeprecatedSignal1SignalName)
// unmarshal signal request
@@ -6284,7 +6581,7 @@ func (a *deprecatedActivities) SomeDeprecatedSignal1(ctx context.Context, input
// SomeDeprecatedSignal2 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedSignal2 signal via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedSignal2(ctx context.Context, input *v13.SignalRequest) (err error) {
+func (a *deprecatedActivities) SomeDeprecatedSignal2(ctx context.Context, input *xnsv1.SignalRequest) (err error) {
activity.GetLogger(ctx).Warn("use of deprecated signal detected", "signal", v1.SomeDeprecatedSignal2SignalName)
// unmarshal signal request
@@ -6324,7 +6621,7 @@ func (a *deprecatedActivities) SomeDeprecatedSignal2(ctx context.Context, input
// SomeDeprecatedUpdate1 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedUpdate1 update via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedUpdate1(ctx context.Context, input *v13.UpdateRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedUpdate1(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated update detected", "update", v1.SomeDeprecatedUpdate1UpdateName)
var handle v1.SomeDeprecatedUpdate1Handle
@@ -6356,8 +6653,8 @@ func (a *deprecatedActivities) SomeDeprecatedUpdate1(ctx context.Context, input
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
@@ -6402,7 +6699,7 @@ func (a *deprecatedActivities) SomeDeprecatedUpdate1(ctx context.Context, input
// SomeDeprecatedUpdate2 executes a(n) mycompany.simple.Deprecated.SomeDeprecatedUpdate2 update via an activity
//
// Deprecated: Do not use.
-func (a *deprecatedActivities) SomeDeprecatedUpdate2(ctx context.Context, input *v13.UpdateRequest) (resp *v1.SomeDeprecatedMessage, err error) {
+func (a *deprecatedActivities) SomeDeprecatedUpdate2(ctx context.Context, input *xnsv1.UpdateRequest) (resp *v1.SomeDeprecatedMessage, err error) {
activity.GetLogger(ctx).Warn("use of deprecated update detected", "update", v1.SomeDeprecatedUpdate2UpdateName)
var handle v1.SomeDeprecatedUpdate2Handle
@@ -6434,8 +6731,8 @@ func (a *deprecatedActivities) SomeDeprecatedUpdate2(ctx context.Context, input
}
uo := xns.UnmarshalUpdateWorkflowOptions(input.GetUpdateWorkflowOptions())
- uo.WaitPolicy = &v14.WaitPolicy{
- LifecycleStage: v11.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
+ uo.WaitPolicy = &updatev1.WaitPolicy{
+ LifecycleStage: enumsv1.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED,
}
// initialize update execution
diff --git a/gen/test/xnserr/v1/xnserr_temporal.pb.go b/gen/test/xnserr/v1/xnserr_temporal.pb.go
index 76a0a729..8c6a5d50 100644
--- a/gen/test/xnserr/v1/xnserr_temporal.pb.go
+++ b/gen/test/xnserr/v1/xnserr_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -12,12 +12,12 @@ import (
"context"
"errors"
"fmt"
- v11 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
helpers "github.com/cludden/protoc-gen-go-temporal/pkg/helpers"
scheme "github.com/cludden/protoc-gen-go-temporal/pkg/scheme"
gohomedir "github.com/mitchellh/go-homedir"
v2 "github.com/urfave/cli/v2"
- v1 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
testsuite "go.temporal.io/sdk/testsuite"
@@ -180,7 +180,7 @@ type SleepOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -199,10 +199,10 @@ func (o *SleepOptions) Build(req protoreflect.Message) (client.StartWorkflowOpti
if v := o.id; v != nil {
opts.ID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -246,7 +246,7 @@ func (o *SleepOptions) WithID(id string) *SleepOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SleepOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SleepOptions {
+func (o *SleepOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SleepOptions {
o.idReusePolicy = policy
return o
}
@@ -444,13 +444,13 @@ type SleepChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -465,10 +465,10 @@ func (o *SleepChildOptions) Build(ctx workflow.Context, req protoreflect.Message
if v := o.id; v != nil {
opts.WorkflowID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = v1.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
@@ -490,10 +490,10 @@ func (o *SleepChildOptions) Build(ctx workflow.Context, req protoreflect.Message
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
- } else if opts.ParentClosePolicy == v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
- opts.ParentClosePolicy = v1.PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ } else if opts.ParentClosePolicy == enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ opts.ParentClosePolicy = enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL
}
if v := o.waitForCancellation; v != nil {
opts.WaitForCancellation = *v
@@ -520,13 +520,13 @@ func (o *SleepChildOptions) WithID(id string) *SleepChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *SleepChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *SleepChildOptions {
+func (o *SleepChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *SleepChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *SleepChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *SleepChildOptions {
+func (o *SleepChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SleepChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1096,7 +1096,7 @@ type CallSleepOptions struct {
options client.StartWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
@@ -1115,7 +1115,7 @@ func (o *CallSleepOptions) Build(req protoreflect.Message) (client.StartWorkflow
if v := o.id; v != nil {
opts.ID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -1160,7 +1160,7 @@ func (o *CallSleepOptions) WithID(id string) *CallSleepOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CallSleepOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CallSleepOptions {
+func (o *CallSleepOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CallSleepOptions {
o.idReusePolicy = policy
return o
}
@@ -1358,13 +1358,13 @@ type CallSleepChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
- idReusePolicy v1.WorkflowIdReusePolicy
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
retryPolicy *temporal.RetryPolicy
runTimeout *time.Duration
searchAttributes map[string]any
taskQueue *string
taskTimeout *time.Duration
- parentClosePolicy v1.ParentClosePolicy
+ parentClosePolicy enumsv1.ParentClosePolicy
waitForCancellation *bool
}
@@ -1379,7 +1379,7 @@ func (o *CallSleepChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
if v := o.id; v != nil {
opts.WorkflowID = *v
}
- if v := o.idReusePolicy; v != v1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
}
if v := o.taskQueue; v != nil {
@@ -1402,7 +1402,7 @@ func (o *CallSleepChildOptions) Build(ctx workflow.Context, req protoreflect.Mes
if v := o.taskTimeout; v != nil {
opts.WorkflowTaskTimeout = *v
}
- if v := o.parentClosePolicy; v != v1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
opts.ParentClosePolicy = v
}
if v := o.waitForCancellation; v != nil {
@@ -1430,13 +1430,13 @@ func (o *CallSleepChildOptions) WithID(id string) *CallSleepChildOptions {
}
// WithIDReusePolicy sets the WorkflowIDReusePolicy value
-func (o *CallSleepChildOptions) WithIDReusePolicy(policy v1.WorkflowIdReusePolicy) *CallSleepChildOptions {
+func (o *CallSleepChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *CallSleepChildOptions {
o.idReusePolicy = policy
return o
}
// WithParentClosePolicy sets the WorkflowIDReusePolicy value
-func (o *CallSleepChildOptions) WithParentClosePolicy(policy v1.ParentClosePolicy) *CallSleepChildOptions {
+func (o *CallSleepChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CallSleepChildOptions {
o.parentClosePolicy = policy
return o
}
@@ -1857,7 +1857,7 @@ func UnmarshalCliFlagsToCallSleepRequest(cmd *v2.Context) (*CallSleepRequest, er
}
if cmd.IsSet("start-workflow-options") {
hasValues = true
- var v v11.StartWorkflowOptions
+ var v xnsv1.StartWorkflowOptions
if err := protojson.Unmarshal([]byte(cmd.String("start-workflow-options")), &v); err != nil {
return nil, fmt.Errorf("error unmarshalling \"start-workflow-options\" flag: %w", err)
}
@@ -1865,7 +1865,7 @@ func UnmarshalCliFlagsToCallSleepRequest(cmd *v2.Context) (*CallSleepRequest, er
}
if cmd.IsSet("retry-policy") {
hasValues = true
- var v v11.RetryPolicy
+ var v xnsv1.RetryPolicy
if err := protojson.Unmarshal([]byte(cmd.String("retry-policy")), &v); err != nil {
return nil, fmt.Errorf("error unmarshalling \"retry-policy\" flag: %w", err)
}
diff --git a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
index ba51b991..56110caf 100644
--- a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
+++ b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.13.1-next (b7a15c407f9a9490670a48b7f288c936cdd1bc48)
+// protoc-gen-go_temporal 1.13.2-next (da21b200e451359f16879727fa07bc5a2063c9c8)
// go go1.22.3
// protoc (unknown)
//
@@ -12,12 +12,12 @@ import (
"context"
"errors"
"fmt"
- v12 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
- v13 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
+ temporalv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/v1"
+ xnsv1 "github.com/cludden/protoc-gen-go-temporal/gen/temporal/xns/v1"
v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1"
xns "github.com/cludden/protoc-gen-go-temporal/pkg/xns"
uuid "github.com/google/uuid"
- v11 "go.temporal.io/api/enums/v1"
+ enumsv1 "go.temporal.io/api/enums/v1"
activity "go.temporal.io/sdk/activity"
client "go.temporal.io/sdk/client"
temporal "go.temporal.io/sdk/temporal"
@@ -98,7 +98,7 @@ type SleepWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -126,7 +126,7 @@ func (opts *SleepWorkflowOptions) WithHeartbeatInterval(d time.Duration) *SleepW
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *SleepWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *SleepWorkflowOptions {
+func (opts *SleepWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *SleepWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -266,21 +266,21 @@ func SleepAsync(ctx workflow.Context, req *v1.SleepRequest, opts ...*SleepWorkfl
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- parentClosePolicy := v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ parentClosePolicy := temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &sleepRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -326,7 +326,7 @@ func (a *serverActivities) CancelWorkflow(ctx context.Context, workflowID string
}
// Sleep executes a(n) test.xnserr.v1.Server.Sleep workflow via an activity
-func (a *serverActivities) Sleep(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *serverActivities) Sleep(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.SleepRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -386,10 +386,10 @@ func (a *serverActivities) Sleep(ctx context.Context, input *v13.WorkflowRequest
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
@@ -478,7 +478,7 @@ type CallSleepWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
Detached bool
HeartbeatInterval time.Duration
- ParentClosePolicy v11.ParentClosePolicy
+ ParentClosePolicy enumsv1.ParentClosePolicy
StartWorkflowOptions *client.StartWorkflowOptions
}
@@ -506,7 +506,7 @@ func (opts *CallSleepWorkflowOptions) WithHeartbeatInterval(d time.Duration) *Ca
}
// WithParentClosePolicy can be used to customize the cancellation propagation behavior
-func (opts *CallSleepWorkflowOptions) WithParentClosePolicy(policy v11.ParentClosePolicy) *CallSleepWorkflowOptions {
+func (opts *CallSleepWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *CallSleepWorkflowOptions {
opts.ParentClosePolicy = policy
return opts
}
@@ -646,21 +646,21 @@ func CallSleepAsync(ctx workflow.Context, req *v1.CallSleepRequest, opts ...*Cal
return nil, fmt.Errorf("error marshalling workflow request: %w", err)
}
- var parentClosePolicy v12.ParentClosePolicy
+ var parentClosePolicy temporalv1.ParentClosePolicy
switch opt.ParentClosePolicy {
- case v11.PARENT_CLOSE_POLICY_ABANDON:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
- case v11.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
- case v11.PARENT_CLOSE_POLICY_TERMINATE:
- parentClosePolicy = v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
}
ctx, cancel := workflow.WithCancel(ctx)
return &callSleepRun{
cancel: cancel,
id: wo.ID,
- future: workflow.ExecuteActivity(ctx, activityName, &v13.WorkflowRequest{
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
Detached: opt.Detached,
HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
ParentClosePolicy: parentClosePolicy,
@@ -706,7 +706,7 @@ func (a *clientActivities) CancelWorkflow(ctx context.Context, workflowID string
}
// CallSleep executes a(n) test.xnserr.v1.Client.CallSleep workflow via an activity
-func (a *clientActivities) CallSleep(ctx context.Context, input *v13.WorkflowRequest) (err error) {
+func (a *clientActivities) CallSleep(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
var req v1.CallSleepRequest
if err := input.Request.UnmarshalTo(&req); err != nil {
@@ -766,10 +766,10 @@ func (a *clientActivities) CallSleep(ctx context.Context, input *v13.WorkflowReq
return temporal.NewApplicationError("worker is stopping", "WorkerStopped")
default:
parentClosePolicy := input.GetParentClosePolicy()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- if parentClosePolicy == v12.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
err = run.Cancel(disconnectedCtx)
} else {
err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
diff --git a/internal/plugin/activities.go b/internal/plugin/activities.go
index 1ecff515..ee51fb5c 100644
--- a/internal/plugin/activities.go
+++ b/internal/plugin/activities.go
@@ -27,12 +27,12 @@ func (svc *Manifest) genActivitiesInterface(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(method.Input.GoIdent.GoName)
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(method.Output.GoIdent.GoName)
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -77,7 +77,7 @@ func (svc *Manifest) genActivityFunction(f *g.File, activity protoreflect.FullNa
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Id(method.Input.GoIdent.GoName)
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if local {
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sLocalActivityOptions", activity))
@@ -90,7 +90,7 @@ func (svc *Manifest) genActivityFunction(f *g.File, activity protoreflect.FullNa
returnVals.Op("*").Id(fmt.Sprintf("%sFuture", method.GoName))
} else {
if hasOutput {
- returnVals.Op("*").Id(method.Output.GoIdent.GoName)
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}
@@ -220,13 +220,13 @@ func (svc *Manifest) genActivityFutureGetMethod(f *g.File, activity protoreflect
Params(g.Id("ctx").Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(method.Output.GoIdent.GoName)
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Id(method.Output.GoIdent.GoName)
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
fn.If(
g.Err().Op(":=").Id("f").Dot("Future").Dot("Get").Call(
g.Id("ctx"), g.Op("&").Id("resp"),
@@ -308,12 +308,12 @@ func (svc *Manifest) genActivityRegisterOneFunction(f *g.File, activity protoref
ParamsFunc(func(args *g.Group) {
args.Qual("context", "Context")
if hasInput {
- args.Op("*").Id(method.Input.GoIdent.GoName)
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(method.Output.GoIdent.GoName)
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}),
@@ -334,8 +334,9 @@ func (svc *Manifest) genActivityOptions(f *g.File, activity protoreflect.FullNam
if local {
optionType, typeName = "LocalActivityOptions", svc.toCamel("%sLocalActivityOptions", activity)
}
- hasInput := !isEmpty(svc.methods[activity].Input)
- hasOutput := !isEmpty(svc.methods[activity].Output)
+ method := svc.methods[activity]
+ hasInput := !isEmpty(method.Input)
+ hasOutput := !isEmpty(method.Output)
opts := svc.activities[activity]
// generate type definition
@@ -351,12 +352,12 @@ func (svc *Manifest) genActivityOptions(f *g.File, activity protoreflect.FullNam
ParamsFunc(func(args *g.Group) {
args.Qual("context", "Context")
if hasInput {
- args.Op("*").Id(svc.getMessageName(svc.methods[activity].Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(svc.methods[activity].Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
})
@@ -519,12 +520,12 @@ func (svc *Manifest) genActivityOptions(f *g.File, activity protoreflect.FullNam
ParamsFunc(func(args *g.Group) {
args.Qual("context", "Context")
if hasInput {
- args.Op("*").Id(svc.getMessageName(svc.methods[activity].Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(svc.methods[activity].Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}),
diff --git a/internal/plugin/cli.go b/internal/plugin/cli.go
index b22bf625..0ce3125a 100644
--- a/internal/plugin/cli.go
+++ b/internal/plugin/cli.go
@@ -793,11 +793,11 @@ func (svc *Manifest) genCliUnmarshalMessage(f *g.File, msg *protogen.Message) {
f.Func().Id(fnName).
Params(g.Id("cmd").Op("*").Qual(cliPkg, "Context")).
Params(
- g.Op("*").Id(name),
+ g.Op("*").Qual(string(msg.GoIdent.GoImportPath), name),
g.Error(),
).
BlockFunc(func(fn *g.Group) {
- fn.Var().Id("result").Id(name)
+ fn.Var().Id("result").Qual(string(msg.GoIdent.GoImportPath), name)
fn.Var().Id("hasValues").Bool()
fn.If(g.Id("cmd").Dot("IsSet").Call(g.Lit("input-file"))).Block(
g.List(g.Id("inputFile"), g.Err()).Op(":=").Qual(homedirPkg, "Expand").Call(g.Id("cmd").Dot("String").Call(g.Lit("input-file"))),
diff --git a/internal/plugin/client.go b/internal/plugin/client.go
index 038869e2..bc1ea6d9 100644
--- a/internal/plugin/client.go
+++ b/internal/plugin/client.go
@@ -113,18 +113,18 @@ func (svc *Manifest) genClientImplQueryMethod(f *g.File, query protoreflect.Full
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("query").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("query").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
Params(
- g.Op("*").Id(svc.getMessageName(method.Output)),
+ g.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output)),
g.Error(),
).
BlockFunc(func(fn *g.Group) {
if isDeprecated(method) {
fn.Id("c").Dot("log").Dot("WarnContext").Call(g.Id("ctx"), g.Lit("use of deprecated client method detected"), g.Lit("method"), g.Lit(svc.toCamel("%s", query)), g.Lit("query"), g.Id(svc.toCamel("%sQueryName", query))).Line()
}
- fn.Var().Id("resp").Id(svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
fn.If(
g.List(g.Id("val"), g.Err()).Op(":=").Id("c").Dot("client").Dot("QueryWorkflow").CallFunc(func(args *g.Group) {
args.Id("ctx")
@@ -167,7 +167,7 @@ func (svc *Manifest) genClientImplSignalMethod(f *g.File, signal protoreflect.Fu
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("signal").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
Params(g.Error()).
@@ -209,10 +209,10 @@ func (svc *Manifest) genClientImplSignalWithStartAsyncMethod(f *g.File, workflow
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasWorkflowInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -297,16 +297,16 @@ func (svc *Manifest) genClientImplSignalWithStartMethod(f *g.File, workflow, sig
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasWorkflowInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasWorkflowOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -391,13 +391,13 @@ func (svc *Manifest) genClientImplUpdateMethod(f *g.File, update protoreflect.Fu
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).
@@ -456,7 +456,7 @@ func (svc *Manifest) genClientImplUpdateMethodAsync(f *g.File, update protorefle
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
@@ -525,7 +525,7 @@ func (svc *Manifest) genClientImplWorkflowAsyncMethod(f *g.File, workflow protor
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -688,13 +688,13 @@ func (svc *Manifest) genClientImplWorkflowMethod(f *g.File, workflow protoreflec
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -745,13 +745,13 @@ func (svc *Manifest) genClientInterface(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -764,7 +764,7 @@ func (svc *Manifest) genClientInterface(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -807,16 +807,16 @@ func (svc *Manifest) genClientInterface(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasWorkflowInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasWorkflowOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -829,10 +829,10 @@ func (svc *Manifest) genClientInterface(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasWorkflowInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -884,11 +884,11 @@ func (svc *Manifest) genClientInterface(f *g.File) {
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("query").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("query").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
Params(
- g.Op("*").Id(svc.getMessageName(handler.Output)),
+ g.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output)),
g.Error(),
).
Line()
@@ -908,7 +908,7 @@ func (svc *Manifest) genClientInterface(f *g.File) {
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
Params(g.Error()).
@@ -933,13 +933,13 @@ func (svc *Manifest) genClientInterface(f *g.File) {
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).
@@ -954,7 +954,7 @@ func (svc *Manifest) genClientInterface(f *g.File) {
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
@@ -1051,13 +1051,13 @@ func (svc *Manifest) genClientUpdateHandleImplGetMethod(f *g.File, update protor
Params(g.Id("ctx").Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Id(svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
fn.Var().Err().Error()
fn.Id("doneCh").Op(":=").Make(g.Chan().Struct())
@@ -1185,7 +1185,7 @@ func (svc *Manifest) genClientUpdateHandleInterface(f *g.File, update protorefle
Params(g.Id("ctx").Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
})
@@ -1221,7 +1221,7 @@ func (svc *Manifest) genClientUpdateOptions(f *g.File, update protoreflect.FullN
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(svc.methods[update].Input))
+ args.Id("req").Op("*").Qual(string(svc.methods[update].Input.GoIdent.GoImportPath), svc.getMessageName(svc.methods[update].Input))
}
}).
Params(
@@ -1838,13 +1838,13 @@ func (svc *Manifest) genClientWorkflowRunImplGetMethod(f *g.File, workflow proto
Params(g.Id("ctx").Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Id(svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
fn.If(
g.Err().Op(":=").Id("r").Dot("run").Dot("Get").Call(
g.Id("ctx"),
@@ -1898,11 +1898,11 @@ func (svc *Manifest) genClientWorkflowRunImplQueryMethod(f *g.File, workflow pro
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
Params(
- g.Op("*").Id(svc.getMessageName(handler.Output)),
+ g.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output)),
g.Error(),
).
Block(
@@ -2036,7 +2036,7 @@ func (svc *Manifest) genClientWorkflowRunImplUpdateAsyncMethod(f *g.File, workfl
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
@@ -2109,13 +2109,13 @@ func (svc *Manifest) genClientWorkflowRunImplUpdateMethod(f *g.File, workflow pr
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).
@@ -2157,7 +2157,7 @@ func (svc *Manifest) genClientWorkflowRunInterface(f *g.File, workflow protorefl
Params(g.Id("ctx").Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).Line()
diff --git a/internal/plugin/parse.go b/internal/plugin/parse.go
index 10e81b33..3b5d7c98 100644
--- a/internal/plugin/parse.go
+++ b/internal/plugin/parse.go
@@ -45,6 +45,13 @@ const (
modeUpdate
)
+var aliases = map[string]string{
+ enumsPkg: "enumsv1",
+ temporalv1Pkg: "temporalv1",
+ updatePkg: "updatev1",
+ xnsv1Pkg: "xnsv1",
+}
+
// Manifest describes temporal artifacts parsed from source protos
type Manifest struct {
*Plugin
@@ -533,6 +540,9 @@ func (svc *Manifest) render() error {
f := g.NewFilePathName(string(file.GoImportPath), string(file.GoPackageName))
genCodeGenerationHeader(svc.Plugin, f, file)
+ for pkg, alias := range aliases {
+ f.ImportAlias(pkg, alias)
+ }
var xns *g.File
var xnsGoPackageName, xnsFilePath string
@@ -542,6 +552,9 @@ func (svc *Manifest) render() error {
xnsGoImportPath := path.Join(string(file.GoImportPath), xnsGoPackageName)
xns = g.NewFilePathName(xnsGoImportPath, xnsGoPackageName)
genCodeGenerationHeader(svc.Plugin, xns, file)
+ for pkg, alias := range aliases {
+ xns.ImportAlias(pkg, alias)
+ }
prefixToSlash := filepath.ToSlash(file.GeneratedFilenamePrefix)
xnsFilePath = path.Join(
diff --git a/internal/plugin/testclient.go b/internal/plugin/testclient.go
index dc177dcd..e3e20926 100644
--- a/internal/plugin/testclient.go
+++ b/internal/plugin/testclient.go
@@ -62,12 +62,12 @@ func (svc *Manifest) genTestClientImplQueryMethod(f *g.File, query protoreflect.
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).
@@ -96,7 +96,7 @@ func (svc *Manifest) genTestClientImplQueryMethod(f *g.File, query protoreflect.
if !hasOutput {
bl.Return(g.Nil())
} else {
- bl.Var().Id("result").Id(svc.getMessageName(handler.Output))
+ bl.Var().Id("result").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
bl.If(g.Err().Op(":=").Id("val").Dot("Get").Call(g.Op("&").Id("result")), g.Err().Op("!=").Nil()).Block(
g.Return(
g.Nil(),
@@ -123,7 +123,7 @@ func (svc *Manifest) genTestClientImplSignalMethod(f *g.File, signal protoreflec
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
Params(
@@ -158,13 +158,13 @@ func (svc *Manifest) genTestClientImplUpdateMethod(f *g.File, update protoreflec
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -215,7 +215,7 @@ func (svc *Manifest) genTestClientImplUpdateAsyncMethod(f *g.File, update protor
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
@@ -307,13 +307,13 @@ func (svc *Manifest) genTestClientImplWorkflowMethod(f *g.File, workflow protore
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -349,7 +349,7 @@ func (svc *Manifest) genTestClientImplWorkflowAsyncMethod(f *g.File, workflow pr
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -456,16 +456,16 @@ func (svc *Manifest) genTestClientImplWorkflowWithSignalMethod(f *g.File, workfl
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -510,10 +510,10 @@ func (svc *Manifest) genTestClientImplWorkflowWithSignalAsyncMethod(f *g.File, w
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if hasSignalInput {
- args.Id("signal").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", workflow))
}).
@@ -593,7 +593,7 @@ func (svc *Manifest) genTestClientUpdateHandleImpl(f *g.File, update protoreflec
fields.Id("env").Op("*").Qual(testsuitePkg, "TestWorkflowEnvironment")
fields.Id("opts").Op("*").Qual(clientPkg, "UpdateWorkflowWithOptionsRequest")
if hasInput {
- fields.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ fields.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
fields.Id("runID").String()
fields.Id("workflowID").String()
@@ -611,7 +611,7 @@ func (svc *Manifest) genTestClientUpdateHandleImplGetMethod(f *g.File, update pr
Params(g.Id("ctx").Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -636,7 +636,7 @@ func (svc *Manifest) genTestClientUpdateHandleImplGetMethod(f *g.File, update pr
Block(
g.ReturnFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Id("resp").Op(".").Parens(g.Op("*").Id(svc.getMessageName(method.Output)))
+ returnVals.Id("resp").Op(".").Parens(g.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output)))
}
returnVals.Nil()
}),
@@ -696,7 +696,7 @@ func (svc *Manifest) genTestClientWorkflowRunImpl(f *g.File, workflow protorefle
fields.Id("env").Op("*").Qual(testsuitePkg, "TestWorkflowEnvironment")
fields.Id("opts").Op("*").Qual(clientPkg, "StartWorkflowOptions")
if hasInput {
- fields.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ fields.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
fields.Id("workflows").Id(svc.toCamel("%sWorkflows", svc.Service.GoName))
})
@@ -736,7 +736,7 @@ func (svc *Manifest) genTestClientWorkflowRunImplGetMethod(f *g.File, workflow p
Params(g.Qual("context", "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -768,7 +768,7 @@ func (svc *Manifest) genTestClientWorkflowRunImplGetMethod(f *g.File, workflow p
)
// return workflow result
if hasOutput {
- fn.Var().Id("result").Id(svc.getMessageName(method.Output))
+ fn.Var().Id("result").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
fn.If(g.Err().Op(":=").Id("r").Dot("env").Dot("GetWorkflowResult").Call(g.Op("&").Id("result")), g.Err().Op("!=").Nil()).Block(
g.Return(g.Nil(), g.Err()),
)
@@ -809,12 +809,12 @@ func (svc *Manifest) genTestClientWorkflowRunImplQueryMethod(f *g.File, workflow
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).Block(
@@ -941,13 +941,13 @@ func (svc *Manifest) genTestClientWorkflowRunImplUpdateMethod(f *g.File, workflo
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(handler.Output))
+ returnVals.Op("*").Qual(string(handler.Output.GoIdent.GoImportPath), svc.getMessageName(handler.Output))
}
returnVals.Error()
}).
@@ -979,7 +979,7 @@ func (svc *Manifest) genTestClientWorkflowRunImplUpdateAsyncMethod(f *g.File, wo
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual("context", "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(handler.Input))
+ args.Id("req").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sOptions", update))
}).
diff --git a/internal/plugin/worker.go b/internal/plugin/worker.go
index f1459ed1..ffb90356 100644
--- a/internal/plugin/worker.go
+++ b/internal/plugin/worker.go
@@ -43,12 +43,12 @@ func (svc *Manifest) genWorkerBuilderFunction(f *g.File, workflow protoreflect.F
ParamsFunc(func(args *g.Group) {
args.Qual(workflowPkg, "Context")
if hasInput {
- args.Op("*").Id(svc.getMessageName(method.Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}),
@@ -61,12 +61,12 @@ func (svc *Manifest) genWorkerBuilderFunction(f *g.File, workflow protoreflect.F
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -282,7 +282,7 @@ func (svc *Manifest) genWorkerSignalExternal(f *g.File, signal protoreflect.Full
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
Params(g.Error()).
@@ -313,7 +313,7 @@ func (svc *Manifest) genWorkerSignalExternalAsync(f *g.File, signal protoreflect
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
Params(g.Qual(workflowPkg, "Future")).
@@ -346,13 +346,13 @@ func (svc *Manifest) genWorkerSignalReceive(f *g.File, signal protoreflect.FullN
Params(g.Id("ctx").Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasInput {
- returnVals.Op("*").Id(svc.getMessageName(method.Input))
+ returnVals.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
returnVals.Bool()
}).
BlockFunc(func(b *g.Group) {
if hasInput {
- b.Var().Id("resp").Id(svc.getMessageName(method.Input))
+ b.Var().Id("resp").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
b.Id("more").Op(":=").Id("s").Dot("Channel").Dot("Receive").CallFunc(func(args *g.Group) {
args.Id("ctx")
@@ -383,14 +383,14 @@ func (svc *Manifest) genWorkerSignalReceiveAsync(f *g.File, signal protoreflect.
Params().
ParamsFunc(func(returnVals *g.Group) {
if hasInput {
- returnVals.Op("*").Id(svc.getMessageName(method.Input))
+ returnVals.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
} else {
returnVals.Bool()
}
}).
BlockFunc(func(b *g.Group) {
if hasInput {
- b.Var().Id("resp").Id(svc.getMessageName(method.Input))
+ b.Var().Id("resp").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
b.If(
g.Id("ok").Op(":=").Id("s").Dot("Channel").Dot("ReceiveAsync").Call(
g.Op("&").Id("resp"),
@@ -426,14 +426,14 @@ func (svc *Manifest) genWorkerSignalReceiveWithTimeout(f *g.File, signal protore
).
ParamsFunc(func(returnVals *g.Group) {
if hasInput {
- returnVals.Id("resp").Op("*").Id(svc.getMessageName(method.Input))
+ returnVals.Id("resp").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
returnVals.Id("ok").Bool()
returnVals.Id("more").Bool()
}).
BlockFunc(func(b *g.Group) {
if hasInput {
- b.Id("resp").Op("=").Op("&").Id(svc.getMessageName(method.Input)).Values()
+ b.Id("resp").Op("=").Op("&").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input)).Values()
}
b.If(
g.List(g.Id("ok"), g.Id("more")).Op("=").Id("s").Dot("Channel").Dot("ReceiveWithTimeout").CallFunc(func(args *g.Group) {
@@ -472,7 +472,7 @@ func (svc *Manifest) genWorkerSignalSelect(f *g.File, signal protoreflect.FullNa
g.Id("sel").Qual(workflowPkg, "Selector"),
g.Id("fn").Func().ParamsFunc(func(args *g.Group) {
if hasInput {
- args.Op("*").Id(svc.getMessageName(method.Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}),
).
@@ -520,13 +520,13 @@ func (svc *Manifest) genWorkerWorkflowChild(f *g.File, workflow protoreflect.Ful
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sChildOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -564,7 +564,7 @@ func (svc *Manifest) genWorkerWorkflowChildAsync(f *g.File, workflow protoreflec
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("options").Op("...").Op("*").Id(svc.toCamel("%sChildOptions", workflow))
}).
@@ -639,13 +639,13 @@ func (svc *Manifest) genWorkerWorkflowChildRunGet(f *g.File, workflow protorefle
).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Id(svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
fn.If(
g.Err().Op(":=").Id("r").Dot("Future").Dot("Get").CallFunc(func(args *g.Group) {
@@ -845,12 +845,12 @@ func (svc *Manifest) genWorkerWorkflowFunctionVars(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Qual(workflowPkg, "Context")
if hasInput {
- args.Op("*").Id(svc.getMessageName(method.Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
})
@@ -876,12 +876,12 @@ func (svc *Manifest) genWorkerWorkflowFunctionVars(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Qual(workflowPkg, "Context")
if hasInput {
- args.Op("*").Id(svc.getMessageName(method.Input))
+ args.Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
})
@@ -912,12 +912,12 @@ func (svc *Manifest) genWorkerWorkflowFunctionVars(f *g.File) {
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Id(svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -953,7 +953,7 @@ func (svc *Manifest) genWorkerWorkflowInput(f *g.File, workflow protoreflect.Ful
f.Commentf("%s describes the input to a(n) %s workflow constructor", typeName, svc.fqnForWorkflow(workflow))
f.Type().Id(typeName).StructFunc(func(fields *g.Group) {
if hasInput {
- fields.Id("Req").Op("*").Id(svc.getMessageName(method.Input))
+ fields.Id("Req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
// add workflow signals
@@ -994,7 +994,7 @@ func (svc *Manifest) genWorkerWorkflowInterface(f *g.File, workflow protoreflect
).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Id(svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
diff --git a/internal/plugin/xns.go b/internal/plugin/xns.go
index e68892fc..768d72d0 100644
--- a/internal/plugin/xns.go
+++ b/internal/plugin/xns.go
@@ -148,7 +148,7 @@ func (svc *Manifest) genXNSActivitiesQueryMethod(f *g.File, query protoreflect.F
).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Id("resp").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Id("resp").Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Err().Error()
}).
@@ -158,7 +158,7 @@ func (svc *Manifest) genXNSActivitiesQueryMethod(f *g.File, query protoreflect.F
}
if hasInput {
fn.Comment("unmarshal query request")
- fn.Var().Id("req").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ fn.Var().Id("req").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Input))
fn.If(g.Err().Op(":=").Id("input").Dot("Request").Dot("UnmarshalTo").Call(g.Op("&").Id("req")), g.Err().Op("!=").Nil()).Block(
g.ReturnFunc(func(returnVals *g.Group) {
if hasOutput {
@@ -168,7 +168,7 @@ func (svc *Manifest) genXNSActivitiesQueryMethod(f *g.File, query protoreflect.F
g.Qual(temporalPkg, "NewNonRetryableApplicationError").Custom(
multiLineArgs,
g.Qual("fmt", "Sprintf").Call(
- g.Lit(fmt.Sprintf("error unmarshalling query request of type %%s as %s.%s", string(svc.File.GoImportPath), svc.getMessageName(method.Input))),
+ g.Lit(fmt.Sprintf("error unmarshalling query request of type %%s as %s.%s", string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))),
g.Id("input").Dot("Request").Dot("GetTypeUrl").Call(),
),
g.Lit("InvalidArgument"),
@@ -256,13 +256,13 @@ func (svc *Manifest) genXNSActivitiesSignalMethod(f *g.File, signal protoreflect
}
if hasInput {
fn.Comment("unmarshal signal request")
- fn.Var().Id("req").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ fn.Var().Id("req").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
fn.If(g.Err().Op(":=").Id("input").Dot("Request").Dot("UnmarshalTo").Call(g.Op("&").Id("req")), g.Err().Op("!=").Nil()).Block(
g.Return(g.Id(svc.toLowerCamel("%sOptions", svc.GoName)).Dot("convertError").Call(
g.Qual(temporalPkg, "NewNonRetryableApplicationError").Custom(
multiLineArgs,
g.Qual("fmt", "Sprintf").Call(
- g.Lit(fmt.Sprintf("error unmarshalling signal request of type %%s as %s.%s", string(svc.File.GoImportPath), svc.getMessageName(method.Input))),
+ g.Lit(fmt.Sprintf("error unmarshalling signal request of type %%s as %s.%s", string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))),
g.Id("input").Dot("Request").Dot("GetTypeUrl").Call(),
),
g.Lit("InvalidArgument"),
@@ -328,7 +328,7 @@ func (svc *Manifest) genXNSActivitiesUpdateMethod(f *g.File, update protoreflect
).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Id("resp").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Id("resp").Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Err().Error()
}).
@@ -373,7 +373,7 @@ func (svc *Manifest) genXNSActivitiesUpdateMethod(f *g.File, update protoreflect
).Else().BlockFunc(func(bl *g.Group) {
if hasInput {
bl.Comment("unmarshal update request")
- bl.Var().Id("req").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ bl.Var().Id("req").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
bl.If(g.Err().Op(":=").Id("input").Dot("Request").Dot("UnmarshalTo").Call(g.Op("&").Id("req")), g.Err().Op("!=").Nil()).Block(
g.ReturnFunc(func(returnVals *g.Group) {
if hasOutput {
@@ -383,7 +383,7 @@ func (svc *Manifest) genXNSActivitiesUpdateMethod(f *g.File, update protoreflect
g.Qual(temporalPkg, "NewNonRetryableApplicationError").Custom(
multiLineArgs,
g.Qual("fmt", "Sprintf").Call(
- g.Lit(fmt.Sprintf("error unmarshalling update request of type %%s as %s.%s", string(svc.File.GoImportPath), svc.getMessageName(method.Input))),
+ g.Lit(fmt.Sprintf("error unmarshalling update request of type %%s as %s.%s", string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))),
g.Id("input").Dot("Request").Dot("GetTypeUrl").Call(),
),
g.Lit("InvalidArgument"),
@@ -507,7 +507,7 @@ func (svc *Manifest) genXNSActivitiesWorkflowMethod(f *g.File, workflow, signal
).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Id("resp").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Id("resp").Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Err().Error()
}).
@@ -524,7 +524,7 @@ func (svc *Manifest) genXNSActivitiesWorkflowMethod(f *g.File, workflow, signal
if hasInput {
fn.Comment("unmarshal workflow request")
- fn.Var().Id("req").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ fn.Var().Id("req").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
fn.If(g.Err().Op(":=").Id("input").Dot("Request").Dot("UnmarshalTo").Call(g.Op("&").Id("req")), g.Err().Op("!=").Nil()).Block(
g.ReturnFunc(func(returnVals *g.Group) {
if hasOutput {
@@ -534,7 +534,7 @@ func (svc *Manifest) genXNSActivitiesWorkflowMethod(f *g.File, workflow, signal
g.Qual(temporalPkg, "NewNonRetryableApplicationError").Custom(
multiLineArgs,
g.Qual("fmt", "Sprintf").Call(
- g.Lit(fmt.Sprintf("error unmarshalling workflow request of type %%s as %s.%s", string(svc.File.GoImportPath), svc.getMessageName(method.Input))),
+ g.Lit(fmt.Sprintf("error unmarshalling workflow request of type %%s as %s.%s", string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))),
g.Id("input").Dot("Request").Dot("GetTypeUrl").Call(),
),
g.Lit("InvalidArgument"),
@@ -547,7 +547,7 @@ func (svc *Manifest) genXNSActivitiesWorkflowMethod(f *g.File, workflow, signal
if handlerInput {
fn.Comment("unmarshal signal request")
- fn.Var().Id("signal").Qual(string(svc.File.GoImportPath), svc.getMessageName(handler.Input))
+ fn.Var().Id("signal").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
fn.If(g.Err().Op(":=").Id("input").Dot("Signal").Dot("UnmarshalTo").Call(g.Op("&").Id("signal")), g.Err().Op("!=").Nil()).Block(
g.ReturnFunc(func(returnVals *g.Group) {
if hasOutput {
@@ -557,7 +557,7 @@ func (svc *Manifest) genXNSActivitiesWorkflowMethod(f *g.File, workflow, signal
g.Qual(temporalPkg, "NewNonRetryableApplicationError").Custom(
multiLineArgs,
g.Qual("fmt", "Sprintf").Call(
- g.Lit(fmt.Sprintf("error unmarshalling signal request of type %%s as %s.%s", string(svc.File.GoImportPath), svc.getMessageName(handler.Input))),
+ g.Lit(fmt.Sprintf("error unmarshalling signal request of type %%s as %s.%s", string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))),
g.Id("input").Dot("Signal").Dot("GetTypeUrl").Call(),
),
g.Lit("InvalidArgument"),
@@ -982,13 +982,13 @@ func (svc *Manifest) genXNSQueryFunction(f *g.File, query protoreflect.FullName)
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sQueryOptions", query))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -1028,7 +1028,7 @@ func (svc *Manifest) genXNSQueryFunctionAsync(f *g.File, query protoreflect.Full
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sQueryOptions", query))
}).
@@ -1148,13 +1148,13 @@ func (svc *Manifest) genXNSQueryHandleImpl(f *g.File, query protoreflect.FullNam
Params(g.Id("ctx").Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
fn.If(
g.Err().Op(":=").Id("r").Dot("future").Dot("Get").CallFunc(func(args *g.Group) {
@@ -1205,7 +1205,7 @@ func (svc *Manifest) genXNSQueryHandleInterface(f *g.File, query protoreflect.Fu
Params(g.Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -1277,7 +1277,7 @@ func (svc *Manifest) genXNSSignalFunction(f *g.File, signal protoreflect.FullNam
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sSignalOptions", signal))
}).
@@ -1313,7 +1313,7 @@ func (svc *Manifest) genXNSSignalFunctionAsync(f *g.File, signal protoreflect.Fu
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sSignalOptions", signal))
}).
@@ -1513,13 +1513,13 @@ func (svc *Manifest) genXNSUpdateFunction(f *g.File, update protoreflect.FullNam
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sUpdateOptions", update))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -1559,7 +1559,7 @@ func (svc *Manifest) genXNSUpdateFunctionAsync(f *g.File, update protoreflect.Fu
args.Id("workflowID").String()
args.Id("runID").String()
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sUpdateOptions", update))
}).
@@ -1821,13 +1821,13 @@ func (svc *Manifest) genXNSUpdateHandleImpl(f *g.File, update protoreflect.FullN
Params(g.Id("ctx").Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
fn.If(
g.Err().Op(":=").Id("r").Dot("future").Dot("Get").CallFunc(func(args *g.Group) {
@@ -1887,7 +1887,7 @@ func (svc *Manifest) genXNSUpdateHandleInterface(f *g.File, update protoreflect.
Params(g.Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -2055,13 +2055,13 @@ func (svc *Manifest) genXNSWorkflowRunImpl(f *g.File, workflow protoreflect.Full
Params(g.Id("ctx").Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
BlockFunc(func(fn *g.Group) {
if hasOutput {
- fn.Var().Id("resp").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ fn.Var().Id("resp").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
fn.If(
g.Err().Op(":=").Id("r").Dot("future").Dot("Get").CallFunc(func(args *g.Group) {
@@ -2382,7 +2382,7 @@ func (svc *Manifest) genXNSWorkflowRunInterface(f *g.File, workflow protoreflect
Params(g.Qual(workflowPkg, "Context")).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).Line()
@@ -2544,16 +2544,16 @@ func (svc *Manifest) genXNSWorkflowFunction(f *g.File, workflow, signal protoref
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if signal.IsValid() && handlerInput {
- args.Id("signal").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sWorkflowOptions", workflow))
}).
ParamsFunc(func(returnVals *g.Group) {
if hasOutput {
- returnVals.Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Output))
+ returnVals.Op("*").Qual(string(method.Output.GoIdent.GoImportPath), svc.getMessageName(method.Output))
}
returnVals.Error()
}).
@@ -2604,10 +2604,10 @@ func (svc *Manifest) genXNSWorkflowFunctionAsync(f *g.File, workflow, signal pro
ParamsFunc(func(args *g.Group) {
args.Id("ctx").Qual(workflowPkg, "Context")
if hasInput {
- args.Id("req").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(method.Input))
+ args.Id("req").Op("*").Qual(string(method.Input.GoIdent.GoImportPath), svc.getMessageName(method.Input))
}
if handlerInput {
- args.Id("signal").Op("*").Qual(string(svc.File.GoImportPath), svc.getMessageName(handler.Input))
+ args.Id("signal").Op("*").Qual(string(handler.Input.GoIdent.GoImportPath), svc.getMessageName(handler.Input))
}
args.Id("opts").Op("...").Op("*").Id(svc.toCamel("%sWorkflowOptions", workflow))
}).
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
index 1af34411..2193714f 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
@@ -3,9 +3,11 @@
package v1
import (
- mock "github.com/stretchr/testify/mock"
+ commonv1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
internal "go.temporal.io/sdk/workflow"
+ mock "github.com/stretchr/testify/mock"
+
v1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1"
)
@@ -174,6 +176,65 @@ func (_c *MockSimpleWorkflowFunctions_SomeWorkflow3_Call) RunAndReturn(run func(
return _c
}
+// SomeWorkflow4 provides a mock function with given fields: _a0, _a1
+func (_m *MockSimpleWorkflowFunctions) SomeWorkflow4(_a0 internal.Context, _a1 *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error) {
+ ret := _m.Called(_a0, _a1)
+
+ if len(ret) == 0 {
+ panic("no return value specified for SomeWorkflow4")
+ }
+
+ var r0 *commonv1.PaginatedResponse
+ var r1 error
+ if rf, ok := ret.Get(0).(func(internal.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)); ok {
+ return rf(_a0, _a1)
+ }
+ if rf, ok := ret.Get(0).(func(internal.Context, *commonv1.PaginatedRequest) *commonv1.PaginatedResponse); ok {
+ r0 = rf(_a0, _a1)
+ } else {
+ if ret.Get(0) != nil {
+ r0 = ret.Get(0).(*commonv1.PaginatedResponse)
+ }
+ }
+
+ if rf, ok := ret.Get(1).(func(internal.Context, *commonv1.PaginatedRequest) error); ok {
+ r1 = rf(_a0, _a1)
+ } else {
+ r1 = ret.Error(1)
+ }
+
+ return r0, r1
+}
+
+// MockSimpleWorkflowFunctions_SomeWorkflow4_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SomeWorkflow4'
+type MockSimpleWorkflowFunctions_SomeWorkflow4_Call struct {
+ *mock.Call
+}
+
+// SomeWorkflow4 is a helper method to define mock.On call
+// - _a0 internal.Context
+// - _a1 *commonv1.PaginatedRequest
+func (_e *MockSimpleWorkflowFunctions_Expecter) SomeWorkflow4(_a0 interface{}, _a1 interface{}) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call {
+ return &MockSimpleWorkflowFunctions_SomeWorkflow4_Call{Call: _e.mock.On("SomeWorkflow4", _a0, _a1)}
+}
+
+func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) Run(run func(_a0 internal.Context, _a1 *commonv1.PaginatedRequest)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call {
+ _c.Call.Run(func(args mock.Arguments) {
+ run(args[0].(internal.Context), args[1].(*commonv1.PaginatedRequest))
+ })
+ return _c
+}
+
+func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) Return(_a0 *commonv1.PaginatedResponse, _a1 error) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call {
+ _c.Call.Return(_a0, _a1)
+ return _c
+}
+
+func (_c *MockSimpleWorkflowFunctions_SomeWorkflow4_Call) RunAndReturn(run func(internal.Context, *commonv1.PaginatedRequest) (*commonv1.PaginatedResponse, error)) *MockSimpleWorkflowFunctions_SomeWorkflow4_Call {
+ _c.Call.Return(run)
+ return _c
+}
+
// NewMockSimpleWorkflowFunctions creates a new instance of MockSimpleWorkflowFunctions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockSimpleWorkflowFunctions(t interface {
diff --git a/proto/README.md b/proto/README.md
index 97dab7ad..514cd218 100644
--- a/proto/README.md
+++ b/proto/README.md
@@ -103,6 +103,7 @@
- [mycompany.simple.SomeWorkflow1](#mycompany-simple-someworkflow1-workflow)
- [mycompany.simple.SomeWorkflow2](#mycompany-simple-someworkflow2-workflow)
- [mycompany.simple.Simple.SomeWorkflow3](#mycompany-simple-simple-someworkflow3-workflow)
+ - [mycompany.simple.Simple.SomeWorkflow4](#mycompany-simple-simple-someworkflow4-workflow)
- [Queries](#mycompany-simple-simple-queries)
- [mycompany.simple.Simple.SomeQuery1](#mycompany-simple-simple-somequery1-query)
- [mycompany.simple.Simple.SomeQuery2](#mycompany-simple-simple-somequery2-query)
@@ -213,6 +214,7 @@
- [test.xnserr.v1.SleepRequest](#test-xnserr-v1-sleeprequest)
- [google.protobuf](#google-protobuf)
- Messages
+ - [google.protobuf.Any](#google-protobuf-any)
- [google.protobuf.Duration](#google-protobuf-duration)
- [google.protobuf.ListValue](#google-protobuf-listvalue)
- [google.protobuf.NullValue](#google-protobuf-nullvalue)
@@ -220,6 +222,10 @@
- [google.protobuf.Struct.FieldsEntry](#google-protobuf-struct-fieldsentry)
- [google.protobuf.Timestamp](#google-protobuf-timestamp)
- [google.protobuf.Value](#google-protobuf-value)
+- [mycompany.simple.common.v1](#mycompany-simple-common-v1)
+ - Messages
+ - [mycompany.simple.common.v1.PaginatedRequest](#mycompany-simple-common-v1-paginatedrequest)
+ - [mycompany.simple.common.v1.PaginatedResponse](#mycompany-simple-common-v1-paginatedresponse)
- [temporal.xns.v1](#temporal-xns-v1)
- Messages
- [temporal.xns.v1.IDReusePolicy](#temporal-xns-v1-idreusepolicy)
@@ -2160,6 +2166,68 @@ go_name: RequestVal
+
+---
+
+### mycompany.simple.Simple.SomeWorkflow4
+
+
+SomeWorkflow4 retrieves a paginated list of items
+
+
+**Input:** [mycompany.simple.common.v1.PaginatedRequest](#mycompany-simple-common-v1-paginatedrequest)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+cursor |
+bytes |
+
+json_name: cursor
+go_name: Cursor |
+
+limit |
+uint32 |
+
+json_name: limit
+go_name: Limit |
+
+
+
+**Output:** [mycompany.simple.common.v1.PaginatedResponse](#mycompany-simple-common-v1-paginatedresponse)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+items |
+google.protobuf.Any |
+
+json_name: items
+go_name: Items |
+
+next_cursor |
+bytes |
+
+json_name: nextCursor
+go_name: NextCursor |
+
+
+
+**Defaults:**
+
+
+Name | Value |
+id | some-workflow-4/${! uuid_v4() }
|
+id_reuse_policy | WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED
|
@@ -4481,6 +4549,151 @@ go_name: Sleep
## Messages
+
+### google.protobuf.Any
+
+
+`Any` contains an arbitrary serialized protocol buffer message along with a
+URL that describes the type of the serialized message.
+
+Protobuf library provides support to pack/unpack Any values in the form
+of utility functions or additional generated methods of the Any type.
+
+Example 1: Pack and unpack a message in C++.
+
+ Foo foo = ...;
+ Any any;
+ any.PackFrom(foo);
+ ...
+ if (any.UnpackTo(&foo)) {
+ ...
+ }
+
+Example 2: Pack and unpack a message in Java.
+
+ Foo foo = ...;
+ Any any = Any.pack(foo);
+ ...
+ if (any.is(Foo.class)) {
+ foo = any.unpack(Foo.class);
+ }
+ // or ...
+ if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ foo = any.unpack(Foo.getDefaultInstance());
+ }
+
+ Example 3: Pack and unpack a message in Python.
+
+ foo = Foo(...)
+ any = Any()
+ any.Pack(foo)
+ ...
+ if any.Is(Foo.DESCRIPTOR):
+ any.Unpack(foo)
+ ...
+
+ Example 4: Pack and unpack a message in Go
+
+ foo := &pb.Foo{...}
+ any, err := anypb.New(foo)
+ if err != nil {
+ ...
+ }
+ ...
+ foo := &pb.Foo{}
+ if err := any.UnmarshalTo(foo); err != nil {
+ ...
+ }
+
+The pack methods provided by protobuf library will by default use
+'type.googleapis.com/full.type.name' as the type URL and the unpack
+methods only use the fully qualified type name after the last '/'
+in the type URL, for example "foo.bar.com/x/y.z" will yield type
+name "y.z".
+
+JSON
+====
+The JSON representation of an `Any` value uses the regular
+representation of the deserialized, embedded message, with an
+additional field `@type` which contains the type URL. Example:
+
+ package google.profile;
+ message Person {
+ string first_name = 1;
+ string last_name = 2;
+ }
+
+ {
+ "@type": "type.googleapis.com/google.profile.Person",
+ "firstName": ,
+ "lastName":
+ }
+
+If the embedded message type is well-known and has a custom JSON
+representation, that representation will be embedded adding a field
+`value` which holds the custom JSON in addition to the `@type`
+field. Example (for message [google.protobuf.Duration][]):
+
+ {
+ "@type": "type.googleapis.com/google.protobuf.Duration",
+ "value": "1.212s"
+ }
+
+
+
+
+Attribute |
+Type |
+Description |
+
+
+type_url |
+string |
+
+A URL/resource name that uniquely identifies the type of the serialized
+protocol buffer message. This string must contain at least
+one "/" character. The last segment of the URL's path must represent
+the fully qualified name of the type (as in
+`path/google.protobuf.Duration`). The name should be in a canonical form
+(e.g., leading "." is not accepted).
+
+In practice, teams usually precompile into the binary all types that they
+expect it to use in the context of Any. However, for URLs which use the
+scheme `http`, `https`, or no scheme, one can optionally set up a type
+server that maps type URLs to message definitions as follows:
+
+* If no scheme is provided, `https` is assumed.
+* An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ value in binary format, or produce an error.
+* Applications are allowed to cache lookup results based on the
+ URL, or have them precompiled into a binary to avoid any
+ lookup. Therefore, binary compatibility needs to be preserved
+ on changes to types. (Use versioned type names to manage
+ breaking changes.)
+
+Note: this functionality is not currently available in the official
+protobuf release, and it is not used for type URLs beginning with
+type.googleapis.com. As of May 2023, there are no widely used type server
+implementations and no plans to implement one.
+
+Schemes other than `http`, `https` (or the empty scheme) might be
+used with implementation specific semantics.
+
+json_name: typeUrl
+go_name: TypeUrl |
+
+value |
+bytes |
+
+Must be a valid serialized protocol buffer of the above specified type.
+
+json_name: value
+go_name: Value |
+
+
+
+
+
### google.protobuf.Duration
@@ -4885,6 +5098,65 @@ go_name: StructValue
+
+# mycompany.simple.common.v1
+
+
+## Messages
+
+
+### mycompany.simple.common.v1.PaginatedRequest
+
+
+
+Attribute |
+Type |
+Description |
+
+
+cursor |
+bytes |
+
+json_name: cursor
+go_name: Cursor |
+
+limit |
+uint32 |
+
+json_name: limit
+go_name: Limit |
+
+
+
+
+
+
+### mycompany.simple.common.v1.PaginatedResponse
+
+
+
+Attribute |
+Type |
+Description |
+
+
+items |
+google.protobuf.Any |
+
+json_name: items
+go_name: Items |
+
+next_cursor |
+bytes |
+
+json_name: nextCursor
+go_name: NextCursor |
+
+
+
+
+
+
# temporal.xns.v1
diff --git a/test/simple/main.go b/test/simple/main.go
index ac101931..5a80cf9a 100644
--- a/test/simple/main.go
+++ b/test/simple/main.go
@@ -5,17 +5,22 @@ import (
"fmt"
"log"
"os"
+ "strconv"
"strings"
+ commonv1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
simplepb "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1"
"github.com/urfave/cli/v2"
logger "go.temporal.io/sdk/log"
+ "go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/worker"
"go.temporal.io/sdk/workflow"
+ "google.golang.org/protobuf/types/known/anypb"
)
type Workflows struct {
workflows simplepb.SimpleWorkflowFunctions
+ items []*simplepb.Foo
}
// ============================================================================
@@ -27,7 +32,7 @@ type someWorkflow1 struct {
}
func Register(r worker.Registry) {
- simplepb.RegisterSimpleWorkflows(r, &Workflows{simplepb.NewSimpleWorkflowFunctions()})
+ simplepb.RegisterSimpleWorkflows(r, &Workflows{simplepb.NewSimpleWorkflowFunctions(), nil})
simplepb.RegisterSimpleActivities(r, &Activities{})
simplepb.RegisterOnlyActivitiesActivities(r, &OnlyActivites{})
}
@@ -149,6 +154,53 @@ func (wf *someWorkflow3) Execute(ctx workflow.Context) error {
// ============================================================================
+type someWorkflow4 struct {
+ *Workflows
+ *simplepb.SomeWorkflow4WorkflowInput
+ log logger.Logger
+ signals int
+ updates int
+}
+
+func (w *Workflows) SomeWorkflow4(ctx workflow.Context, input *simplepb.SomeWorkflow4WorkflowInput) (simplepb.SomeWorkflow4Workflow, error) {
+ return &someWorkflow4{w, input, workflow.GetLogger(ctx), 0, 0}, nil
+}
+
+func (wf *someWorkflow4) Execute(ctx workflow.Context) (resp *commonv1.PaginatedResponse, err error) {
+ limit := wf.Req.GetLimit()
+ if limit == 0 {
+ limit = 3
+ }
+
+ var start int
+ if cursor := wf.Req.GetCursor(); len(cursor) > 0 {
+ if start, err = strconv.Atoi(string(cursor)); err != nil {
+ return nil, temporal.NewNonRetryableApplicationError("invalid cursor", "InvalidArgument", err)
+ }
+ }
+
+ resp = &commonv1.PaginatedResponse{}
+ var n int
+ if start < len(wf.items) {
+ for _, i := range wf.items[start:] {
+ item, err := anypb.New(i)
+ if err != nil {
+ return nil, temporal.NewNonRetryableApplicationError("error serializing item", "Internal", err)
+ }
+ resp.Items, n = append(resp.Items, item), n+1
+ if uint32(n) >= limit {
+ break
+ }
+ }
+ }
+ if len(resp.Items) <= int(limit) {
+ resp.NextCursor = []byte(strconv.Itoa(start + int(limit)))
+ }
+ return resp, nil
+}
+
+// ============================================================================
+
type Activities struct{}
var ActivityEvents []string
diff --git a/test/simple/main_test.go b/test/simple/main_test.go
index 64046ea7..e0c14e72 100644
--- a/test/simple/main_test.go
+++ b/test/simple/main_test.go
@@ -11,6 +11,7 @@ import (
"testing"
"time"
+ commonv1 "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/common/v1"
simplepb "github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1"
simplemocks "github.com/cludden/protoc-gen-go-temporal/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1"
"github.com/cludden/protoc-gen-go-temporal/pkg/patch"
@@ -22,6 +23,8 @@ import (
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/testsuite"
"go.temporal.io/sdk/workflow"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
)
func TestSomeWorkflow1WithTestClient(t *testing.T) {
@@ -171,7 +174,7 @@ func TestSomeWorkflow2WithTestClient(t *testing.T) {
require, ctx := require.New(t), context.Background()
var suite testsuite.WorkflowTestSuite
env := suite.NewTestWorkflowEnvironment()
- client := simplepb.NewTestSimpleClient(env, &Workflows{simplepb.NewSimpleWorkflowFunctions()}, &Activities{})
+ client := simplepb.NewTestSimpleClient(env, &Workflows{simplepb.NewSimpleWorkflowFunctions(), nil}, &Activities{})
run, err := client.SomeWorkflow2Async(ctx)
require.NoError(err)
@@ -199,7 +202,7 @@ func TestSomeWorkflow2WithMock(t *testing.T) {
env := suite.NewTestWorkflowEnvironment()
fns := simplemocks.NewMockSimpleWorkflowFunctions(t)
fns.EXPECT().SomeWorkflow3(mock.Anything, mock.Anything).Return(nil)
- client := simplepb.NewTestSimpleClient(env, &Workflows{fns}, &Activities{})
+ client := simplepb.NewTestSimpleClient(env, &Workflows{fns, nil}, &Activities{})
run, err := client.SomeWorkflow2Async(ctx)
require.NoError(err)
@@ -278,6 +281,30 @@ func TestSomeWorkflow3Child(t *testing.T) {
require.False(localActivityCalled)
}
+func TestSomeWorkflow4C(t *testing.T) {
+ require := require.New(t)
+ var suite testsuite.WorkflowTestSuite
+ env := suite.NewTestWorkflowEnvironment()
+ c := simplepb.NewTestSimpleClient(env, &Workflows{
+ items: []*simplepb.Foo{
+ {Foo: "foo"},
+ {Foo: "bar"},
+ {Foo: "baz"},
+ {Foo: "qux"},
+ {Foo: "quux"},
+ },
+ }, &Activities{})
+ resp, err := c.SomeWorkflow4(context.Background(), &commonv1.PaginatedRequest{Limit: 3, Cursor: []byte(`1`)})
+ require.NoError(err)
+ require.Equal("4", string(resp.GetNextCursor()))
+ require.Len(resp.GetItems(), 3)
+ for i, foo := range []string{"bar", "baz", "qux"} {
+ var f simplepb.Foo
+ require.NoError(anypb.UnmarshalTo(resp.GetItems()[i], &f, proto.UnmarshalOptions{}))
+ require.Equal(foo, f.GetFoo())
+ }
+}
+
func TestCli(t *testing.T) {
require := require.New(t)
app, err := newCli()
diff --git a/test/simple/proto/test/simple/common/v1/common.proto b/test/simple/proto/test/simple/common/v1/common.proto
new file mode 100644
index 00000000..d1146716
--- /dev/null
+++ b/test/simple/proto/test/simple/common/v1/common.proto
@@ -0,0 +1,16 @@
+syntax="proto3";
+
+// buf:lint:ignore PACKAGE_DIRECTORY_MATCH
+package mycompany.simple.common.v1;
+
+import "google/protobuf/any.proto";
+
+message PaginatedRequest {
+ uint32 limit = 1;
+ bytes cursor = 2;
+}
+
+message PaginatedResponse {
+ repeated google.protobuf.Any items = 1;
+ bytes next_cursor = 2;
+}
diff --git a/test/simple/proto/test/simple/v1/simple.proto b/test/simple/proto/test/simple/v1/simple.proto
index 1a84a235..fdb70387 100644
--- a/test/simple/proto/test/simple/v1/simple.proto
+++ b/test/simple/proto/test/simple/v1/simple.proto
@@ -8,6 +8,8 @@ import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "temporal/v1/temporal.proto";
+import "test/simple/common/v1/common.proto";
+
service Simple {
option (temporal.v1.service) = {
task_queue: 'my-task-queue'
@@ -58,6 +60,13 @@ service Simple {
};
}
+ // SomeWorkflow4 retrieves a paginated list of items
+ rpc SomeWorkflow4(common.v1.PaginatedRequest) returns (common.v1.PaginatedResponse) {
+ option (temporal.v1.workflow) = {
+ id: 'some-workflow-4/${! uuid_v4() }'
+ };
+ }
+
// SomeActivity1 does some activity thing.
rpc SomeActivity1(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (temporal.v1.activity) = {