forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
historyservice_terminateworkflowexecution.go
745 lines (675 loc) · 24.3 KB
/
historyservice_terminateworkflowexecution.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by thriftrw v1.13.1. DO NOT EDIT.
// @generated
package history
import (
"errors"
"fmt"
"github.com/uber/cadence/.gen/go/shared"
"go.uber.org/multierr"
"go.uber.org/thriftrw/wire"
"go.uber.org/zap/zapcore"
"strings"
)
// HistoryService_TerminateWorkflowExecution_Args represents the arguments for the HistoryService.TerminateWorkflowExecution function.
//
// The arguments for TerminateWorkflowExecution are sent and received over the wire as this struct.
type HistoryService_TerminateWorkflowExecution_Args struct {
TerminateRequest *TerminateWorkflowExecutionRequest `json:"terminateRequest,omitempty"`
}
// ToWire translates a HistoryService_TerminateWorkflowExecution_Args struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
// x, err := v.ToWire()
// if err != nil {
// return err
// }
//
// if err := binaryProtocol.Encode(x, writer); err != nil {
// return err
// }
func (v *HistoryService_TerminateWorkflowExecution_Args) ToWire() (wire.Value, error) {
var (
fields [1]wire.Field
i int = 0
w wire.Value
err error
)
if v.TerminateRequest != nil {
w, err = v.TerminateRequest.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 1, Value: w}
i++
}
return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}
func _TerminateWorkflowExecutionRequest_1_Read(w wire.Value) (*TerminateWorkflowExecutionRequest, error) {
var v TerminateWorkflowExecutionRequest
err := v.FromWire(w)
return &v, err
}
// FromWire deserializes a HistoryService_TerminateWorkflowExecution_Args struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a HistoryService_TerminateWorkflowExecution_Args struct
// from the provided intermediate representation.
//
// x, err := binaryProtocol.Decode(reader, wire.TStruct)
// if err != nil {
// return nil, err
// }
//
// var v HistoryService_TerminateWorkflowExecution_Args
// if err := v.FromWire(x); err != nil {
// return nil, err
// }
// return &v, nil
func (v *HistoryService_TerminateWorkflowExecution_Args) FromWire(w wire.Value) error {
var err error
for _, field := range w.GetStruct().Fields {
switch field.ID {
case 1:
if field.Value.Type() == wire.TStruct {
v.TerminateRequest, err = _TerminateWorkflowExecutionRequest_1_Read(field.Value)
if err != nil {
return err
}
}
}
}
return nil
}
// String returns a readable string representation of a HistoryService_TerminateWorkflowExecution_Args
// struct.
func (v *HistoryService_TerminateWorkflowExecution_Args) String() string {
if v == nil {
return "<nil>"
}
var fields [1]string
i := 0
if v.TerminateRequest != nil {
fields[i] = fmt.Sprintf("TerminateRequest: %v", v.TerminateRequest)
i++
}
return fmt.Sprintf("HistoryService_TerminateWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}
// Equals returns true if all the fields of this HistoryService_TerminateWorkflowExecution_Args match the
// provided HistoryService_TerminateWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *HistoryService_TerminateWorkflowExecution_Args) Equals(rhs *HistoryService_TerminateWorkflowExecution_Args) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !((v.TerminateRequest == nil && rhs.TerminateRequest == nil) || (v.TerminateRequest != nil && rhs.TerminateRequest != nil && v.TerminateRequest.Equals(rhs.TerminateRequest))) {
return false
}
return true
}
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of HistoryService_TerminateWorkflowExecution_Args.
func (v *HistoryService_TerminateWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.TerminateRequest != nil {
err = multierr.Append(err, enc.AddObject("terminateRequest", v.TerminateRequest))
}
return err
}
// GetTerminateRequest returns the value of TerminateRequest if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Args) GetTerminateRequest() (o *TerminateWorkflowExecutionRequest) {
if v.TerminateRequest != nil {
return v.TerminateRequest
}
return
}
// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "TerminateWorkflowExecution" for this struct.
func (v *HistoryService_TerminateWorkflowExecution_Args) MethodName() string {
return "TerminateWorkflowExecution"
}
// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *HistoryService_TerminateWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
return wire.Call
}
// HistoryService_TerminateWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the HistoryService.TerminateWorkflowExecution
// function.
var HistoryService_TerminateWorkflowExecution_Helper = struct {
// Args accepts the parameters of TerminateWorkflowExecution in-order and returns
// the arguments struct for the function.
Args func(
terminateRequest *TerminateWorkflowExecutionRequest,
) *HistoryService_TerminateWorkflowExecution_Args
// IsException returns true if the given error can be thrown
// by TerminateWorkflowExecution.
//
// An error can be thrown by TerminateWorkflowExecution only if the
// corresponding exception type was mentioned in the 'throws'
// section for it in the Thrift file.
IsException func(error) bool
// WrapResponse returns the result struct for TerminateWorkflowExecution
// given the error returned by it. The provided error may
// be nil if TerminateWorkflowExecution did not fail.
//
// This allows mapping errors returned by TerminateWorkflowExecution into a
// serializable result struct. WrapResponse returns a
// non-nil error if the provided error cannot be thrown by
// TerminateWorkflowExecution
//
// err := TerminateWorkflowExecution(args)
// result, err := HistoryService_TerminateWorkflowExecution_Helper.WrapResponse(err)
// if err != nil {
// return fmt.Errorf("unexpected error from TerminateWorkflowExecution: %v", err)
// }
// serialize(result)
WrapResponse func(error) (*HistoryService_TerminateWorkflowExecution_Result, error)
// UnwrapResponse takes the result struct for TerminateWorkflowExecution
// and returns the erorr returned by it (if any).
//
// The error is non-nil only if TerminateWorkflowExecution threw an
// exception.
//
// result := deserialize(bytes)
// err := HistoryService_TerminateWorkflowExecution_Helper.UnwrapResponse(result)
UnwrapResponse func(*HistoryService_TerminateWorkflowExecution_Result) error
}{}
func init() {
HistoryService_TerminateWorkflowExecution_Helper.Args = func(
terminateRequest *TerminateWorkflowExecutionRequest,
) *HistoryService_TerminateWorkflowExecution_Args {
return &HistoryService_TerminateWorkflowExecution_Args{
TerminateRequest: terminateRequest,
}
}
HistoryService_TerminateWorkflowExecution_Helper.IsException = func(err error) bool {
switch err.(type) {
case *shared.BadRequestError:
return true
case *shared.InternalServiceError:
return true
case *shared.EntityNotExistsError:
return true
case *ShardOwnershipLostError:
return true
case *shared.DomainNotActiveError:
return true
case *shared.LimitExceededError:
return true
case *shared.ServiceBusyError:
return true
default:
return false
}
}
HistoryService_TerminateWorkflowExecution_Helper.WrapResponse = func(err error) (*HistoryService_TerminateWorkflowExecution_Result, error) {
if err == nil {
return &HistoryService_TerminateWorkflowExecution_Result{}, nil
}
switch e := err.(type) {
case *shared.BadRequestError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.BadRequestError")
}
return &HistoryService_TerminateWorkflowExecution_Result{BadRequestError: e}, nil
case *shared.InternalServiceError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.InternalServiceError")
}
return &HistoryService_TerminateWorkflowExecution_Result{InternalServiceError: e}, nil
case *shared.EntityNotExistsError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.EntityNotExistError")
}
return &HistoryService_TerminateWorkflowExecution_Result{EntityNotExistError: e}, nil
case *ShardOwnershipLostError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.ShardOwnershipLostError")
}
return &HistoryService_TerminateWorkflowExecution_Result{ShardOwnershipLostError: e}, nil
case *shared.DomainNotActiveError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.DomainNotActiveError")
}
return &HistoryService_TerminateWorkflowExecution_Result{DomainNotActiveError: e}, nil
case *shared.LimitExceededError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.LimitExceededError")
}
return &HistoryService_TerminateWorkflowExecution_Result{LimitExceededError: e}, nil
case *shared.ServiceBusyError:
if e == nil {
return nil, errors.New("WrapResponse received non-nil error type with nil value for HistoryService_TerminateWorkflowExecution_Result.ServiceBusyError")
}
return &HistoryService_TerminateWorkflowExecution_Result{ServiceBusyError: e}, nil
}
return nil, err
}
HistoryService_TerminateWorkflowExecution_Helper.UnwrapResponse = func(result *HistoryService_TerminateWorkflowExecution_Result) (err error) {
if result.BadRequestError != nil {
err = result.BadRequestError
return
}
if result.InternalServiceError != nil {
err = result.InternalServiceError
return
}
if result.EntityNotExistError != nil {
err = result.EntityNotExistError
return
}
if result.ShardOwnershipLostError != nil {
err = result.ShardOwnershipLostError
return
}
if result.DomainNotActiveError != nil {
err = result.DomainNotActiveError
return
}
if result.LimitExceededError != nil {
err = result.LimitExceededError
return
}
if result.ServiceBusyError != nil {
err = result.ServiceBusyError
return
}
return
}
}
// HistoryService_TerminateWorkflowExecution_Result represents the result of a HistoryService.TerminateWorkflowExecution function call.
//
// The result of a TerminateWorkflowExecution execution is sent and received over the wire as this struct.
type HistoryService_TerminateWorkflowExecution_Result struct {
BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"`
InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
ShardOwnershipLostError *ShardOwnershipLostError `json:"shardOwnershipLostError,omitempty"`
DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"`
LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"`
ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"`
}
// ToWire translates a HistoryService_TerminateWorkflowExecution_Result struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
// x, err := v.ToWire()
// if err != nil {
// return err
// }
//
// if err := binaryProtocol.Encode(x, writer); err != nil {
// return err
// }
func (v *HistoryService_TerminateWorkflowExecution_Result) ToWire() (wire.Value, error) {
var (
fields [7]wire.Field
i int = 0
w wire.Value
err error
)
if v.BadRequestError != nil {
w, err = v.BadRequestError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 1, Value: w}
i++
}
if v.InternalServiceError != nil {
w, err = v.InternalServiceError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 2, Value: w}
i++
}
if v.EntityNotExistError != nil {
w, err = v.EntityNotExistError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 3, Value: w}
i++
}
if v.ShardOwnershipLostError != nil {
w, err = v.ShardOwnershipLostError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 4, Value: w}
i++
}
if v.DomainNotActiveError != nil {
w, err = v.DomainNotActiveError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 5, Value: w}
i++
}
if v.LimitExceededError != nil {
w, err = v.LimitExceededError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 6, Value: w}
i++
}
if v.ServiceBusyError != nil {
w, err = v.ServiceBusyError.ToWire()
if err != nil {
return w, err
}
fields[i] = wire.Field{ID: 7, Value: w}
i++
}
if i > 1 {
return wire.Value{}, fmt.Errorf("HistoryService_TerminateWorkflowExecution_Result should have at most one field: got %v fields", i)
}
return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}
// FromWire deserializes a HistoryService_TerminateWorkflowExecution_Result struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a HistoryService_TerminateWorkflowExecution_Result struct
// from the provided intermediate representation.
//
// x, err := binaryProtocol.Decode(reader, wire.TStruct)
// if err != nil {
// return nil, err
// }
//
// var v HistoryService_TerminateWorkflowExecution_Result
// if err := v.FromWire(x); err != nil {
// return nil, err
// }
// return &v, nil
func (v *HistoryService_TerminateWorkflowExecution_Result) FromWire(w wire.Value) error {
var err error
for _, field := range w.GetStruct().Fields {
switch field.ID {
case 1:
if field.Value.Type() == wire.TStruct {
v.BadRequestError, err = _BadRequestError_Read(field.Value)
if err != nil {
return err
}
}
case 2:
if field.Value.Type() == wire.TStruct {
v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
if err != nil {
return err
}
}
case 3:
if field.Value.Type() == wire.TStruct {
v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
if err != nil {
return err
}
}
case 4:
if field.Value.Type() == wire.TStruct {
v.ShardOwnershipLostError, err = _ShardOwnershipLostError_Read(field.Value)
if err != nil {
return err
}
}
case 5:
if field.Value.Type() == wire.TStruct {
v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
if err != nil {
return err
}
}
case 6:
if field.Value.Type() == wire.TStruct {
v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
if err != nil {
return err
}
}
case 7:
if field.Value.Type() == wire.TStruct {
v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
if err != nil {
return err
}
}
}
}
count := 0
if v.BadRequestError != nil {
count++
}
if v.InternalServiceError != nil {
count++
}
if v.EntityNotExistError != nil {
count++
}
if v.ShardOwnershipLostError != nil {
count++
}
if v.DomainNotActiveError != nil {
count++
}
if v.LimitExceededError != nil {
count++
}
if v.ServiceBusyError != nil {
count++
}
if count > 1 {
return fmt.Errorf("HistoryService_TerminateWorkflowExecution_Result should have at most one field: got %v fields", count)
}
return nil
}
// String returns a readable string representation of a HistoryService_TerminateWorkflowExecution_Result
// struct.
func (v *HistoryService_TerminateWorkflowExecution_Result) String() string {
if v == nil {
return "<nil>"
}
var fields [7]string
i := 0
if v.BadRequestError != nil {
fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
i++
}
if v.InternalServiceError != nil {
fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
i++
}
if v.EntityNotExistError != nil {
fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
i++
}
if v.ShardOwnershipLostError != nil {
fields[i] = fmt.Sprintf("ShardOwnershipLostError: %v", v.ShardOwnershipLostError)
i++
}
if v.DomainNotActiveError != nil {
fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
i++
}
if v.LimitExceededError != nil {
fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
i++
}
if v.ServiceBusyError != nil {
fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
i++
}
return fmt.Sprintf("HistoryService_TerminateWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}
// Equals returns true if all the fields of this HistoryService_TerminateWorkflowExecution_Result match the
// provided HistoryService_TerminateWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *HistoryService_TerminateWorkflowExecution_Result) Equals(rhs *HistoryService_TerminateWorkflowExecution_Result) bool {
if v == nil {
return rhs == nil
} else if rhs == nil {
return false
}
if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
return false
}
if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
return false
}
if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
return false
}
if !((v.ShardOwnershipLostError == nil && rhs.ShardOwnershipLostError == nil) || (v.ShardOwnershipLostError != nil && rhs.ShardOwnershipLostError != nil && v.ShardOwnershipLostError.Equals(rhs.ShardOwnershipLostError))) {
return false
}
if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
return false
}
if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
return false
}
if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
return false
}
return true
}
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of HistoryService_TerminateWorkflowExecution_Result.
func (v *HistoryService_TerminateWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
if v == nil {
return nil
}
if v.BadRequestError != nil {
err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
}
if v.InternalServiceError != nil {
err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
}
if v.EntityNotExistError != nil {
err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
}
if v.ShardOwnershipLostError != nil {
err = multierr.Append(err, enc.AddObject("shardOwnershipLostError", v.ShardOwnershipLostError))
}
if v.DomainNotActiveError != nil {
err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
}
if v.LimitExceededError != nil {
err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
}
if v.ServiceBusyError != nil {
err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
}
return err
}
// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) {
if v.BadRequestError != nil {
return v.BadRequestError
}
return
}
// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
if v.InternalServiceError != nil {
return v.InternalServiceError
}
return
}
// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
if v.EntityNotExistError != nil {
return v.EntityNotExistError
}
return
}
// GetShardOwnershipLostError returns the value of ShardOwnershipLostError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetShardOwnershipLostError() (o *ShardOwnershipLostError) {
if v.ShardOwnershipLostError != nil {
return v.ShardOwnershipLostError
}
return
}
// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
if v.DomainNotActiveError != nil {
return v.DomainNotActiveError
}
return
}
// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
if v.LimitExceededError != nil {
return v.LimitExceededError
}
return
}
// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *HistoryService_TerminateWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
if v.ServiceBusyError != nil {
return v.ServiceBusyError
}
return
}
// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "TerminateWorkflowExecution" for this struct.
func (v *HistoryService_TerminateWorkflowExecution_Result) MethodName() string {
return "TerminateWorkflowExecution"
}
// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *HistoryService_TerminateWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
return wire.Reply
}