// Code generated by thriftrw v1.29.2. DO NOT EDIT.
// @generated

package admin

import (
	bytes "bytes"
	base64 "encoding/base64"
	errors "errors"
	fmt "fmt"
	strings "strings"

	multierr "go.uber.org/multierr"
	stream "go.uber.org/thriftrw/protocol/stream"
	thriftreflect "go.uber.org/thriftrw/thriftreflect"
	wire "go.uber.org/thriftrw/wire"
	zapcore "go.uber.org/zap/zapcore"

	config "github.com/uber/cadence/.gen/go/config"
	replicator "github.com/uber/cadence/.gen/go/replicator"
	shared "github.com/uber/cadence/.gen/go/shared"
)

type AddSearchAttributeRequest struct {
	SearchAttribute map[string]shared.IndexedValueType `json:"searchAttribute,omitempty"`
	SecurityToken   *string                            `json:"securityToken,omitempty"`
}

type _Map_String_IndexedValueType_MapItemList map[string]shared.IndexedValueType

func (m _Map_String_IndexedValueType_MapItemList) ForEach(f func(wire.MapItem) error) error {
	for k, v := range m {
		kw, err := wire.NewValueString(k), error(nil)
		if err != nil {
			return err
		}

		vw, err := v.ToWire()
		if err != nil {
			return err
		}
		err = f(wire.MapItem{Key: kw, Value: vw})
		if err != nil {
			return err
		}
	}
	return nil
}

func (m _Map_String_IndexedValueType_MapItemList) Size() int {
	return len(m)
}

func (_Map_String_IndexedValueType_MapItemList) KeyType() wire.Type {
	return wire.TBinary
}

func (_Map_String_IndexedValueType_MapItemList) ValueType() wire.Type {
	return wire.TI32
}

func (_Map_String_IndexedValueType_MapItemList) Close() {}

// ToWire translates a AddSearchAttributeRequest 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 *AddSearchAttributeRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.SearchAttribute != nil {
		w, err = wire.NewValueMap(_Map_String_IndexedValueType_MapItemList(v.SearchAttribute)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.SecurityToken != nil {
		w, err = wire.NewValueString(*(v.SecurityToken)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _IndexedValueType_Read(w wire.Value) (shared.IndexedValueType, error) {
	var v shared.IndexedValueType
	err := v.FromWire(w)
	return v, err
}

func _Map_String_IndexedValueType_Read(m wire.MapItemList) (map[string]shared.IndexedValueType, error) {
	if m.KeyType() != wire.TBinary {
		return nil, nil
	}

	if m.ValueType() != wire.TI32 {
		return nil, nil
	}

	o := make(map[string]shared.IndexedValueType, m.Size())
	err := m.ForEach(func(x wire.MapItem) error {
		k, err := x.Key.GetString(), error(nil)
		if err != nil {
			return err
		}

		v, err := _IndexedValueType_Read(x.Value)
		if err != nil {
			return err
		}

		o[k] = v
		return nil
	})
	m.Close()
	return o, err
}

// FromWire deserializes a AddSearchAttributeRequest 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 AddSearchAttributeRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AddSearchAttributeRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AddSearchAttributeRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TMap {
				v.SearchAttribute, err = _Map_String_IndexedValueType_Read(field.Value.GetMap())
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.SecurityToken = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _Map_String_IndexedValueType_Encode(val map[string]shared.IndexedValueType, sw stream.Writer) error {

	mh := stream.MapHeader{
		KeyType:   wire.TBinary,
		ValueType: wire.TI32,
		Length:    len(val),
	}
	if err := sw.WriteMapBegin(mh); err != nil {
		return err
	}

	for k, v := range val {
		if err := sw.WriteString(k); err != nil {
			return err
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}

	return sw.WriteMapEnd()
}

// Encode serializes a AddSearchAttributeRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AddSearchAttributeRequest struct could not be encoded.
func (v *AddSearchAttributeRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.SearchAttribute != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TMap}); err != nil {
			return err
		}
		if err := _Map_String_IndexedValueType_Encode(v.SearchAttribute, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.SecurityToken != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.SecurityToken)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _IndexedValueType_Decode(sr stream.Reader) (shared.IndexedValueType, error) {
	var v shared.IndexedValueType
	err := v.Decode(sr)
	return v, err
}

func _Map_String_IndexedValueType_Decode(sr stream.Reader) (map[string]shared.IndexedValueType, error) {
	mh, err := sr.ReadMapBegin()
	if err != nil {
		return nil, err
	}

	if mh.KeyType != wire.TBinary || mh.ValueType != wire.TI32 {
		for i := 0; i < mh.Length; i++ {
			if err := sr.Skip(mh.KeyType); err != nil {
				return nil, err
			}

			if err := sr.Skip(mh.ValueType); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadMapEnd()
	}

	o := make(map[string]shared.IndexedValueType, mh.Length)
	for i := 0; i < mh.Length; i++ {
		k, err := sr.ReadString()
		if err != nil {
			return nil, err
		}

		v, err := _IndexedValueType_Decode(sr)
		if err != nil {
			return nil, err
		}

		o[k] = v
	}

	if err = sr.ReadMapEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a AddSearchAttributeRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AddSearchAttributeRequest struct could not be generated from the wire
// representation.
func (v *AddSearchAttributeRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TMap:
			v.SearchAttribute, err = _Map_String_IndexedValueType_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.SecurityToken = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AddSearchAttributeRequest
// struct.
func (v *AddSearchAttributeRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.SearchAttribute != nil {
		fields[i] = fmt.Sprintf("SearchAttribute: %v", v.SearchAttribute)
		i++
	}
	if v.SecurityToken != nil {
		fields[i] = fmt.Sprintf("SecurityToken: %v", *(v.SecurityToken))
		i++
	}

	return fmt.Sprintf("AddSearchAttributeRequest{%v}", strings.Join(fields[:i], ", "))
}

func _Map_String_IndexedValueType_Equals(lhs, rhs map[string]shared.IndexedValueType) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for lk, lv := range lhs {
		rv, ok := rhs[lk]
		if !ok {
			return false
		}
		if !lv.Equals(rv) {
			return false
		}
	}
	return true
}

func _String_EqualsPtr(lhs, rhs *string) bool {
	if lhs != nil && rhs != nil {

		x := *lhs
		y := *rhs
		return (x == y)
	}
	return lhs == nil && rhs == nil
}

// Equals returns true if all the fields of this AddSearchAttributeRequest match the
// provided AddSearchAttributeRequest.
//
// This function performs a deep comparison.
func (v *AddSearchAttributeRequest) Equals(rhs *AddSearchAttributeRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.SearchAttribute == nil && rhs.SearchAttribute == nil) || (v.SearchAttribute != nil && rhs.SearchAttribute != nil && _Map_String_IndexedValueType_Equals(v.SearchAttribute, rhs.SearchAttribute))) {
		return false
	}
	if !_String_EqualsPtr(v.SecurityToken, rhs.SecurityToken) {
		return false
	}

	return true
}

type _Map_String_IndexedValueType_Zapper map[string]shared.IndexedValueType

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of _Map_String_IndexedValueType_Zapper.
func (m _Map_String_IndexedValueType_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	for k, v := range m {
		err = multierr.Append(err, enc.AddObject((string)(k), v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AddSearchAttributeRequest.
func (v *AddSearchAttributeRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.SearchAttribute != nil {
		err = multierr.Append(err, enc.AddObject("searchAttribute", (_Map_String_IndexedValueType_Zapper)(v.SearchAttribute)))
	}
	if v.SecurityToken != nil {
		enc.AddString("securityToken", *v.SecurityToken)
	}
	return err
}

// GetSearchAttribute returns the value of SearchAttribute if it is set or its
// zero value if it is unset.
func (v *AddSearchAttributeRequest) GetSearchAttribute() (o map[string]shared.IndexedValueType) {
	if v != nil && v.SearchAttribute != nil {
		return v.SearchAttribute
	}

	return
}

// IsSetSearchAttribute returns true if SearchAttribute is not nil.
func (v *AddSearchAttributeRequest) IsSetSearchAttribute() bool {
	return v != nil && v.SearchAttribute != nil
}

// GetSecurityToken returns the value of SecurityToken if it is set or its
// zero value if it is unset.
func (v *AddSearchAttributeRequest) GetSecurityToken() (o string) {
	if v != nil && v.SecurityToken != nil {
		return *v.SecurityToken
	}

	return
}

// IsSetSecurityToken returns true if SecurityToken is not nil.
func (v *AddSearchAttributeRequest) IsSetSecurityToken() bool {
	return v != nil && v.SecurityToken != nil
}

type AdminDeleteWorkflowRequest struct {
	Domain    *string                   `json:"domain,omitempty"`
	Execution *shared.WorkflowExecution `json:"execution,omitempty"`
}

// ToWire translates a AdminDeleteWorkflowRequest 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 *AdminDeleteWorkflowRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Execution != nil {
		w, err = v.Execution.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _WorkflowExecution_Read(w wire.Value) (*shared.WorkflowExecution, error) {
	var v shared.WorkflowExecution
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminDeleteWorkflowRequest 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 AdminDeleteWorkflowRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminDeleteWorkflowRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminDeleteWorkflowRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.Execution, err = _WorkflowExecution_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminDeleteWorkflowRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminDeleteWorkflowRequest struct could not be encoded.
func (v *AdminDeleteWorkflowRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Execution != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Execution.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _WorkflowExecution_Decode(sr stream.Reader) (*shared.WorkflowExecution, error) {
	var v shared.WorkflowExecution
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminDeleteWorkflowRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminDeleteWorkflowRequest struct could not be generated from the wire
// representation.
func (v *AdminDeleteWorkflowRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.Execution, err = _WorkflowExecution_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminDeleteWorkflowRequest
// struct.
func (v *AdminDeleteWorkflowRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.Execution != nil {
		fields[i] = fmt.Sprintf("Execution: %v", v.Execution)
		i++
	}

	return fmt.Sprintf("AdminDeleteWorkflowRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminDeleteWorkflowRequest match the
// provided AdminDeleteWorkflowRequest.
//
// This function performs a deep comparison.
func (v *AdminDeleteWorkflowRequest) Equals(rhs *AdminDeleteWorkflowRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.Execution == nil && rhs.Execution == nil) || (v.Execution != nil && rhs.Execution != nil && v.Execution.Equals(rhs.Execution))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminDeleteWorkflowRequest.
func (v *AdminDeleteWorkflowRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.Execution != nil {
		err = multierr.Append(err, enc.AddObject("execution", v.Execution))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *AdminDeleteWorkflowRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *AdminDeleteWorkflowRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetExecution returns the value of Execution if it is set or its
// zero value if it is unset.
func (v *AdminDeleteWorkflowRequest) GetExecution() (o *shared.WorkflowExecution) {
	if v != nil && v.Execution != nil {
		return v.Execution
	}

	return
}

// IsSetExecution returns true if Execution is not nil.
func (v *AdminDeleteWorkflowRequest) IsSetExecution() bool {
	return v != nil && v.Execution != nil
}

type AdminDeleteWorkflowResponse struct {
	HistoryDeleted    *bool `json:"historyDeleted,omitempty"`
	ExecutionsDeleted *bool `json:"executionsDeleted,omitempty"`
	VisibilityDeleted *bool `json:"visibilityDeleted,omitempty"`
}

// ToWire translates a AdminDeleteWorkflowResponse 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 *AdminDeleteWorkflowResponse) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.HistoryDeleted != nil {
		w, err = wire.NewValueBool(*(v.HistoryDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.ExecutionsDeleted != nil {
		w, err = wire.NewValueBool(*(v.ExecutionsDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.VisibilityDeleted != nil {
		w, err = wire.NewValueBool(*(v.VisibilityDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminDeleteWorkflowResponse 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 AdminDeleteWorkflowResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminDeleteWorkflowResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminDeleteWorkflowResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.HistoryDeleted = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.ExecutionsDeleted = &x
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.VisibilityDeleted = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminDeleteWorkflowResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminDeleteWorkflowResponse struct could not be encoded.
func (v *AdminDeleteWorkflowResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.HistoryDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.HistoryDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ExecutionsDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.ExecutionsDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.VisibilityDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.VisibilityDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminDeleteWorkflowResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminDeleteWorkflowResponse struct could not be generated from the wire
// representation.
func (v *AdminDeleteWorkflowResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.HistoryDeleted = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.ExecutionsDeleted = &x
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.VisibilityDeleted = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminDeleteWorkflowResponse
// struct.
func (v *AdminDeleteWorkflowResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.HistoryDeleted != nil {
		fields[i] = fmt.Sprintf("HistoryDeleted: %v", *(v.HistoryDeleted))
		i++
	}
	if v.ExecutionsDeleted != nil {
		fields[i] = fmt.Sprintf("ExecutionsDeleted: %v", *(v.ExecutionsDeleted))
		i++
	}
	if v.VisibilityDeleted != nil {
		fields[i] = fmt.Sprintf("VisibilityDeleted: %v", *(v.VisibilityDeleted))
		i++
	}

	return fmt.Sprintf("AdminDeleteWorkflowResponse{%v}", strings.Join(fields[:i], ", "))
}

func _Bool_EqualsPtr(lhs, rhs *bool) bool {
	if lhs != nil && rhs != nil {

		x := *lhs
		y := *rhs
		return (x == y)
	}
	return lhs == nil && rhs == nil
}

// Equals returns true if all the fields of this AdminDeleteWorkflowResponse match the
// provided AdminDeleteWorkflowResponse.
//
// This function performs a deep comparison.
func (v *AdminDeleteWorkflowResponse) Equals(rhs *AdminDeleteWorkflowResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_Bool_EqualsPtr(v.HistoryDeleted, rhs.HistoryDeleted) {
		return false
	}
	if !_Bool_EqualsPtr(v.ExecutionsDeleted, rhs.ExecutionsDeleted) {
		return false
	}
	if !_Bool_EqualsPtr(v.VisibilityDeleted, rhs.VisibilityDeleted) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminDeleteWorkflowResponse.
func (v *AdminDeleteWorkflowResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.HistoryDeleted != nil {
		enc.AddBool("historyDeleted", *v.HistoryDeleted)
	}
	if v.ExecutionsDeleted != nil {
		enc.AddBool("executionsDeleted", *v.ExecutionsDeleted)
	}
	if v.VisibilityDeleted != nil {
		enc.AddBool("visibilityDeleted", *v.VisibilityDeleted)
	}
	return err
}

// GetHistoryDeleted returns the value of HistoryDeleted if it is set or its
// zero value if it is unset.
func (v *AdminDeleteWorkflowResponse) GetHistoryDeleted() (o bool) {
	if v != nil && v.HistoryDeleted != nil {
		return *v.HistoryDeleted
	}

	return
}

// IsSetHistoryDeleted returns true if HistoryDeleted is not nil.
func (v *AdminDeleteWorkflowResponse) IsSetHistoryDeleted() bool {
	return v != nil && v.HistoryDeleted != nil
}

// GetExecutionsDeleted returns the value of ExecutionsDeleted if it is set or its
// zero value if it is unset.
func (v *AdminDeleteWorkflowResponse) GetExecutionsDeleted() (o bool) {
	if v != nil && v.ExecutionsDeleted != nil {
		return *v.ExecutionsDeleted
	}

	return
}

// IsSetExecutionsDeleted returns true if ExecutionsDeleted is not nil.
func (v *AdminDeleteWorkflowResponse) IsSetExecutionsDeleted() bool {
	return v != nil && v.ExecutionsDeleted != nil
}

// GetVisibilityDeleted returns the value of VisibilityDeleted if it is set or its
// zero value if it is unset.
func (v *AdminDeleteWorkflowResponse) GetVisibilityDeleted() (o bool) {
	if v != nil && v.VisibilityDeleted != nil {
		return *v.VisibilityDeleted
	}

	return
}

// IsSetVisibilityDeleted returns true if VisibilityDeleted is not nil.
func (v *AdminDeleteWorkflowResponse) IsSetVisibilityDeleted() bool {
	return v != nil && v.VisibilityDeleted != nil
}

type AdminMaintainWorkflowRequest struct {
	Domain    *string                   `json:"domain,omitempty"`
	Execution *shared.WorkflowExecution `json:"execution,omitempty"`
}

// ToWire translates a AdminMaintainWorkflowRequest 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 *AdminMaintainWorkflowRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Execution != nil {
		w, err = v.Execution.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminMaintainWorkflowRequest 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 AdminMaintainWorkflowRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminMaintainWorkflowRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminMaintainWorkflowRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.Execution, err = _WorkflowExecution_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminMaintainWorkflowRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminMaintainWorkflowRequest struct could not be encoded.
func (v *AdminMaintainWorkflowRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Execution != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Execution.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminMaintainWorkflowRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminMaintainWorkflowRequest struct could not be generated from the wire
// representation.
func (v *AdminMaintainWorkflowRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.Execution, err = _WorkflowExecution_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminMaintainWorkflowRequest
// struct.
func (v *AdminMaintainWorkflowRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.Execution != nil {
		fields[i] = fmt.Sprintf("Execution: %v", v.Execution)
		i++
	}

	return fmt.Sprintf("AdminMaintainWorkflowRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminMaintainWorkflowRequest match the
// provided AdminMaintainWorkflowRequest.
//
// This function performs a deep comparison.
func (v *AdminMaintainWorkflowRequest) Equals(rhs *AdminMaintainWorkflowRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.Execution == nil && rhs.Execution == nil) || (v.Execution != nil && rhs.Execution != nil && v.Execution.Equals(rhs.Execution))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminMaintainWorkflowRequest.
func (v *AdminMaintainWorkflowRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.Execution != nil {
		err = multierr.Append(err, enc.AddObject("execution", v.Execution))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *AdminMaintainWorkflowRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *AdminMaintainWorkflowRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetExecution returns the value of Execution if it is set or its
// zero value if it is unset.
func (v *AdminMaintainWorkflowRequest) GetExecution() (o *shared.WorkflowExecution) {
	if v != nil && v.Execution != nil {
		return v.Execution
	}

	return
}

// IsSetExecution returns true if Execution is not nil.
func (v *AdminMaintainWorkflowRequest) IsSetExecution() bool {
	return v != nil && v.Execution != nil
}

type AdminMaintainWorkflowResponse struct {
	HistoryDeleted    *bool `json:"historyDeleted,omitempty"`
	ExecutionsDeleted *bool `json:"executionsDeleted,omitempty"`
	VisibilityDeleted *bool `json:"visibilityDeleted,omitempty"`
}

// ToWire translates a AdminMaintainWorkflowResponse 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 *AdminMaintainWorkflowResponse) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.HistoryDeleted != nil {
		w, err = wire.NewValueBool(*(v.HistoryDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.ExecutionsDeleted != nil {
		w, err = wire.NewValueBool(*(v.ExecutionsDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.VisibilityDeleted != nil {
		w, err = wire.NewValueBool(*(v.VisibilityDeleted)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminMaintainWorkflowResponse 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 AdminMaintainWorkflowResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminMaintainWorkflowResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminMaintainWorkflowResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.HistoryDeleted = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.ExecutionsDeleted = &x
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.VisibilityDeleted = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminMaintainWorkflowResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminMaintainWorkflowResponse struct could not be encoded.
func (v *AdminMaintainWorkflowResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.HistoryDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.HistoryDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ExecutionsDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.ExecutionsDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.VisibilityDeleted != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.VisibilityDeleted)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminMaintainWorkflowResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminMaintainWorkflowResponse struct could not be generated from the wire
// representation.
func (v *AdminMaintainWorkflowResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.HistoryDeleted = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.ExecutionsDeleted = &x
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.VisibilityDeleted = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminMaintainWorkflowResponse
// struct.
func (v *AdminMaintainWorkflowResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.HistoryDeleted != nil {
		fields[i] = fmt.Sprintf("HistoryDeleted: %v", *(v.HistoryDeleted))
		i++
	}
	if v.ExecutionsDeleted != nil {
		fields[i] = fmt.Sprintf("ExecutionsDeleted: %v", *(v.ExecutionsDeleted))
		i++
	}
	if v.VisibilityDeleted != nil {
		fields[i] = fmt.Sprintf("VisibilityDeleted: %v", *(v.VisibilityDeleted))
		i++
	}

	return fmt.Sprintf("AdminMaintainWorkflowResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminMaintainWorkflowResponse match the
// provided AdminMaintainWorkflowResponse.
//
// This function performs a deep comparison.
func (v *AdminMaintainWorkflowResponse) Equals(rhs *AdminMaintainWorkflowResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_Bool_EqualsPtr(v.HistoryDeleted, rhs.HistoryDeleted) {
		return false
	}
	if !_Bool_EqualsPtr(v.ExecutionsDeleted, rhs.ExecutionsDeleted) {
		return false
	}
	if !_Bool_EqualsPtr(v.VisibilityDeleted, rhs.VisibilityDeleted) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminMaintainWorkflowResponse.
func (v *AdminMaintainWorkflowResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.HistoryDeleted != nil {
		enc.AddBool("historyDeleted", *v.HistoryDeleted)
	}
	if v.ExecutionsDeleted != nil {
		enc.AddBool("executionsDeleted", *v.ExecutionsDeleted)
	}
	if v.VisibilityDeleted != nil {
		enc.AddBool("visibilityDeleted", *v.VisibilityDeleted)
	}
	return err
}

// GetHistoryDeleted returns the value of HistoryDeleted if it is set or its
// zero value if it is unset.
func (v *AdminMaintainWorkflowResponse) GetHistoryDeleted() (o bool) {
	if v != nil && v.HistoryDeleted != nil {
		return *v.HistoryDeleted
	}

	return
}

// IsSetHistoryDeleted returns true if HistoryDeleted is not nil.
func (v *AdminMaintainWorkflowResponse) IsSetHistoryDeleted() bool {
	return v != nil && v.HistoryDeleted != nil
}

// GetExecutionsDeleted returns the value of ExecutionsDeleted if it is set or its
// zero value if it is unset.
func (v *AdminMaintainWorkflowResponse) GetExecutionsDeleted() (o bool) {
	if v != nil && v.ExecutionsDeleted != nil {
		return *v.ExecutionsDeleted
	}

	return
}

// IsSetExecutionsDeleted returns true if ExecutionsDeleted is not nil.
func (v *AdminMaintainWorkflowResponse) IsSetExecutionsDeleted() bool {
	return v != nil && v.ExecutionsDeleted != nil
}

// GetVisibilityDeleted returns the value of VisibilityDeleted if it is set or its
// zero value if it is unset.
func (v *AdminMaintainWorkflowResponse) GetVisibilityDeleted() (o bool) {
	if v != nil && v.VisibilityDeleted != nil {
		return *v.VisibilityDeleted
	}

	return
}

// IsSetVisibilityDeleted returns true if VisibilityDeleted is not nil.
func (v *AdminMaintainWorkflowResponse) IsSetVisibilityDeleted() bool {
	return v != nil && v.VisibilityDeleted != nil
}

type DescribeClusterResponse struct {
	SupportedClientVersions *shared.SupportedClientVersions `json:"supportedClientVersions,omitempty"`
	MembershipInfo          *MembershipInfo                 `json:"membershipInfo,omitempty"`
	PersistenceInfo         map[string]*PersistenceInfo     `json:"persistenceInfo,omitempty"`
}

type _Map_String_PersistenceInfo_MapItemList map[string]*PersistenceInfo

func (m _Map_String_PersistenceInfo_MapItemList) ForEach(f func(wire.MapItem) error) error {
	for k, v := range m {
		if v == nil {
			return fmt.Errorf("invalid map 'map[string]*PersistenceInfo', key [%v]: value is nil", k)
		}
		kw, err := wire.NewValueString(k), error(nil)
		if err != nil {
			return err
		}

		vw, err := v.ToWire()
		if err != nil {
			return err
		}
		err = f(wire.MapItem{Key: kw, Value: vw})
		if err != nil {
			return err
		}
	}
	return nil
}

func (m _Map_String_PersistenceInfo_MapItemList) Size() int {
	return len(m)
}

func (_Map_String_PersistenceInfo_MapItemList) KeyType() wire.Type {
	return wire.TBinary
}

func (_Map_String_PersistenceInfo_MapItemList) ValueType() wire.Type {
	return wire.TStruct
}

func (_Map_String_PersistenceInfo_MapItemList) Close() {}

// ToWire translates a DescribeClusterResponse 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 *DescribeClusterResponse) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.SupportedClientVersions != nil {
		w, err = v.SupportedClientVersions.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.MembershipInfo != nil {
		w, err = v.MembershipInfo.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.PersistenceInfo != nil {
		w, err = wire.NewValueMap(_Map_String_PersistenceInfo_MapItemList(v.PersistenceInfo)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _SupportedClientVersions_Read(w wire.Value) (*shared.SupportedClientVersions, error) {
	var v shared.SupportedClientVersions
	err := v.FromWire(w)
	return &v, err
}

func _MembershipInfo_Read(w wire.Value) (*MembershipInfo, error) {
	var v MembershipInfo
	err := v.FromWire(w)
	return &v, err
}

func _PersistenceInfo_Read(w wire.Value) (*PersistenceInfo, error) {
	var v PersistenceInfo
	err := v.FromWire(w)
	return &v, err
}

func _Map_String_PersistenceInfo_Read(m wire.MapItemList) (map[string]*PersistenceInfo, error) {
	if m.KeyType() != wire.TBinary {
		return nil, nil
	}

	if m.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make(map[string]*PersistenceInfo, m.Size())
	err := m.ForEach(func(x wire.MapItem) error {
		k, err := x.Key.GetString(), error(nil)
		if err != nil {
			return err
		}

		v, err := _PersistenceInfo_Read(x.Value)
		if err != nil {
			return err
		}

		o[k] = v
		return nil
	})
	m.Close()
	return o, err
}

// FromWire deserializes a DescribeClusterResponse 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 DescribeClusterResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v DescribeClusterResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *DescribeClusterResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.SupportedClientVersions, err = _SupportedClientVersions_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.MembershipInfo, err = _MembershipInfo_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TMap {
				v.PersistenceInfo, err = _Map_String_PersistenceInfo_Read(field.Value.GetMap())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _Map_String_PersistenceInfo_Encode(val map[string]*PersistenceInfo, sw stream.Writer) error {

	mh := stream.MapHeader{
		KeyType:   wire.TBinary,
		ValueType: wire.TStruct,
		Length:    len(val),
	}
	if err := sw.WriteMapBegin(mh); err != nil {
		return err
	}

	for k, v := range val {
		if v == nil {
			return fmt.Errorf("invalid map 'map[string]*PersistenceInfo', key [%v]: value is nil", k)
		}
		if err := sw.WriteString(k); err != nil {
			return err
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}

	return sw.WriteMapEnd()
}

// Encode serializes a DescribeClusterResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a DescribeClusterResponse struct could not be encoded.
func (v *DescribeClusterResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.SupportedClientVersions != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.SupportedClientVersions.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.MembershipInfo != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.MembershipInfo.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.PersistenceInfo != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TMap}); err != nil {
			return err
		}
		if err := _Map_String_PersistenceInfo_Encode(v.PersistenceInfo, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _SupportedClientVersions_Decode(sr stream.Reader) (*shared.SupportedClientVersions, error) {
	var v shared.SupportedClientVersions
	err := v.Decode(sr)
	return &v, err
}

func _MembershipInfo_Decode(sr stream.Reader) (*MembershipInfo, error) {
	var v MembershipInfo
	err := v.Decode(sr)
	return &v, err
}

func _PersistenceInfo_Decode(sr stream.Reader) (*PersistenceInfo, error) {
	var v PersistenceInfo
	err := v.Decode(sr)
	return &v, err
}

func _Map_String_PersistenceInfo_Decode(sr stream.Reader) (map[string]*PersistenceInfo, error) {
	mh, err := sr.ReadMapBegin()
	if err != nil {
		return nil, err
	}

	if mh.KeyType != wire.TBinary || mh.ValueType != wire.TStruct {
		for i := 0; i < mh.Length; i++ {
			if err := sr.Skip(mh.KeyType); err != nil {
				return nil, err
			}

			if err := sr.Skip(mh.ValueType); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadMapEnd()
	}

	o := make(map[string]*PersistenceInfo, mh.Length)
	for i := 0; i < mh.Length; i++ {
		k, err := sr.ReadString()
		if err != nil {
			return nil, err
		}

		v, err := _PersistenceInfo_Decode(sr)
		if err != nil {
			return nil, err
		}

		o[k] = v
	}

	if err = sr.ReadMapEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a DescribeClusterResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a DescribeClusterResponse struct could not be generated from the wire
// representation.
func (v *DescribeClusterResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.SupportedClientVersions, err = _SupportedClientVersions_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.MembershipInfo, err = _MembershipInfo_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TMap:
			v.PersistenceInfo, err = _Map_String_PersistenceInfo_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a DescribeClusterResponse
// struct.
func (v *DescribeClusterResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.SupportedClientVersions != nil {
		fields[i] = fmt.Sprintf("SupportedClientVersions: %v", v.SupportedClientVersions)
		i++
	}
	if v.MembershipInfo != nil {
		fields[i] = fmt.Sprintf("MembershipInfo: %v", v.MembershipInfo)
		i++
	}
	if v.PersistenceInfo != nil {
		fields[i] = fmt.Sprintf("PersistenceInfo: %v", v.PersistenceInfo)
		i++
	}

	return fmt.Sprintf("DescribeClusterResponse{%v}", strings.Join(fields[:i], ", "))
}

func _Map_String_PersistenceInfo_Equals(lhs, rhs map[string]*PersistenceInfo) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for lk, lv := range lhs {
		rv, ok := rhs[lk]
		if !ok {
			return false
		}
		if !lv.Equals(rv) {
			return false
		}
	}
	return true
}

// Equals returns true if all the fields of this DescribeClusterResponse match the
// provided DescribeClusterResponse.
//
// This function performs a deep comparison.
func (v *DescribeClusterResponse) Equals(rhs *DescribeClusterResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.SupportedClientVersions == nil && rhs.SupportedClientVersions == nil) || (v.SupportedClientVersions != nil && rhs.SupportedClientVersions != nil && v.SupportedClientVersions.Equals(rhs.SupportedClientVersions))) {
		return false
	}
	if !((v.MembershipInfo == nil && rhs.MembershipInfo == nil) || (v.MembershipInfo != nil && rhs.MembershipInfo != nil && v.MembershipInfo.Equals(rhs.MembershipInfo))) {
		return false
	}
	if !((v.PersistenceInfo == nil && rhs.PersistenceInfo == nil) || (v.PersistenceInfo != nil && rhs.PersistenceInfo != nil && _Map_String_PersistenceInfo_Equals(v.PersistenceInfo, rhs.PersistenceInfo))) {
		return false
	}

	return true
}

type _Map_String_PersistenceInfo_Zapper map[string]*PersistenceInfo

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of _Map_String_PersistenceInfo_Zapper.
func (m _Map_String_PersistenceInfo_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	for k, v := range m {
		err = multierr.Append(err, enc.AddObject((string)(k), v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of DescribeClusterResponse.
func (v *DescribeClusterResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.SupportedClientVersions != nil {
		err = multierr.Append(err, enc.AddObject("supportedClientVersions", v.SupportedClientVersions))
	}
	if v.MembershipInfo != nil {
		err = multierr.Append(err, enc.AddObject("membershipInfo", v.MembershipInfo))
	}
	if v.PersistenceInfo != nil {
		err = multierr.Append(err, enc.AddObject("persistenceInfo", (_Map_String_PersistenceInfo_Zapper)(v.PersistenceInfo)))
	}
	return err
}

// GetSupportedClientVersions returns the value of SupportedClientVersions if it is set or its
// zero value if it is unset.
func (v *DescribeClusterResponse) GetSupportedClientVersions() (o *shared.SupportedClientVersions) {
	if v != nil && v.SupportedClientVersions != nil {
		return v.SupportedClientVersions
	}

	return
}

// IsSetSupportedClientVersions returns true if SupportedClientVersions is not nil.
func (v *DescribeClusterResponse) IsSetSupportedClientVersions() bool {
	return v != nil && v.SupportedClientVersions != nil
}

// GetMembershipInfo returns the value of MembershipInfo if it is set or its
// zero value if it is unset.
func (v *DescribeClusterResponse) GetMembershipInfo() (o *MembershipInfo) {
	if v != nil && v.MembershipInfo != nil {
		return v.MembershipInfo
	}

	return
}

// IsSetMembershipInfo returns true if MembershipInfo is not nil.
func (v *DescribeClusterResponse) IsSetMembershipInfo() bool {
	return v != nil && v.MembershipInfo != nil
}

// GetPersistenceInfo returns the value of PersistenceInfo if it is set or its
// zero value if it is unset.
func (v *DescribeClusterResponse) GetPersistenceInfo() (o map[string]*PersistenceInfo) {
	if v != nil && v.PersistenceInfo != nil {
		return v.PersistenceInfo
	}

	return
}

// IsSetPersistenceInfo returns true if PersistenceInfo is not nil.
func (v *DescribeClusterResponse) IsSetPersistenceInfo() bool {
	return v != nil && v.PersistenceInfo != nil
}

type DescribeWorkflowExecutionRequest struct {
	Domain    *string                   `json:"domain,omitempty"`
	Execution *shared.WorkflowExecution `json:"execution,omitempty"`
}

// ToWire translates a DescribeWorkflowExecutionRequest 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 *DescribeWorkflowExecutionRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Execution != nil {
		w, err = v.Execution.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a DescribeWorkflowExecutionRequest 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 DescribeWorkflowExecutionRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v DescribeWorkflowExecutionRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *DescribeWorkflowExecutionRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.Execution, err = _WorkflowExecution_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a DescribeWorkflowExecutionRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a DescribeWorkflowExecutionRequest struct could not be encoded.
func (v *DescribeWorkflowExecutionRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Execution != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Execution.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a DescribeWorkflowExecutionRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a DescribeWorkflowExecutionRequest struct could not be generated from the wire
// representation.
func (v *DescribeWorkflowExecutionRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.Execution, err = _WorkflowExecution_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a DescribeWorkflowExecutionRequest
// struct.
func (v *DescribeWorkflowExecutionRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.Execution != nil {
		fields[i] = fmt.Sprintf("Execution: %v", v.Execution)
		i++
	}

	return fmt.Sprintf("DescribeWorkflowExecutionRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this DescribeWorkflowExecutionRequest match the
// provided DescribeWorkflowExecutionRequest.
//
// This function performs a deep comparison.
func (v *DescribeWorkflowExecutionRequest) Equals(rhs *DescribeWorkflowExecutionRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.Execution == nil && rhs.Execution == nil) || (v.Execution != nil && rhs.Execution != nil && v.Execution.Equals(rhs.Execution))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of DescribeWorkflowExecutionRequest.
func (v *DescribeWorkflowExecutionRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.Execution != nil {
		err = multierr.Append(err, enc.AddObject("execution", v.Execution))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *DescribeWorkflowExecutionRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetExecution returns the value of Execution if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionRequest) GetExecution() (o *shared.WorkflowExecution) {
	if v != nil && v.Execution != nil {
		return v.Execution
	}

	return
}

// IsSetExecution returns true if Execution is not nil.
func (v *DescribeWorkflowExecutionRequest) IsSetExecution() bool {
	return v != nil && v.Execution != nil
}

type DescribeWorkflowExecutionResponse struct {
	ShardId                *string `json:"shardId,omitempty"`
	HistoryAddr            *string `json:"historyAddr,omitempty"`
	MutableStateInCache    *string `json:"mutableStateInCache,omitempty"`
	MutableStateInDatabase *string `json:"mutableStateInDatabase,omitempty"`
}

// ToWire translates a DescribeWorkflowExecutionResponse 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 *DescribeWorkflowExecutionResponse) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ShardId != nil {
		w, err = wire.NewValueString(*(v.ShardId)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.HistoryAddr != nil {
		w, err = wire.NewValueString(*(v.HistoryAddr)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.MutableStateInCache != nil {
		w, err = wire.NewValueString(*(v.MutableStateInCache)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 40, Value: w}
		i++
	}
	if v.MutableStateInDatabase != nil {
		w, err = wire.NewValueString(*(v.MutableStateInDatabase)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 50, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a DescribeWorkflowExecutionResponse 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 DescribeWorkflowExecutionResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v DescribeWorkflowExecutionResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *DescribeWorkflowExecutionResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.ShardId = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.HistoryAddr = &x
				if err != nil {
					return err
				}

			}
		case 40:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.MutableStateInCache = &x
				if err != nil {
					return err
				}

			}
		case 50:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.MutableStateInDatabase = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a DescribeWorkflowExecutionResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a DescribeWorkflowExecutionResponse struct could not be encoded.
func (v *DescribeWorkflowExecutionResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ShardId != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.ShardId)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.HistoryAddr != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.HistoryAddr)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.MutableStateInCache != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.MutableStateInCache)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.MutableStateInDatabase != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 50, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.MutableStateInDatabase)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a DescribeWorkflowExecutionResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a DescribeWorkflowExecutionResponse struct could not be generated from the wire
// representation.
func (v *DescribeWorkflowExecutionResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.ShardId = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.HistoryAddr = &x
			if err != nil {
				return err
			}

		case fh.ID == 40 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.MutableStateInCache = &x
			if err != nil {
				return err
			}

		case fh.ID == 50 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.MutableStateInDatabase = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a DescribeWorkflowExecutionResponse
// struct.
func (v *DescribeWorkflowExecutionResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.ShardId != nil {
		fields[i] = fmt.Sprintf("ShardId: %v", *(v.ShardId))
		i++
	}
	if v.HistoryAddr != nil {
		fields[i] = fmt.Sprintf("HistoryAddr: %v", *(v.HistoryAddr))
		i++
	}
	if v.MutableStateInCache != nil {
		fields[i] = fmt.Sprintf("MutableStateInCache: %v", *(v.MutableStateInCache))
		i++
	}
	if v.MutableStateInDatabase != nil {
		fields[i] = fmt.Sprintf("MutableStateInDatabase: %v", *(v.MutableStateInDatabase))
		i++
	}

	return fmt.Sprintf("DescribeWorkflowExecutionResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this DescribeWorkflowExecutionResponse match the
// provided DescribeWorkflowExecutionResponse.
//
// This function performs a deep comparison.
func (v *DescribeWorkflowExecutionResponse) Equals(rhs *DescribeWorkflowExecutionResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.ShardId, rhs.ShardId) {
		return false
	}
	if !_String_EqualsPtr(v.HistoryAddr, rhs.HistoryAddr) {
		return false
	}
	if !_String_EqualsPtr(v.MutableStateInCache, rhs.MutableStateInCache) {
		return false
	}
	if !_String_EqualsPtr(v.MutableStateInDatabase, rhs.MutableStateInDatabase) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of DescribeWorkflowExecutionResponse.
func (v *DescribeWorkflowExecutionResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ShardId != nil {
		enc.AddString("shardId", *v.ShardId)
	}
	if v.HistoryAddr != nil {
		enc.AddString("historyAddr", *v.HistoryAddr)
	}
	if v.MutableStateInCache != nil {
		enc.AddString("mutableStateInCache", *v.MutableStateInCache)
	}
	if v.MutableStateInDatabase != nil {
		enc.AddString("mutableStateInDatabase", *v.MutableStateInDatabase)
	}
	return err
}

// GetShardId returns the value of ShardId if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionResponse) GetShardId() (o string) {
	if v != nil && v.ShardId != nil {
		return *v.ShardId
	}

	return
}

// IsSetShardId returns true if ShardId is not nil.
func (v *DescribeWorkflowExecutionResponse) IsSetShardId() bool {
	return v != nil && v.ShardId != nil
}

// GetHistoryAddr returns the value of HistoryAddr if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionResponse) GetHistoryAddr() (o string) {
	if v != nil && v.HistoryAddr != nil {
		return *v.HistoryAddr
	}

	return
}

// IsSetHistoryAddr returns true if HistoryAddr is not nil.
func (v *DescribeWorkflowExecutionResponse) IsSetHistoryAddr() bool {
	return v != nil && v.HistoryAddr != nil
}

// GetMutableStateInCache returns the value of MutableStateInCache if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionResponse) GetMutableStateInCache() (o string) {
	if v != nil && v.MutableStateInCache != nil {
		return *v.MutableStateInCache
	}

	return
}

// IsSetMutableStateInCache returns true if MutableStateInCache is not nil.
func (v *DescribeWorkflowExecutionResponse) IsSetMutableStateInCache() bool {
	return v != nil && v.MutableStateInCache != nil
}

// GetMutableStateInDatabase returns the value of MutableStateInDatabase if it is set or its
// zero value if it is unset.
func (v *DescribeWorkflowExecutionResponse) GetMutableStateInDatabase() (o string) {
	if v != nil && v.MutableStateInDatabase != nil {
		return *v.MutableStateInDatabase
	}

	return
}

// IsSetMutableStateInDatabase returns true if MutableStateInDatabase is not nil.
func (v *DescribeWorkflowExecutionResponse) IsSetMutableStateInDatabase() bool {
	return v != nil && v.MutableStateInDatabase != nil
}

type GetDomainAsyncWorkflowConfiguratonRequest struct {
	Domain *string `json:"domain,omitempty"`
}

// ToWire translates a GetDomainAsyncWorkflowConfiguratonRequest 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 *GetDomainAsyncWorkflowConfiguratonRequest) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a GetDomainAsyncWorkflowConfiguratonRequest 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 GetDomainAsyncWorkflowConfiguratonRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDomainAsyncWorkflowConfiguratonRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDomainAsyncWorkflowConfiguratonRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetDomainAsyncWorkflowConfiguratonRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDomainAsyncWorkflowConfiguratonRequest struct could not be encoded.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a GetDomainAsyncWorkflowConfiguratonRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDomainAsyncWorkflowConfiguratonRequest struct could not be generated from the wire
// representation.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDomainAsyncWorkflowConfiguratonRequest
// struct.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}

	return fmt.Sprintf("GetDomainAsyncWorkflowConfiguratonRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetDomainAsyncWorkflowConfiguratonRequest match the
// provided GetDomainAsyncWorkflowConfiguratonRequest.
//
// This function performs a deep comparison.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) Equals(rhs *GetDomainAsyncWorkflowConfiguratonRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDomainAsyncWorkflowConfiguratonRequest.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *GetDomainAsyncWorkflowConfiguratonRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

type GetDomainAsyncWorkflowConfiguratonResponse struct {
	Configuration *shared.AsyncWorkflowConfiguration `json:"configuration,omitempty"`
}

// ToWire translates a GetDomainAsyncWorkflowConfiguratonResponse 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 *GetDomainAsyncWorkflowConfiguratonResponse) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Configuration != nil {
		w, err = v.Configuration.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _AsyncWorkflowConfiguration_Read(w wire.Value) (*shared.AsyncWorkflowConfiguration, error) {
	var v shared.AsyncWorkflowConfiguration
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a GetDomainAsyncWorkflowConfiguratonResponse 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 GetDomainAsyncWorkflowConfiguratonResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDomainAsyncWorkflowConfiguratonResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDomainAsyncWorkflowConfiguratonResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.Configuration, err = _AsyncWorkflowConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetDomainAsyncWorkflowConfiguratonResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDomainAsyncWorkflowConfiguratonResponse struct could not be encoded.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Configuration != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Configuration.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _AsyncWorkflowConfiguration_Decode(sr stream.Reader) (*shared.AsyncWorkflowConfiguration, error) {
	var v shared.AsyncWorkflowConfiguration
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a GetDomainAsyncWorkflowConfiguratonResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDomainAsyncWorkflowConfiguratonResponse struct could not be generated from the wire
// representation.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.Configuration, err = _AsyncWorkflowConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDomainAsyncWorkflowConfiguratonResponse
// struct.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Configuration != nil {
		fields[i] = fmt.Sprintf("Configuration: %v", v.Configuration)
		i++
	}

	return fmt.Sprintf("GetDomainAsyncWorkflowConfiguratonResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetDomainAsyncWorkflowConfiguratonResponse match the
// provided GetDomainAsyncWorkflowConfiguratonResponse.
//
// This function performs a deep comparison.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) Equals(rhs *GetDomainAsyncWorkflowConfiguratonResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Configuration == nil && rhs.Configuration == nil) || (v.Configuration != nil && rhs.Configuration != nil && v.Configuration.Equals(rhs.Configuration))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDomainAsyncWorkflowConfiguratonResponse.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Configuration != nil {
		err = multierr.Append(err, enc.AddObject("configuration", v.Configuration))
	}
	return err
}

// GetConfiguration returns the value of Configuration if it is set or its
// zero value if it is unset.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) GetConfiguration() (o *shared.AsyncWorkflowConfiguration) {
	if v != nil && v.Configuration != nil {
		return v.Configuration
	}

	return
}

// IsSetConfiguration returns true if Configuration is not nil.
func (v *GetDomainAsyncWorkflowConfiguratonResponse) IsSetConfiguration() bool {
	return v != nil && v.Configuration != nil
}

type GetDomainIsolationGroupsRequest struct {
	Domain *string `json:"domain,omitempty"`
}

// ToWire translates a GetDomainIsolationGroupsRequest 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 *GetDomainIsolationGroupsRequest) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a GetDomainIsolationGroupsRequest 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 GetDomainIsolationGroupsRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDomainIsolationGroupsRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDomainIsolationGroupsRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetDomainIsolationGroupsRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDomainIsolationGroupsRequest struct could not be encoded.
func (v *GetDomainIsolationGroupsRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a GetDomainIsolationGroupsRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDomainIsolationGroupsRequest struct could not be generated from the wire
// representation.
func (v *GetDomainIsolationGroupsRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDomainIsolationGroupsRequest
// struct.
func (v *GetDomainIsolationGroupsRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}

	return fmt.Sprintf("GetDomainIsolationGroupsRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetDomainIsolationGroupsRequest match the
// provided GetDomainIsolationGroupsRequest.
//
// This function performs a deep comparison.
func (v *GetDomainIsolationGroupsRequest) Equals(rhs *GetDomainIsolationGroupsRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDomainIsolationGroupsRequest.
func (v *GetDomainIsolationGroupsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *GetDomainIsolationGroupsRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *GetDomainIsolationGroupsRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

type GetDomainIsolationGroupsResponse struct {
	IsolationGroups *shared.IsolationGroupConfiguration `json:"isolationGroups,omitempty"`
}

// ToWire translates a GetDomainIsolationGroupsResponse 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 *GetDomainIsolationGroupsResponse) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.IsolationGroups != nil {
		w, err = v.IsolationGroups.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _IsolationGroupConfiguration_Read(w wire.Value) (*shared.IsolationGroupConfiguration, error) {
	var v shared.IsolationGroupConfiguration
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a GetDomainIsolationGroupsResponse 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 GetDomainIsolationGroupsResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDomainIsolationGroupsResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDomainIsolationGroupsResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.IsolationGroups, err = _IsolationGroupConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetDomainIsolationGroupsResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDomainIsolationGroupsResponse struct could not be encoded.
func (v *GetDomainIsolationGroupsResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.IsolationGroups != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.IsolationGroups.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _IsolationGroupConfiguration_Decode(sr stream.Reader) (*shared.IsolationGroupConfiguration, error) {
	var v shared.IsolationGroupConfiguration
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a GetDomainIsolationGroupsResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDomainIsolationGroupsResponse struct could not be generated from the wire
// representation.
func (v *GetDomainIsolationGroupsResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.IsolationGroups, err = _IsolationGroupConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDomainIsolationGroupsResponse
// struct.
func (v *GetDomainIsolationGroupsResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.IsolationGroups != nil {
		fields[i] = fmt.Sprintf("IsolationGroups: %v", v.IsolationGroups)
		i++
	}

	return fmt.Sprintf("GetDomainIsolationGroupsResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetDomainIsolationGroupsResponse match the
// provided GetDomainIsolationGroupsResponse.
//
// This function performs a deep comparison.
func (v *GetDomainIsolationGroupsResponse) Equals(rhs *GetDomainIsolationGroupsResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.IsolationGroups == nil && rhs.IsolationGroups == nil) || (v.IsolationGroups != nil && rhs.IsolationGroups != nil && v.IsolationGroups.Equals(rhs.IsolationGroups))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDomainIsolationGroupsResponse.
func (v *GetDomainIsolationGroupsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.IsolationGroups != nil {
		err = multierr.Append(err, enc.AddObject("isolationGroups", v.IsolationGroups))
	}
	return err
}

// GetIsolationGroups returns the value of IsolationGroups if it is set or its
// zero value if it is unset.
func (v *GetDomainIsolationGroupsResponse) GetIsolationGroups() (o *shared.IsolationGroupConfiguration) {
	if v != nil && v.IsolationGroups != nil {
		return v.IsolationGroups
	}

	return
}

// IsSetIsolationGroups returns true if IsolationGroups is not nil.
func (v *GetDomainIsolationGroupsResponse) IsSetIsolationGroups() bool {
	return v != nil && v.IsolationGroups != nil
}

type GetDynamicConfigRequest struct {
	ConfigName *string                       `json:"configName,omitempty"`
	Filters    []*config.DynamicConfigFilter `json:"filters,omitempty"`
}

type _List_DynamicConfigFilter_ValueList []*config.DynamicConfigFilter

func (v _List_DynamicConfigFilter_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigFilter', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_DynamicConfigFilter_ValueList) Size() int {
	return len(v)
}

func (_List_DynamicConfigFilter_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_DynamicConfigFilter_ValueList) Close() {}

// ToWire translates a GetDynamicConfigRequest 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 *GetDynamicConfigRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ConfigName != nil {
		w, err = wire.NewValueString(*(v.ConfigName)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Filters != nil {
		w, err = wire.NewValueList(_List_DynamicConfigFilter_ValueList(v.Filters)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DynamicConfigFilter_Read(w wire.Value) (*config.DynamicConfigFilter, error) {
	var v config.DynamicConfigFilter
	err := v.FromWire(w)
	return &v, err
}

func _List_DynamicConfigFilter_Read(l wire.ValueList) ([]*config.DynamicConfigFilter, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*config.DynamicConfigFilter, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _DynamicConfigFilter_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a GetDynamicConfigRequest 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 GetDynamicConfigRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDynamicConfigRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDynamicConfigRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.ConfigName = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.Filters, err = _List_DynamicConfigFilter_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_DynamicConfigFilter_Encode(val []*config.DynamicConfigFilter, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigFilter', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a GetDynamicConfigRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDynamicConfigRequest struct could not be encoded.
func (v *GetDynamicConfigRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ConfigName != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.ConfigName)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_DynamicConfigFilter_Encode(v.Filters, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DynamicConfigFilter_Decode(sr stream.Reader) (*config.DynamicConfigFilter, error) {
	var v config.DynamicConfigFilter
	err := v.Decode(sr)
	return &v, err
}

func _List_DynamicConfigFilter_Decode(sr stream.Reader) ([]*config.DynamicConfigFilter, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*config.DynamicConfigFilter, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _DynamicConfigFilter_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a GetDynamicConfigRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDynamicConfigRequest struct could not be generated from the wire
// representation.
func (v *GetDynamicConfigRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.ConfigName = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.Filters, err = _List_DynamicConfigFilter_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDynamicConfigRequest
// struct.
func (v *GetDynamicConfigRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.ConfigName != nil {
		fields[i] = fmt.Sprintf("ConfigName: %v", *(v.ConfigName))
		i++
	}
	if v.Filters != nil {
		fields[i] = fmt.Sprintf("Filters: %v", v.Filters)
		i++
	}

	return fmt.Sprintf("GetDynamicConfigRequest{%v}", strings.Join(fields[:i], ", "))
}

func _List_DynamicConfigFilter_Equals(lhs, rhs []*config.DynamicConfigFilter) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this GetDynamicConfigRequest match the
// provided GetDynamicConfigRequest.
//
// This function performs a deep comparison.
func (v *GetDynamicConfigRequest) Equals(rhs *GetDynamicConfigRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.ConfigName, rhs.ConfigName) {
		return false
	}
	if !((v.Filters == nil && rhs.Filters == nil) || (v.Filters != nil && rhs.Filters != nil && _List_DynamicConfigFilter_Equals(v.Filters, rhs.Filters))) {
		return false
	}

	return true
}

type _List_DynamicConfigFilter_Zapper []*config.DynamicConfigFilter

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_DynamicConfigFilter_Zapper.
func (l _List_DynamicConfigFilter_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDynamicConfigRequest.
func (v *GetDynamicConfigRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ConfigName != nil {
		enc.AddString("configName", *v.ConfigName)
	}
	if v.Filters != nil {
		err = multierr.Append(err, enc.AddArray("filters", (_List_DynamicConfigFilter_Zapper)(v.Filters)))
	}
	return err
}

// GetConfigName returns the value of ConfigName if it is set or its
// zero value if it is unset.
func (v *GetDynamicConfigRequest) GetConfigName() (o string) {
	if v != nil && v.ConfigName != nil {
		return *v.ConfigName
	}

	return
}

// IsSetConfigName returns true if ConfigName is not nil.
func (v *GetDynamicConfigRequest) IsSetConfigName() bool {
	return v != nil && v.ConfigName != nil
}

// GetFilters returns the value of Filters if it is set or its
// zero value if it is unset.
func (v *GetDynamicConfigRequest) GetFilters() (o []*config.DynamicConfigFilter) {
	if v != nil && v.Filters != nil {
		return v.Filters
	}

	return
}

// IsSetFilters returns true if Filters is not nil.
func (v *GetDynamicConfigRequest) IsSetFilters() bool {
	return v != nil && v.Filters != nil
}

type GetDynamicConfigResponse struct {
	Value *shared.DataBlob `json:"value,omitempty"`
}

// ToWire translates a GetDynamicConfigResponse 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 *GetDynamicConfigResponse) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Value != nil {
		w, err = v.Value.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DataBlob_Read(w wire.Value) (*shared.DataBlob, error) {
	var v shared.DataBlob
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a GetDynamicConfigResponse 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 GetDynamicConfigResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetDynamicConfigResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetDynamicConfigResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.Value, err = _DataBlob_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetDynamicConfigResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetDynamicConfigResponse struct could not be encoded.
func (v *GetDynamicConfigResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Value != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Value.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DataBlob_Decode(sr stream.Reader) (*shared.DataBlob, error) {
	var v shared.DataBlob
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a GetDynamicConfigResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetDynamicConfigResponse struct could not be generated from the wire
// representation.
func (v *GetDynamicConfigResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.Value, err = _DataBlob_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetDynamicConfigResponse
// struct.
func (v *GetDynamicConfigResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Value != nil {
		fields[i] = fmt.Sprintf("Value: %v", v.Value)
		i++
	}

	return fmt.Sprintf("GetDynamicConfigResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetDynamicConfigResponse match the
// provided GetDynamicConfigResponse.
//
// This function performs a deep comparison.
func (v *GetDynamicConfigResponse) Equals(rhs *GetDynamicConfigResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Value == nil && rhs.Value == nil) || (v.Value != nil && rhs.Value != nil && v.Value.Equals(rhs.Value))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetDynamicConfigResponse.
func (v *GetDynamicConfigResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Value != nil {
		err = multierr.Append(err, enc.AddObject("value", v.Value))
	}
	return err
}

// GetValue returns the value of Value if it is set or its
// zero value if it is unset.
func (v *GetDynamicConfigResponse) GetValue() (o *shared.DataBlob) {
	if v != nil && v.Value != nil {
		return v.Value
	}

	return
}

// IsSetValue returns true if Value is not nil.
func (v *GetDynamicConfigResponse) IsSetValue() bool {
	return v != nil && v.Value != nil
}

type GetGlobalIsolationGroupsRequest struct {
}

// ToWire translates a GetGlobalIsolationGroupsRequest 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 *GetGlobalIsolationGroupsRequest) ToWire() (wire.Value, error) {
	var (
		fields [0]wire.Field
		i      int = 0
	)

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a GetGlobalIsolationGroupsRequest 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 GetGlobalIsolationGroupsRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetGlobalIsolationGroupsRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetGlobalIsolationGroupsRequest) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// Encode serializes a GetGlobalIsolationGroupsRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetGlobalIsolationGroupsRequest struct could not be encoded.
func (v *GetGlobalIsolationGroupsRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a GetGlobalIsolationGroupsRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetGlobalIsolationGroupsRequest struct could not be generated from the wire
// representation.
func (v *GetGlobalIsolationGroupsRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetGlobalIsolationGroupsRequest
// struct.
func (v *GetGlobalIsolationGroupsRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("GetGlobalIsolationGroupsRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetGlobalIsolationGroupsRequest match the
// provided GetGlobalIsolationGroupsRequest.
//
// This function performs a deep comparison.
func (v *GetGlobalIsolationGroupsRequest) Equals(rhs *GetGlobalIsolationGroupsRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetGlobalIsolationGroupsRequest.
func (v *GetGlobalIsolationGroupsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	return err
}

type GetGlobalIsolationGroupsResponse struct {
	IsolationGroups *shared.IsolationGroupConfiguration `json:"isolationGroups,omitempty"`
}

// ToWire translates a GetGlobalIsolationGroupsResponse 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 *GetGlobalIsolationGroupsResponse) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.IsolationGroups != nil {
		w, err = v.IsolationGroups.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a GetGlobalIsolationGroupsResponse 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 GetGlobalIsolationGroupsResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetGlobalIsolationGroupsResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetGlobalIsolationGroupsResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.IsolationGroups, err = _IsolationGroupConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetGlobalIsolationGroupsResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetGlobalIsolationGroupsResponse struct could not be encoded.
func (v *GetGlobalIsolationGroupsResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.IsolationGroups != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.IsolationGroups.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a GetGlobalIsolationGroupsResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetGlobalIsolationGroupsResponse struct could not be generated from the wire
// representation.
func (v *GetGlobalIsolationGroupsResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.IsolationGroups, err = _IsolationGroupConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetGlobalIsolationGroupsResponse
// struct.
func (v *GetGlobalIsolationGroupsResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.IsolationGroups != nil {
		fields[i] = fmt.Sprintf("IsolationGroups: %v", v.IsolationGroups)
		i++
	}

	return fmt.Sprintf("GetGlobalIsolationGroupsResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this GetGlobalIsolationGroupsResponse match the
// provided GetGlobalIsolationGroupsResponse.
//
// This function performs a deep comparison.
func (v *GetGlobalIsolationGroupsResponse) Equals(rhs *GetGlobalIsolationGroupsResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.IsolationGroups == nil && rhs.IsolationGroups == nil) || (v.IsolationGroups != nil && rhs.IsolationGroups != nil && v.IsolationGroups.Equals(rhs.IsolationGroups))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetGlobalIsolationGroupsResponse.
func (v *GetGlobalIsolationGroupsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.IsolationGroups != nil {
		err = multierr.Append(err, enc.AddObject("isolationGroups", v.IsolationGroups))
	}
	return err
}

// GetIsolationGroups returns the value of IsolationGroups if it is set or its
// zero value if it is unset.
func (v *GetGlobalIsolationGroupsResponse) GetIsolationGroups() (o *shared.IsolationGroupConfiguration) {
	if v != nil && v.IsolationGroups != nil {
		return v.IsolationGroups
	}

	return
}

// IsSetIsolationGroups returns true if IsolationGroups is not nil.
func (v *GetGlobalIsolationGroupsResponse) IsSetIsolationGroups() bool {
	return v != nil && v.IsolationGroups != nil
}

// StartEventId defines the beginning of the event to fetch. The first event is exclusive.
// EndEventId and EndEventVersion defines the end of the event to fetch. The end event is exclusive.
type GetWorkflowExecutionRawHistoryV2Request struct {
	Domain            *string                   `json:"domain,omitempty"`
	Execution         *shared.WorkflowExecution `json:"execution,omitempty"`
	StartEventId      *int64                    `json:"startEventId,omitempty"`
	StartEventVersion *int64                    `json:"startEventVersion,omitempty"`
	EndEventId        *int64                    `json:"endEventId,omitempty"`
	EndEventVersion   *int64                    `json:"endEventVersion,omitempty"`
	MaximumPageSize   *int32                    `json:"maximumPageSize,omitempty"`
	NextPageToken     []byte                    `json:"nextPageToken,omitempty"`
}

// ToWire translates a GetWorkflowExecutionRawHistoryV2Request 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 *GetWorkflowExecutionRawHistoryV2Request) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Execution != nil {
		w, err = v.Execution.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.StartEventId != nil {
		w, err = wire.NewValueI64(*(v.StartEventId)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}
	if v.StartEventVersion != nil {
		w, err = wire.NewValueI64(*(v.StartEventVersion)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 40, Value: w}
		i++
	}
	if v.EndEventId != nil {
		w, err = wire.NewValueI64(*(v.EndEventId)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 50, Value: w}
		i++
	}
	if v.EndEventVersion != nil {
		w, err = wire.NewValueI64(*(v.EndEventVersion)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 60, Value: w}
		i++
	}
	if v.MaximumPageSize != nil {
		w, err = wire.NewValueI32(*(v.MaximumPageSize)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 70, Value: w}
		i++
	}
	if v.NextPageToken != nil {
		w, err = wire.NewValueBinary(v.NextPageToken), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 80, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a GetWorkflowExecutionRawHistoryV2Request 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 GetWorkflowExecutionRawHistoryV2Request struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetWorkflowExecutionRawHistoryV2Request
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetWorkflowExecutionRawHistoryV2Request) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.Execution, err = _WorkflowExecution_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.StartEventId = &x
				if err != nil {
					return err
				}

			}
		case 40:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.StartEventVersion = &x
				if err != nil {
					return err
				}

			}
		case 50:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.EndEventId = &x
				if err != nil {
					return err
				}

			}
		case 60:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.EndEventVersion = &x
				if err != nil {
					return err
				}

			}
		case 70:
			if field.Value.Type() == wire.TI32 {
				var x int32
				x, err = field.Value.GetI32(), error(nil)
				v.MaximumPageSize = &x
				if err != nil {
					return err
				}

			}
		case 80:
			if field.Value.Type() == wire.TBinary {
				v.NextPageToken, err = field.Value.GetBinary(), error(nil)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a GetWorkflowExecutionRawHistoryV2Request struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetWorkflowExecutionRawHistoryV2Request struct could not be encoded.
func (v *GetWorkflowExecutionRawHistoryV2Request) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Execution != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Execution.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.StartEventId != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.StartEventId)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.StartEventVersion != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.StartEventVersion)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EndEventId != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 50, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.EndEventId)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EndEventVersion != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 60, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.EndEventVersion)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.MaximumPageSize != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 70, Type: wire.TI32}); err != nil {
			return err
		}
		if err := sw.WriteInt32(*(v.MaximumPageSize)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.NextPageToken != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 80, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteBinary(v.NextPageToken); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a GetWorkflowExecutionRawHistoryV2Request struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetWorkflowExecutionRawHistoryV2Request struct could not be generated from the wire
// representation.
func (v *GetWorkflowExecutionRawHistoryV2Request) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.Execution, err = _WorkflowExecution_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.StartEventId = &x
			if err != nil {
				return err
			}

		case fh.ID == 40 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.StartEventVersion = &x
			if err != nil {
				return err
			}

		case fh.ID == 50 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.EndEventId = &x
			if err != nil {
				return err
			}

		case fh.ID == 60 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.EndEventVersion = &x
			if err != nil {
				return err
			}

		case fh.ID == 70 && fh.Type == wire.TI32:
			var x int32
			x, err = sr.ReadInt32()
			v.MaximumPageSize = &x
			if err != nil {
				return err
			}

		case fh.ID == 80 && fh.Type == wire.TBinary:
			v.NextPageToken, err = sr.ReadBinary()
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetWorkflowExecutionRawHistoryV2Request
// struct.
func (v *GetWorkflowExecutionRawHistoryV2Request) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.Execution != nil {
		fields[i] = fmt.Sprintf("Execution: %v", v.Execution)
		i++
	}
	if v.StartEventId != nil {
		fields[i] = fmt.Sprintf("StartEventId: %v", *(v.StartEventId))
		i++
	}
	if v.StartEventVersion != nil {
		fields[i] = fmt.Sprintf("StartEventVersion: %v", *(v.StartEventVersion))
		i++
	}
	if v.EndEventId != nil {
		fields[i] = fmt.Sprintf("EndEventId: %v", *(v.EndEventId))
		i++
	}
	if v.EndEventVersion != nil {
		fields[i] = fmt.Sprintf("EndEventVersion: %v", *(v.EndEventVersion))
		i++
	}
	if v.MaximumPageSize != nil {
		fields[i] = fmt.Sprintf("MaximumPageSize: %v", *(v.MaximumPageSize))
		i++
	}
	if v.NextPageToken != nil {
		fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken)
		i++
	}

	return fmt.Sprintf("GetWorkflowExecutionRawHistoryV2Request{%v}", strings.Join(fields[:i], ", "))
}

func _I64_EqualsPtr(lhs, rhs *int64) bool {
	if lhs != nil && rhs != nil {

		x := *lhs
		y := *rhs
		return (x == y)
	}
	return lhs == nil && rhs == nil
}

func _I32_EqualsPtr(lhs, rhs *int32) bool {
	if lhs != nil && rhs != nil {

		x := *lhs
		y := *rhs
		return (x == y)
	}
	return lhs == nil && rhs == nil
}

// Equals returns true if all the fields of this GetWorkflowExecutionRawHistoryV2Request match the
// provided GetWorkflowExecutionRawHistoryV2Request.
//
// This function performs a deep comparison.
func (v *GetWorkflowExecutionRawHistoryV2Request) Equals(rhs *GetWorkflowExecutionRawHistoryV2Request) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.Execution == nil && rhs.Execution == nil) || (v.Execution != nil && rhs.Execution != nil && v.Execution.Equals(rhs.Execution))) {
		return false
	}
	if !_I64_EqualsPtr(v.StartEventId, rhs.StartEventId) {
		return false
	}
	if !_I64_EqualsPtr(v.StartEventVersion, rhs.StartEventVersion) {
		return false
	}
	if !_I64_EqualsPtr(v.EndEventId, rhs.EndEventId) {
		return false
	}
	if !_I64_EqualsPtr(v.EndEventVersion, rhs.EndEventVersion) {
		return false
	}
	if !_I32_EqualsPtr(v.MaximumPageSize, rhs.MaximumPageSize) {
		return false
	}
	if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetWorkflowExecutionRawHistoryV2Request.
func (v *GetWorkflowExecutionRawHistoryV2Request) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.Execution != nil {
		err = multierr.Append(err, enc.AddObject("execution", v.Execution))
	}
	if v.StartEventId != nil {
		enc.AddInt64("startEventId", *v.StartEventId)
	}
	if v.StartEventVersion != nil {
		enc.AddInt64("startEventVersion", *v.StartEventVersion)
	}
	if v.EndEventId != nil {
		enc.AddInt64("endEventId", *v.EndEventId)
	}
	if v.EndEventVersion != nil {
		enc.AddInt64("endEventVersion", *v.EndEventVersion)
	}
	if v.MaximumPageSize != nil {
		enc.AddInt32("maximumPageSize", *v.MaximumPageSize)
	}
	if v.NextPageToken != nil {
		enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetExecution returns the value of Execution if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetExecution() (o *shared.WorkflowExecution) {
	if v != nil && v.Execution != nil {
		return v.Execution
	}

	return
}

// IsSetExecution returns true if Execution is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetExecution() bool {
	return v != nil && v.Execution != nil
}

// GetStartEventId returns the value of StartEventId if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetStartEventId() (o int64) {
	if v != nil && v.StartEventId != nil {
		return *v.StartEventId
	}

	return
}

// IsSetStartEventId returns true if StartEventId is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetStartEventId() bool {
	return v != nil && v.StartEventId != nil
}

// GetStartEventVersion returns the value of StartEventVersion if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetStartEventVersion() (o int64) {
	if v != nil && v.StartEventVersion != nil {
		return *v.StartEventVersion
	}

	return
}

// IsSetStartEventVersion returns true if StartEventVersion is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetStartEventVersion() bool {
	return v != nil && v.StartEventVersion != nil
}

// GetEndEventId returns the value of EndEventId if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetEndEventId() (o int64) {
	if v != nil && v.EndEventId != nil {
		return *v.EndEventId
	}

	return
}

// IsSetEndEventId returns true if EndEventId is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetEndEventId() bool {
	return v != nil && v.EndEventId != nil
}

// GetEndEventVersion returns the value of EndEventVersion if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetEndEventVersion() (o int64) {
	if v != nil && v.EndEventVersion != nil {
		return *v.EndEventVersion
	}

	return
}

// IsSetEndEventVersion returns true if EndEventVersion is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetEndEventVersion() bool {
	return v != nil && v.EndEventVersion != nil
}

// GetMaximumPageSize returns the value of MaximumPageSize if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetMaximumPageSize() (o int32) {
	if v != nil && v.MaximumPageSize != nil {
		return *v.MaximumPageSize
	}

	return
}

// IsSetMaximumPageSize returns true if MaximumPageSize is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetMaximumPageSize() bool {
	return v != nil && v.MaximumPageSize != nil
}

// GetNextPageToken returns the value of NextPageToken if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Request) GetNextPageToken() (o []byte) {
	if v != nil && v.NextPageToken != nil {
		return v.NextPageToken
	}

	return
}

// IsSetNextPageToken returns true if NextPageToken is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Request) IsSetNextPageToken() bool {
	return v != nil && v.NextPageToken != nil
}

type GetWorkflowExecutionRawHistoryV2Response struct {
	NextPageToken  []byte                 `json:"nextPageToken,omitempty"`
	HistoryBatches []*shared.DataBlob     `json:"historyBatches,omitempty"`
	VersionHistory *shared.VersionHistory `json:"versionHistory,omitempty"`
}

type _List_DataBlob_ValueList []*shared.DataBlob

func (v _List_DataBlob_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*shared.DataBlob', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_DataBlob_ValueList) Size() int {
	return len(v)
}

func (_List_DataBlob_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_DataBlob_ValueList) Close() {}

// ToWire translates a GetWorkflowExecutionRawHistoryV2Response 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 *GetWorkflowExecutionRawHistoryV2Response) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.NextPageToken != nil {
		w, err = wire.NewValueBinary(v.NextPageToken), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.HistoryBatches != nil {
		w, err = wire.NewValueList(_List_DataBlob_ValueList(v.HistoryBatches)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.VersionHistory != nil {
		w, err = v.VersionHistory.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _List_DataBlob_Read(l wire.ValueList) ([]*shared.DataBlob, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*shared.DataBlob, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _DataBlob_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

func _VersionHistory_Read(w wire.Value) (*shared.VersionHistory, error) {
	var v shared.VersionHistory
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a GetWorkflowExecutionRawHistoryV2Response 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 GetWorkflowExecutionRawHistoryV2Response struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v GetWorkflowExecutionRawHistoryV2Response
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *GetWorkflowExecutionRawHistoryV2Response) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				v.NextPageToken, err = field.Value.GetBinary(), error(nil)
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.HistoryBatches, err = _List_DataBlob_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TStruct {
				v.VersionHistory, err = _VersionHistory_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_DataBlob_Encode(val []*shared.DataBlob, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*shared.DataBlob', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a GetWorkflowExecutionRawHistoryV2Response struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a GetWorkflowExecutionRawHistoryV2Response struct could not be encoded.
func (v *GetWorkflowExecutionRawHistoryV2Response) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.NextPageToken != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteBinary(v.NextPageToken); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.HistoryBatches != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_DataBlob_Encode(v.HistoryBatches, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.VersionHistory != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.VersionHistory.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _List_DataBlob_Decode(sr stream.Reader) ([]*shared.DataBlob, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*shared.DataBlob, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _DataBlob_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

func _VersionHistory_Decode(sr stream.Reader) (*shared.VersionHistory, error) {
	var v shared.VersionHistory
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a GetWorkflowExecutionRawHistoryV2Response struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a GetWorkflowExecutionRawHistoryV2Response struct could not be generated from the wire
// representation.
func (v *GetWorkflowExecutionRawHistoryV2Response) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			v.NextPageToken, err = sr.ReadBinary()
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.HistoryBatches, err = _List_DataBlob_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TStruct:
			v.VersionHistory, err = _VersionHistory_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a GetWorkflowExecutionRawHistoryV2Response
// struct.
func (v *GetWorkflowExecutionRawHistoryV2Response) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.NextPageToken != nil {
		fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken)
		i++
	}
	if v.HistoryBatches != nil {
		fields[i] = fmt.Sprintf("HistoryBatches: %v", v.HistoryBatches)
		i++
	}
	if v.VersionHistory != nil {
		fields[i] = fmt.Sprintf("VersionHistory: %v", v.VersionHistory)
		i++
	}

	return fmt.Sprintf("GetWorkflowExecutionRawHistoryV2Response{%v}", strings.Join(fields[:i], ", "))
}

func _List_DataBlob_Equals(lhs, rhs []*shared.DataBlob) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this GetWorkflowExecutionRawHistoryV2Response match the
// provided GetWorkflowExecutionRawHistoryV2Response.
//
// This function performs a deep comparison.
func (v *GetWorkflowExecutionRawHistoryV2Response) Equals(rhs *GetWorkflowExecutionRawHistoryV2Response) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) {
		return false
	}
	if !((v.HistoryBatches == nil && rhs.HistoryBatches == nil) || (v.HistoryBatches != nil && rhs.HistoryBatches != nil && _List_DataBlob_Equals(v.HistoryBatches, rhs.HistoryBatches))) {
		return false
	}
	if !((v.VersionHistory == nil && rhs.VersionHistory == nil) || (v.VersionHistory != nil && rhs.VersionHistory != nil && v.VersionHistory.Equals(rhs.VersionHistory))) {
		return false
	}

	return true
}

type _List_DataBlob_Zapper []*shared.DataBlob

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_DataBlob_Zapper.
func (l _List_DataBlob_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of GetWorkflowExecutionRawHistoryV2Response.
func (v *GetWorkflowExecutionRawHistoryV2Response) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.NextPageToken != nil {
		enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken))
	}
	if v.HistoryBatches != nil {
		err = multierr.Append(err, enc.AddArray("historyBatches", (_List_DataBlob_Zapper)(v.HistoryBatches)))
	}
	if v.VersionHistory != nil {
		err = multierr.Append(err, enc.AddObject("versionHistory", v.VersionHistory))
	}
	return err
}

// GetNextPageToken returns the value of NextPageToken if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Response) GetNextPageToken() (o []byte) {
	if v != nil && v.NextPageToken != nil {
		return v.NextPageToken
	}

	return
}

// IsSetNextPageToken returns true if NextPageToken is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Response) IsSetNextPageToken() bool {
	return v != nil && v.NextPageToken != nil
}

// GetHistoryBatches returns the value of HistoryBatches if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Response) GetHistoryBatches() (o []*shared.DataBlob) {
	if v != nil && v.HistoryBatches != nil {
		return v.HistoryBatches
	}

	return
}

// IsSetHistoryBatches returns true if HistoryBatches is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Response) IsSetHistoryBatches() bool {
	return v != nil && v.HistoryBatches != nil
}

// GetVersionHistory returns the value of VersionHistory if it is set or its
// zero value if it is unset.
func (v *GetWorkflowExecutionRawHistoryV2Response) GetVersionHistory() (o *shared.VersionHistory) {
	if v != nil && v.VersionHistory != nil {
		return v.VersionHistory
	}

	return
}

// IsSetVersionHistory returns true if VersionHistory is not nil.
func (v *GetWorkflowExecutionRawHistoryV2Response) IsSetVersionHistory() bool {
	return v != nil && v.VersionHistory != nil
}

type HostInfo struct {
	Identity *string `json:"Identity,omitempty"`
}

// ToWire translates a HostInfo 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 *HostInfo) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Identity != nil {
		w, err = wire.NewValueString(*(v.Identity)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a HostInfo 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 HostInfo struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v HostInfo
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *HostInfo) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Identity = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a HostInfo struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a HostInfo struct could not be encoded.
func (v *HostInfo) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Identity != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Identity)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a HostInfo struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a HostInfo struct could not be generated from the wire
// representation.
func (v *HostInfo) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Identity = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a HostInfo
// struct.
func (v *HostInfo) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Identity != nil {
		fields[i] = fmt.Sprintf("Identity: %v", *(v.Identity))
		i++
	}

	return fmt.Sprintf("HostInfo{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this HostInfo match the
// provided HostInfo.
//
// This function performs a deep comparison.
func (v *HostInfo) Equals(rhs *HostInfo) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Identity, rhs.Identity) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of HostInfo.
func (v *HostInfo) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Identity != nil {
		enc.AddString("Identity", *v.Identity)
	}
	return err
}

// GetIdentity returns the value of Identity if it is set or its
// zero value if it is unset.
func (v *HostInfo) GetIdentity() (o string) {
	if v != nil && v.Identity != nil {
		return *v.Identity
	}

	return
}

// IsSetIdentity returns true if Identity is not nil.
func (v *HostInfo) IsSetIdentity() bool {
	return v != nil && v.Identity != nil
}

type ListDynamicConfigRequest struct {
	ConfigName *string `json:"configName,omitempty"`
}

// ToWire translates a ListDynamicConfigRequest 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 *ListDynamicConfigRequest) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ConfigName != nil {
		w, err = wire.NewValueString(*(v.ConfigName)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a ListDynamicConfigRequest 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 ListDynamicConfigRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v ListDynamicConfigRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *ListDynamicConfigRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.ConfigName = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a ListDynamicConfigRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a ListDynamicConfigRequest struct could not be encoded.
func (v *ListDynamicConfigRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ConfigName != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.ConfigName)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a ListDynamicConfigRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a ListDynamicConfigRequest struct could not be generated from the wire
// representation.
func (v *ListDynamicConfigRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.ConfigName = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a ListDynamicConfigRequest
// struct.
func (v *ListDynamicConfigRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ConfigName != nil {
		fields[i] = fmt.Sprintf("ConfigName: %v", *(v.ConfigName))
		i++
	}

	return fmt.Sprintf("ListDynamicConfigRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this ListDynamicConfigRequest match the
// provided ListDynamicConfigRequest.
//
// This function performs a deep comparison.
func (v *ListDynamicConfigRequest) Equals(rhs *ListDynamicConfigRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.ConfigName, rhs.ConfigName) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of ListDynamicConfigRequest.
func (v *ListDynamicConfigRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ConfigName != nil {
		enc.AddString("configName", *v.ConfigName)
	}
	return err
}

// GetConfigName returns the value of ConfigName if it is set or its
// zero value if it is unset.
func (v *ListDynamicConfigRequest) GetConfigName() (o string) {
	if v != nil && v.ConfigName != nil {
		return *v.ConfigName
	}

	return
}

// IsSetConfigName returns true if ConfigName is not nil.
func (v *ListDynamicConfigRequest) IsSetConfigName() bool {
	return v != nil && v.ConfigName != nil
}

type ListDynamicConfigResponse struct {
	Entries []*config.DynamicConfigEntry `json:"entries,omitempty"`
}

type _List_DynamicConfigEntry_ValueList []*config.DynamicConfigEntry

func (v _List_DynamicConfigEntry_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigEntry', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_DynamicConfigEntry_ValueList) Size() int {
	return len(v)
}

func (_List_DynamicConfigEntry_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_DynamicConfigEntry_ValueList) Close() {}

// ToWire translates a ListDynamicConfigResponse 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 *ListDynamicConfigResponse) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Entries != nil {
		w, err = wire.NewValueList(_List_DynamicConfigEntry_ValueList(v.Entries)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DynamicConfigEntry_Read(w wire.Value) (*config.DynamicConfigEntry, error) {
	var v config.DynamicConfigEntry
	err := v.FromWire(w)
	return &v, err
}

func _List_DynamicConfigEntry_Read(l wire.ValueList) ([]*config.DynamicConfigEntry, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*config.DynamicConfigEntry, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _DynamicConfigEntry_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a ListDynamicConfigResponse 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 ListDynamicConfigResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v ListDynamicConfigResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *ListDynamicConfigResponse) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TList {
				v.Entries, err = _List_DynamicConfigEntry_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_DynamicConfigEntry_Encode(val []*config.DynamicConfigEntry, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigEntry', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a ListDynamicConfigResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a ListDynamicConfigResponse struct could not be encoded.
func (v *ListDynamicConfigResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Entries != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_DynamicConfigEntry_Encode(v.Entries, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DynamicConfigEntry_Decode(sr stream.Reader) (*config.DynamicConfigEntry, error) {
	var v config.DynamicConfigEntry
	err := v.Decode(sr)
	return &v, err
}

func _List_DynamicConfigEntry_Decode(sr stream.Reader) ([]*config.DynamicConfigEntry, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*config.DynamicConfigEntry, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _DynamicConfigEntry_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a ListDynamicConfigResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a ListDynamicConfigResponse struct could not be generated from the wire
// representation.
func (v *ListDynamicConfigResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TList:
			v.Entries, err = _List_DynamicConfigEntry_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a ListDynamicConfigResponse
// struct.
func (v *ListDynamicConfigResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Entries != nil {
		fields[i] = fmt.Sprintf("Entries: %v", v.Entries)
		i++
	}

	return fmt.Sprintf("ListDynamicConfigResponse{%v}", strings.Join(fields[:i], ", "))
}

func _List_DynamicConfigEntry_Equals(lhs, rhs []*config.DynamicConfigEntry) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this ListDynamicConfigResponse match the
// provided ListDynamicConfigResponse.
//
// This function performs a deep comparison.
func (v *ListDynamicConfigResponse) Equals(rhs *ListDynamicConfigResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Entries == nil && rhs.Entries == nil) || (v.Entries != nil && rhs.Entries != nil && _List_DynamicConfigEntry_Equals(v.Entries, rhs.Entries))) {
		return false
	}

	return true
}

type _List_DynamicConfigEntry_Zapper []*config.DynamicConfigEntry

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_DynamicConfigEntry_Zapper.
func (l _List_DynamicConfigEntry_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of ListDynamicConfigResponse.
func (v *ListDynamicConfigResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Entries != nil {
		err = multierr.Append(err, enc.AddArray("entries", (_List_DynamicConfigEntry_Zapper)(v.Entries)))
	}
	return err
}

// GetEntries returns the value of Entries if it is set or its
// zero value if it is unset.
func (v *ListDynamicConfigResponse) GetEntries() (o []*config.DynamicConfigEntry) {
	if v != nil && v.Entries != nil {
		return v.Entries
	}

	return
}

// IsSetEntries returns true if Entries is not nil.
func (v *ListDynamicConfigResponse) IsSetEntries() bool {
	return v != nil && v.Entries != nil
}

type MembershipInfo struct {
	CurrentHost      *HostInfo   `json:"currentHost,omitempty"`
	ReachableMembers []string    `json:"reachableMembers,omitempty"`
	Rings            []*RingInfo `json:"rings,omitempty"`
}

type _List_String_ValueList []string

func (v _List_String_ValueList) ForEach(f func(wire.Value) error) error {
	for _, x := range v {
		w, err := wire.NewValueString(x), error(nil)
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_String_ValueList) Size() int {
	return len(v)
}

func (_List_String_ValueList) ValueType() wire.Type {
	return wire.TBinary
}

func (_List_String_ValueList) Close() {}

type _List_RingInfo_ValueList []*RingInfo

func (v _List_RingInfo_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*RingInfo', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_RingInfo_ValueList) Size() int {
	return len(v)
}

func (_List_RingInfo_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_RingInfo_ValueList) Close() {}

// ToWire translates a MembershipInfo 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 *MembershipInfo) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CurrentHost != nil {
		w, err = v.CurrentHost.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.ReachableMembers != nil {
		w, err = wire.NewValueList(_List_String_ValueList(v.ReachableMembers)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.Rings != nil {
		w, err = wire.NewValueList(_List_RingInfo_ValueList(v.Rings)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _HostInfo_Read(w wire.Value) (*HostInfo, error) {
	var v HostInfo
	err := v.FromWire(w)
	return &v, err
}

func _List_String_Read(l wire.ValueList) ([]string, error) {
	if l.ValueType() != wire.TBinary {
		return nil, nil
	}

	o := make([]string, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := x.GetString(), error(nil)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

func _RingInfo_Read(w wire.Value) (*RingInfo, error) {
	var v RingInfo
	err := v.FromWire(w)
	return &v, err
}

func _List_RingInfo_Read(l wire.ValueList) ([]*RingInfo, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*RingInfo, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _RingInfo_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a MembershipInfo 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 MembershipInfo struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v MembershipInfo
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *MembershipInfo) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.CurrentHost, err = _HostInfo_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.ReachableMembers, err = _List_String_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TList {
				v.Rings, err = _List_RingInfo_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_String_Encode(val []string, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TBinary,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for _, v := range val {
		if err := sw.WriteString(v); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

func _List_RingInfo_Encode(val []*RingInfo, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*RingInfo', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a MembershipInfo struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a MembershipInfo struct could not be encoded.
func (v *MembershipInfo) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.CurrentHost != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.CurrentHost.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ReachableMembers != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_String_Encode(v.ReachableMembers, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Rings != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_RingInfo_Encode(v.Rings, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _HostInfo_Decode(sr stream.Reader) (*HostInfo, error) {
	var v HostInfo
	err := v.Decode(sr)
	return &v, err
}

func _List_String_Decode(sr stream.Reader) ([]string, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TBinary {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]string, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := sr.ReadString()
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

func _RingInfo_Decode(sr stream.Reader) (*RingInfo, error) {
	var v RingInfo
	err := v.Decode(sr)
	return &v, err
}

func _List_RingInfo_Decode(sr stream.Reader) ([]*RingInfo, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*RingInfo, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _RingInfo_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a MembershipInfo struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a MembershipInfo struct could not be generated from the wire
// representation.
func (v *MembershipInfo) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.CurrentHost, err = _HostInfo_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.ReachableMembers, err = _List_String_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TList:
			v.Rings, err = _List_RingInfo_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a MembershipInfo
// struct.
func (v *MembershipInfo) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.CurrentHost != nil {
		fields[i] = fmt.Sprintf("CurrentHost: %v", v.CurrentHost)
		i++
	}
	if v.ReachableMembers != nil {
		fields[i] = fmt.Sprintf("ReachableMembers: %v", v.ReachableMembers)
		i++
	}
	if v.Rings != nil {
		fields[i] = fmt.Sprintf("Rings: %v", v.Rings)
		i++
	}

	return fmt.Sprintf("MembershipInfo{%v}", strings.Join(fields[:i], ", "))
}

func _List_String_Equals(lhs, rhs []string) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !(lv == rv) {
			return false
		}
	}

	return true
}

func _List_RingInfo_Equals(lhs, rhs []*RingInfo) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this MembershipInfo match the
// provided MembershipInfo.
//
// This function performs a deep comparison.
func (v *MembershipInfo) Equals(rhs *MembershipInfo) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CurrentHost == nil && rhs.CurrentHost == nil) || (v.CurrentHost != nil && rhs.CurrentHost != nil && v.CurrentHost.Equals(rhs.CurrentHost))) {
		return false
	}
	if !((v.ReachableMembers == nil && rhs.ReachableMembers == nil) || (v.ReachableMembers != nil && rhs.ReachableMembers != nil && _List_String_Equals(v.ReachableMembers, rhs.ReachableMembers))) {
		return false
	}
	if !((v.Rings == nil && rhs.Rings == nil) || (v.Rings != nil && rhs.Rings != nil && _List_RingInfo_Equals(v.Rings, rhs.Rings))) {
		return false
	}

	return true
}

type _List_String_Zapper []string

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_String_Zapper.
func (l _List_String_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		enc.AppendString(v)
	}
	return err
}

type _List_RingInfo_Zapper []*RingInfo

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_RingInfo_Zapper.
func (l _List_RingInfo_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of MembershipInfo.
func (v *MembershipInfo) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CurrentHost != nil {
		err = multierr.Append(err, enc.AddObject("currentHost", v.CurrentHost))
	}
	if v.ReachableMembers != nil {
		err = multierr.Append(err, enc.AddArray("reachableMembers", (_List_String_Zapper)(v.ReachableMembers)))
	}
	if v.Rings != nil {
		err = multierr.Append(err, enc.AddArray("rings", (_List_RingInfo_Zapper)(v.Rings)))
	}
	return err
}

// GetCurrentHost returns the value of CurrentHost if it is set or its
// zero value if it is unset.
func (v *MembershipInfo) GetCurrentHost() (o *HostInfo) {
	if v != nil && v.CurrentHost != nil {
		return v.CurrentHost
	}

	return
}

// IsSetCurrentHost returns true if CurrentHost is not nil.
func (v *MembershipInfo) IsSetCurrentHost() bool {
	return v != nil && v.CurrentHost != nil
}

// GetReachableMembers returns the value of ReachableMembers if it is set or its
// zero value if it is unset.
func (v *MembershipInfo) GetReachableMembers() (o []string) {
	if v != nil && v.ReachableMembers != nil {
		return v.ReachableMembers
	}

	return
}

// IsSetReachableMembers returns true if ReachableMembers is not nil.
func (v *MembershipInfo) IsSetReachableMembers() bool {
	return v != nil && v.ReachableMembers != nil
}

// GetRings returns the value of Rings if it is set or its
// zero value if it is unset.
func (v *MembershipInfo) GetRings() (o []*RingInfo) {
	if v != nil && v.Rings != nil {
		return v.Rings
	}

	return
}

// IsSetRings returns true if Rings is not nil.
func (v *MembershipInfo) IsSetRings() bool {
	return v != nil && v.Rings != nil
}

type PersistenceFeature struct {
	Key     *string `json:"key,omitempty"`
	Enabled *bool   `json:"enabled,omitempty"`
}

// ToWire translates a PersistenceFeature 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 *PersistenceFeature) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Key != nil {
		w, err = wire.NewValueString(*(v.Key)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Enabled != nil {
		w, err = wire.NewValueBool(*(v.Enabled)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a PersistenceFeature 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 PersistenceFeature struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v PersistenceFeature
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *PersistenceFeature) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Key = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBool {
				var x bool
				x, err = field.Value.GetBool(), error(nil)
				v.Enabled = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a PersistenceFeature struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a PersistenceFeature struct could not be encoded.
func (v *PersistenceFeature) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Key != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Key)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Enabled != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBool}); err != nil {
			return err
		}
		if err := sw.WriteBool(*(v.Enabled)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a PersistenceFeature struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a PersistenceFeature struct could not be generated from the wire
// representation.
func (v *PersistenceFeature) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Key = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBool:
			var x bool
			x, err = sr.ReadBool()
			v.Enabled = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a PersistenceFeature
// struct.
func (v *PersistenceFeature) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Key != nil {
		fields[i] = fmt.Sprintf("Key: %v", *(v.Key))
		i++
	}
	if v.Enabled != nil {
		fields[i] = fmt.Sprintf("Enabled: %v", *(v.Enabled))
		i++
	}

	return fmt.Sprintf("PersistenceFeature{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this PersistenceFeature match the
// provided PersistenceFeature.
//
// This function performs a deep comparison.
func (v *PersistenceFeature) Equals(rhs *PersistenceFeature) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Key, rhs.Key) {
		return false
	}
	if !_Bool_EqualsPtr(v.Enabled, rhs.Enabled) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of PersistenceFeature.
func (v *PersistenceFeature) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Key != nil {
		enc.AddString("key", *v.Key)
	}
	if v.Enabled != nil {
		enc.AddBool("enabled", *v.Enabled)
	}
	return err
}

// GetKey returns the value of Key if it is set or its
// zero value if it is unset.
func (v *PersistenceFeature) GetKey() (o string) {
	if v != nil && v.Key != nil {
		return *v.Key
	}

	return
}

// IsSetKey returns true if Key is not nil.
func (v *PersistenceFeature) IsSetKey() bool {
	return v != nil && v.Key != nil
}

// GetEnabled returns the value of Enabled if it is set or its
// zero value if it is unset.
func (v *PersistenceFeature) GetEnabled() (o bool) {
	if v != nil && v.Enabled != nil {
		return *v.Enabled
	}

	return
}

// IsSetEnabled returns true if Enabled is not nil.
func (v *PersistenceFeature) IsSetEnabled() bool {
	return v != nil && v.Enabled != nil
}

type PersistenceInfo struct {
	Backend  *string               `json:"backend,omitempty"`
	Settings []*PersistenceSetting `json:"settings,omitempty"`
	Features []*PersistenceFeature `json:"features,omitempty"`
}

type _List_PersistenceSetting_ValueList []*PersistenceSetting

func (v _List_PersistenceSetting_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*PersistenceSetting', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_PersistenceSetting_ValueList) Size() int {
	return len(v)
}

func (_List_PersistenceSetting_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_PersistenceSetting_ValueList) Close() {}

type _List_PersistenceFeature_ValueList []*PersistenceFeature

func (v _List_PersistenceFeature_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*PersistenceFeature', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_PersistenceFeature_ValueList) Size() int {
	return len(v)
}

func (_List_PersistenceFeature_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_PersistenceFeature_ValueList) Close() {}

// ToWire translates a PersistenceInfo 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 *PersistenceInfo) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Backend != nil {
		w, err = wire.NewValueString(*(v.Backend)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Settings != nil {
		w, err = wire.NewValueList(_List_PersistenceSetting_ValueList(v.Settings)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.Features != nil {
		w, err = wire.NewValueList(_List_PersistenceFeature_ValueList(v.Features)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _PersistenceSetting_Read(w wire.Value) (*PersistenceSetting, error) {
	var v PersistenceSetting
	err := v.FromWire(w)
	return &v, err
}

func _List_PersistenceSetting_Read(l wire.ValueList) ([]*PersistenceSetting, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*PersistenceSetting, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _PersistenceSetting_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

func _PersistenceFeature_Read(w wire.Value) (*PersistenceFeature, error) {
	var v PersistenceFeature
	err := v.FromWire(w)
	return &v, err
}

func _List_PersistenceFeature_Read(l wire.ValueList) ([]*PersistenceFeature, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*PersistenceFeature, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _PersistenceFeature_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a PersistenceInfo 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 PersistenceInfo struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v PersistenceInfo
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *PersistenceInfo) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Backend = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.Settings, err = _List_PersistenceSetting_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TList {
				v.Features, err = _List_PersistenceFeature_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_PersistenceSetting_Encode(val []*PersistenceSetting, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*PersistenceSetting', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

func _List_PersistenceFeature_Encode(val []*PersistenceFeature, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*PersistenceFeature', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a PersistenceInfo struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a PersistenceInfo struct could not be encoded.
func (v *PersistenceInfo) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Backend != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Backend)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Settings != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_PersistenceSetting_Encode(v.Settings, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Features != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_PersistenceFeature_Encode(v.Features, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _PersistenceSetting_Decode(sr stream.Reader) (*PersistenceSetting, error) {
	var v PersistenceSetting
	err := v.Decode(sr)
	return &v, err
}

func _List_PersistenceSetting_Decode(sr stream.Reader) ([]*PersistenceSetting, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*PersistenceSetting, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _PersistenceSetting_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

func _PersistenceFeature_Decode(sr stream.Reader) (*PersistenceFeature, error) {
	var v PersistenceFeature
	err := v.Decode(sr)
	return &v, err
}

func _List_PersistenceFeature_Decode(sr stream.Reader) ([]*PersistenceFeature, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*PersistenceFeature, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _PersistenceFeature_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a PersistenceInfo struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a PersistenceInfo struct could not be generated from the wire
// representation.
func (v *PersistenceInfo) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Backend = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.Settings, err = _List_PersistenceSetting_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TList:
			v.Features, err = _List_PersistenceFeature_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a PersistenceInfo
// struct.
func (v *PersistenceInfo) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.Backend != nil {
		fields[i] = fmt.Sprintf("Backend: %v", *(v.Backend))
		i++
	}
	if v.Settings != nil {
		fields[i] = fmt.Sprintf("Settings: %v", v.Settings)
		i++
	}
	if v.Features != nil {
		fields[i] = fmt.Sprintf("Features: %v", v.Features)
		i++
	}

	return fmt.Sprintf("PersistenceInfo{%v}", strings.Join(fields[:i], ", "))
}

func _List_PersistenceSetting_Equals(lhs, rhs []*PersistenceSetting) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

func _List_PersistenceFeature_Equals(lhs, rhs []*PersistenceFeature) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this PersistenceInfo match the
// provided PersistenceInfo.
//
// This function performs a deep comparison.
func (v *PersistenceInfo) Equals(rhs *PersistenceInfo) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Backend, rhs.Backend) {
		return false
	}
	if !((v.Settings == nil && rhs.Settings == nil) || (v.Settings != nil && rhs.Settings != nil && _List_PersistenceSetting_Equals(v.Settings, rhs.Settings))) {
		return false
	}
	if !((v.Features == nil && rhs.Features == nil) || (v.Features != nil && rhs.Features != nil && _List_PersistenceFeature_Equals(v.Features, rhs.Features))) {
		return false
	}

	return true
}

type _List_PersistenceSetting_Zapper []*PersistenceSetting

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_PersistenceSetting_Zapper.
func (l _List_PersistenceSetting_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

type _List_PersistenceFeature_Zapper []*PersistenceFeature

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_PersistenceFeature_Zapper.
func (l _List_PersistenceFeature_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of PersistenceInfo.
func (v *PersistenceInfo) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Backend != nil {
		enc.AddString("backend", *v.Backend)
	}
	if v.Settings != nil {
		err = multierr.Append(err, enc.AddArray("settings", (_List_PersistenceSetting_Zapper)(v.Settings)))
	}
	if v.Features != nil {
		err = multierr.Append(err, enc.AddArray("features", (_List_PersistenceFeature_Zapper)(v.Features)))
	}
	return err
}

// GetBackend returns the value of Backend if it is set or its
// zero value if it is unset.
func (v *PersistenceInfo) GetBackend() (o string) {
	if v != nil && v.Backend != nil {
		return *v.Backend
	}

	return
}

// IsSetBackend returns true if Backend is not nil.
func (v *PersistenceInfo) IsSetBackend() bool {
	return v != nil && v.Backend != nil
}

// GetSettings returns the value of Settings if it is set or its
// zero value if it is unset.
func (v *PersistenceInfo) GetSettings() (o []*PersistenceSetting) {
	if v != nil && v.Settings != nil {
		return v.Settings
	}

	return
}

// IsSetSettings returns true if Settings is not nil.
func (v *PersistenceInfo) IsSetSettings() bool {
	return v != nil && v.Settings != nil
}

// GetFeatures returns the value of Features if it is set or its
// zero value if it is unset.
func (v *PersistenceInfo) GetFeatures() (o []*PersistenceFeature) {
	if v != nil && v.Features != nil {
		return v.Features
	}

	return
}

// IsSetFeatures returns true if Features is not nil.
func (v *PersistenceInfo) IsSetFeatures() bool {
	return v != nil && v.Features != nil
}

type PersistenceSetting struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
}

// ToWire translates a PersistenceSetting 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 *PersistenceSetting) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Key != nil {
		w, err = wire.NewValueString(*(v.Key)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Value != nil {
		w, err = wire.NewValueString(*(v.Value)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a PersistenceSetting 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 PersistenceSetting struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v PersistenceSetting
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *PersistenceSetting) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Key = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Value = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a PersistenceSetting struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a PersistenceSetting struct could not be encoded.
func (v *PersistenceSetting) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Key != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Key)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Value != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Value)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a PersistenceSetting struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a PersistenceSetting struct could not be generated from the wire
// representation.
func (v *PersistenceSetting) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Key = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Value = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a PersistenceSetting
// struct.
func (v *PersistenceSetting) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Key != nil {
		fields[i] = fmt.Sprintf("Key: %v", *(v.Key))
		i++
	}
	if v.Value != nil {
		fields[i] = fmt.Sprintf("Value: %v", *(v.Value))
		i++
	}

	return fmt.Sprintf("PersistenceSetting{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this PersistenceSetting match the
// provided PersistenceSetting.
//
// This function performs a deep comparison.
func (v *PersistenceSetting) Equals(rhs *PersistenceSetting) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Key, rhs.Key) {
		return false
	}
	if !_String_EqualsPtr(v.Value, rhs.Value) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of PersistenceSetting.
func (v *PersistenceSetting) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Key != nil {
		enc.AddString("key", *v.Key)
	}
	if v.Value != nil {
		enc.AddString("value", *v.Value)
	}
	return err
}

// GetKey returns the value of Key if it is set or its
// zero value if it is unset.
func (v *PersistenceSetting) GetKey() (o string) {
	if v != nil && v.Key != nil {
		return *v.Key
	}

	return
}

// IsSetKey returns true if Key is not nil.
func (v *PersistenceSetting) IsSetKey() bool {
	return v != nil && v.Key != nil
}

// GetValue returns the value of Value if it is set or its
// zero value if it is unset.
func (v *PersistenceSetting) GetValue() (o string) {
	if v != nil && v.Value != nil {
		return *v.Value
	}

	return
}

// IsSetValue returns true if Value is not nil.
func (v *PersistenceSetting) IsSetValue() bool {
	return v != nil && v.Value != nil
}

type ResendReplicationTasksRequest struct {
	DomainID      *string `json:"domainID,omitempty"`
	WorkflowID    *string `json:"workflowID,omitempty"`
	RunID         *string `json:"runID,omitempty"`
	RemoteCluster *string `json:"remoteCluster,omitempty"`
	StartEventID  *int64  `json:"startEventID,omitempty"`
	StartVersion  *int64  `json:"startVersion,omitempty"`
	EndEventID    *int64  `json:"endEventID,omitempty"`
	EndVersion    *int64  `json:"endVersion,omitempty"`
}

// ToWire translates a ResendReplicationTasksRequest 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 *ResendReplicationTasksRequest) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DomainID != nil {
		w, err = wire.NewValueString(*(v.DomainID)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.WorkflowID != nil {
		w, err = wire.NewValueString(*(v.WorkflowID)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.RunID != nil {
		w, err = wire.NewValueString(*(v.RunID)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}
	if v.RemoteCluster != nil {
		w, err = wire.NewValueString(*(v.RemoteCluster)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 40, Value: w}
		i++
	}
	if v.StartEventID != nil {
		w, err = wire.NewValueI64(*(v.StartEventID)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 50, Value: w}
		i++
	}
	if v.StartVersion != nil {
		w, err = wire.NewValueI64(*(v.StartVersion)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 60, Value: w}
		i++
	}
	if v.EndEventID != nil {
		w, err = wire.NewValueI64(*(v.EndEventID)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 70, Value: w}
		i++
	}
	if v.EndVersion != nil {
		w, err = wire.NewValueI64(*(v.EndVersion)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 80, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a ResendReplicationTasksRequest 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 ResendReplicationTasksRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v ResendReplicationTasksRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *ResendReplicationTasksRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.DomainID = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.WorkflowID = &x
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.RunID = &x
				if err != nil {
					return err
				}

			}
		case 40:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.RemoteCluster = &x
				if err != nil {
					return err
				}

			}
		case 50:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.StartEventID = &x
				if err != nil {
					return err
				}

			}
		case 60:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.StartVersion = &x
				if err != nil {
					return err
				}

			}
		case 70:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.EndEventID = &x
				if err != nil {
					return err
				}

			}
		case 80:
			if field.Value.Type() == wire.TI64 {
				var x int64
				x, err = field.Value.GetI64(), error(nil)
				v.EndVersion = &x
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a ResendReplicationTasksRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a ResendReplicationTasksRequest struct could not be encoded.
func (v *ResendReplicationTasksRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.DomainID != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.DomainID)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.WorkflowID != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.WorkflowID)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.RunID != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.RunID)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.RemoteCluster != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.RemoteCluster)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.StartEventID != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 50, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.StartEventID)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.StartVersion != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 60, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.StartVersion)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EndEventID != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 70, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.EndEventID)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EndVersion != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 80, Type: wire.TI64}); err != nil {
			return err
		}
		if err := sw.WriteInt64(*(v.EndVersion)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a ResendReplicationTasksRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a ResendReplicationTasksRequest struct could not be generated from the wire
// representation.
func (v *ResendReplicationTasksRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.DomainID = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.WorkflowID = &x
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.RunID = &x
			if err != nil {
				return err
			}

		case fh.ID == 40 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.RemoteCluster = &x
			if err != nil {
				return err
			}

		case fh.ID == 50 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.StartEventID = &x
			if err != nil {
				return err
			}

		case fh.ID == 60 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.StartVersion = &x
			if err != nil {
				return err
			}

		case fh.ID == 70 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.EndEventID = &x
			if err != nil {
				return err
			}

		case fh.ID == 80 && fh.Type == wire.TI64:
			var x int64
			x, err = sr.ReadInt64()
			v.EndVersion = &x
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a ResendReplicationTasksRequest
// struct.
func (v *ResendReplicationTasksRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.DomainID != nil {
		fields[i] = fmt.Sprintf("DomainID: %v", *(v.DomainID))
		i++
	}
	if v.WorkflowID != nil {
		fields[i] = fmt.Sprintf("WorkflowID: %v", *(v.WorkflowID))
		i++
	}
	if v.RunID != nil {
		fields[i] = fmt.Sprintf("RunID: %v", *(v.RunID))
		i++
	}
	if v.RemoteCluster != nil {
		fields[i] = fmt.Sprintf("RemoteCluster: %v", *(v.RemoteCluster))
		i++
	}
	if v.StartEventID != nil {
		fields[i] = fmt.Sprintf("StartEventID: %v", *(v.StartEventID))
		i++
	}
	if v.StartVersion != nil {
		fields[i] = fmt.Sprintf("StartVersion: %v", *(v.StartVersion))
		i++
	}
	if v.EndEventID != nil {
		fields[i] = fmt.Sprintf("EndEventID: %v", *(v.EndEventID))
		i++
	}
	if v.EndVersion != nil {
		fields[i] = fmt.Sprintf("EndVersion: %v", *(v.EndVersion))
		i++
	}

	return fmt.Sprintf("ResendReplicationTasksRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this ResendReplicationTasksRequest match the
// provided ResendReplicationTasksRequest.
//
// This function performs a deep comparison.
func (v *ResendReplicationTasksRequest) Equals(rhs *ResendReplicationTasksRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.DomainID, rhs.DomainID) {
		return false
	}
	if !_String_EqualsPtr(v.WorkflowID, rhs.WorkflowID) {
		return false
	}
	if !_String_EqualsPtr(v.RunID, rhs.RunID) {
		return false
	}
	if !_String_EqualsPtr(v.RemoteCluster, rhs.RemoteCluster) {
		return false
	}
	if !_I64_EqualsPtr(v.StartEventID, rhs.StartEventID) {
		return false
	}
	if !_I64_EqualsPtr(v.StartVersion, rhs.StartVersion) {
		return false
	}
	if !_I64_EqualsPtr(v.EndEventID, rhs.EndEventID) {
		return false
	}
	if !_I64_EqualsPtr(v.EndVersion, rhs.EndVersion) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of ResendReplicationTasksRequest.
func (v *ResendReplicationTasksRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DomainID != nil {
		enc.AddString("domainID", *v.DomainID)
	}
	if v.WorkflowID != nil {
		enc.AddString("workflowID", *v.WorkflowID)
	}
	if v.RunID != nil {
		enc.AddString("runID", *v.RunID)
	}
	if v.RemoteCluster != nil {
		enc.AddString("remoteCluster", *v.RemoteCluster)
	}
	if v.StartEventID != nil {
		enc.AddInt64("startEventID", *v.StartEventID)
	}
	if v.StartVersion != nil {
		enc.AddInt64("startVersion", *v.StartVersion)
	}
	if v.EndEventID != nil {
		enc.AddInt64("endEventID", *v.EndEventID)
	}
	if v.EndVersion != nil {
		enc.AddInt64("endVersion", *v.EndVersion)
	}
	return err
}

// GetDomainID returns the value of DomainID if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetDomainID() (o string) {
	if v != nil && v.DomainID != nil {
		return *v.DomainID
	}

	return
}

// IsSetDomainID returns true if DomainID is not nil.
func (v *ResendReplicationTasksRequest) IsSetDomainID() bool {
	return v != nil && v.DomainID != nil
}

// GetWorkflowID returns the value of WorkflowID if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetWorkflowID() (o string) {
	if v != nil && v.WorkflowID != nil {
		return *v.WorkflowID
	}

	return
}

// IsSetWorkflowID returns true if WorkflowID is not nil.
func (v *ResendReplicationTasksRequest) IsSetWorkflowID() bool {
	return v != nil && v.WorkflowID != nil
}

// GetRunID returns the value of RunID if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetRunID() (o string) {
	if v != nil && v.RunID != nil {
		return *v.RunID
	}

	return
}

// IsSetRunID returns true if RunID is not nil.
func (v *ResendReplicationTasksRequest) IsSetRunID() bool {
	return v != nil && v.RunID != nil
}

// GetRemoteCluster returns the value of RemoteCluster if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetRemoteCluster() (o string) {
	if v != nil && v.RemoteCluster != nil {
		return *v.RemoteCluster
	}

	return
}

// IsSetRemoteCluster returns true if RemoteCluster is not nil.
func (v *ResendReplicationTasksRequest) IsSetRemoteCluster() bool {
	return v != nil && v.RemoteCluster != nil
}

// GetStartEventID returns the value of StartEventID if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetStartEventID() (o int64) {
	if v != nil && v.StartEventID != nil {
		return *v.StartEventID
	}

	return
}

// IsSetStartEventID returns true if StartEventID is not nil.
func (v *ResendReplicationTasksRequest) IsSetStartEventID() bool {
	return v != nil && v.StartEventID != nil
}

// GetStartVersion returns the value of StartVersion if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetStartVersion() (o int64) {
	if v != nil && v.StartVersion != nil {
		return *v.StartVersion
	}

	return
}

// IsSetStartVersion returns true if StartVersion is not nil.
func (v *ResendReplicationTasksRequest) IsSetStartVersion() bool {
	return v != nil && v.StartVersion != nil
}

// GetEndEventID returns the value of EndEventID if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetEndEventID() (o int64) {
	if v != nil && v.EndEventID != nil {
		return *v.EndEventID
	}

	return
}

// IsSetEndEventID returns true if EndEventID is not nil.
func (v *ResendReplicationTasksRequest) IsSetEndEventID() bool {
	return v != nil && v.EndEventID != nil
}

// GetEndVersion returns the value of EndVersion if it is set or its
// zero value if it is unset.
func (v *ResendReplicationTasksRequest) GetEndVersion() (o int64) {
	if v != nil && v.EndVersion != nil {
		return *v.EndVersion
	}

	return
}

// IsSetEndVersion returns true if EndVersion is not nil.
func (v *ResendReplicationTasksRequest) IsSetEndVersion() bool {
	return v != nil && v.EndVersion != nil
}

type RestoreDynamicConfigRequest struct {
	ConfigName *string                       `json:"configName,omitempty"`
	Filters    []*config.DynamicConfigFilter `json:"filters,omitempty"`
}

// ToWire translates a RestoreDynamicConfigRequest 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 *RestoreDynamicConfigRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ConfigName != nil {
		w, err = wire.NewValueString(*(v.ConfigName)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Filters != nil {
		w, err = wire.NewValueList(_List_DynamicConfigFilter_ValueList(v.Filters)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a RestoreDynamicConfigRequest 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 RestoreDynamicConfigRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v RestoreDynamicConfigRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *RestoreDynamicConfigRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.ConfigName = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.Filters, err = _List_DynamicConfigFilter_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a RestoreDynamicConfigRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a RestoreDynamicConfigRequest struct could not be encoded.
func (v *RestoreDynamicConfigRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ConfigName != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.ConfigName)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Filters != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_DynamicConfigFilter_Encode(v.Filters, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a RestoreDynamicConfigRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a RestoreDynamicConfigRequest struct could not be generated from the wire
// representation.
func (v *RestoreDynamicConfigRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.ConfigName = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.Filters, err = _List_DynamicConfigFilter_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a RestoreDynamicConfigRequest
// struct.
func (v *RestoreDynamicConfigRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.ConfigName != nil {
		fields[i] = fmt.Sprintf("ConfigName: %v", *(v.ConfigName))
		i++
	}
	if v.Filters != nil {
		fields[i] = fmt.Sprintf("Filters: %v", v.Filters)
		i++
	}

	return fmt.Sprintf("RestoreDynamicConfigRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this RestoreDynamicConfigRequest match the
// provided RestoreDynamicConfigRequest.
//
// This function performs a deep comparison.
func (v *RestoreDynamicConfigRequest) Equals(rhs *RestoreDynamicConfigRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.ConfigName, rhs.ConfigName) {
		return false
	}
	if !((v.Filters == nil && rhs.Filters == nil) || (v.Filters != nil && rhs.Filters != nil && _List_DynamicConfigFilter_Equals(v.Filters, rhs.Filters))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of RestoreDynamicConfigRequest.
func (v *RestoreDynamicConfigRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ConfigName != nil {
		enc.AddString("configName", *v.ConfigName)
	}
	if v.Filters != nil {
		err = multierr.Append(err, enc.AddArray("filters", (_List_DynamicConfigFilter_Zapper)(v.Filters)))
	}
	return err
}

// GetConfigName returns the value of ConfigName if it is set or its
// zero value if it is unset.
func (v *RestoreDynamicConfigRequest) GetConfigName() (o string) {
	if v != nil && v.ConfigName != nil {
		return *v.ConfigName
	}

	return
}

// IsSetConfigName returns true if ConfigName is not nil.
func (v *RestoreDynamicConfigRequest) IsSetConfigName() bool {
	return v != nil && v.ConfigName != nil
}

// GetFilters returns the value of Filters if it is set or its
// zero value if it is unset.
func (v *RestoreDynamicConfigRequest) GetFilters() (o []*config.DynamicConfigFilter) {
	if v != nil && v.Filters != nil {
		return v.Filters
	}

	return
}

// IsSetFilters returns true if Filters is not nil.
func (v *RestoreDynamicConfigRequest) IsSetFilters() bool {
	return v != nil && v.Filters != nil
}

type RingInfo struct {
	Role        *string     `json:"role,omitempty"`
	MemberCount *int32      `json:"memberCount,omitempty"`
	Members     []*HostInfo `json:"members,omitempty"`
}

type _List_HostInfo_ValueList []*HostInfo

func (v _List_HostInfo_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*HostInfo', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_HostInfo_ValueList) Size() int {
	return len(v)
}

func (_List_HostInfo_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_HostInfo_ValueList) Close() {}

// ToWire translates a RingInfo 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 *RingInfo) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Role != nil {
		w, err = wire.NewValueString(*(v.Role)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.MemberCount != nil {
		w, err = wire.NewValueI32(*(v.MemberCount)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	if v.Members != nil {
		w, err = wire.NewValueList(_List_HostInfo_ValueList(v.Members)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 30, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _List_HostInfo_Read(l wire.ValueList) ([]*HostInfo, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*HostInfo, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _HostInfo_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a RingInfo 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 RingInfo struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v RingInfo
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *RingInfo) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Role = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TI32 {
				var x int32
				x, err = field.Value.GetI32(), error(nil)
				v.MemberCount = &x
				if err != nil {
					return err
				}

			}
		case 30:
			if field.Value.Type() == wire.TList {
				v.Members, err = _List_HostInfo_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_HostInfo_Encode(val []*HostInfo, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*HostInfo', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a RingInfo struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a RingInfo struct could not be encoded.
func (v *RingInfo) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Role != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Role)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.MemberCount != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI32}); err != nil {
			return err
		}
		if err := sw.WriteInt32(*(v.MemberCount)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Members != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_HostInfo_Encode(v.Members, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _List_HostInfo_Decode(sr stream.Reader) ([]*HostInfo, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*HostInfo, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _HostInfo_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a RingInfo struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a RingInfo struct could not be generated from the wire
// representation.
func (v *RingInfo) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Role = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TI32:
			var x int32
			x, err = sr.ReadInt32()
			v.MemberCount = &x
			if err != nil {
				return err
			}

		case fh.ID == 30 && fh.Type == wire.TList:
			v.Members, err = _List_HostInfo_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a RingInfo
// struct.
func (v *RingInfo) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.Role != nil {
		fields[i] = fmt.Sprintf("Role: %v", *(v.Role))
		i++
	}
	if v.MemberCount != nil {
		fields[i] = fmt.Sprintf("MemberCount: %v", *(v.MemberCount))
		i++
	}
	if v.Members != nil {
		fields[i] = fmt.Sprintf("Members: %v", v.Members)
		i++
	}

	return fmt.Sprintf("RingInfo{%v}", strings.Join(fields[:i], ", "))
}

func _List_HostInfo_Equals(lhs, rhs []*HostInfo) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this RingInfo match the
// provided RingInfo.
//
// This function performs a deep comparison.
func (v *RingInfo) Equals(rhs *RingInfo) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Role, rhs.Role) {
		return false
	}
	if !_I32_EqualsPtr(v.MemberCount, rhs.MemberCount) {
		return false
	}
	if !((v.Members == nil && rhs.Members == nil) || (v.Members != nil && rhs.Members != nil && _List_HostInfo_Equals(v.Members, rhs.Members))) {
		return false
	}

	return true
}

type _List_HostInfo_Zapper []*HostInfo

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_HostInfo_Zapper.
func (l _List_HostInfo_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of RingInfo.
func (v *RingInfo) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Role != nil {
		enc.AddString("role", *v.Role)
	}
	if v.MemberCount != nil {
		enc.AddInt32("memberCount", *v.MemberCount)
	}
	if v.Members != nil {
		err = multierr.Append(err, enc.AddArray("members", (_List_HostInfo_Zapper)(v.Members)))
	}
	return err
}

// GetRole returns the value of Role if it is set or its
// zero value if it is unset.
func (v *RingInfo) GetRole() (o string) {
	if v != nil && v.Role != nil {
		return *v.Role
	}

	return
}

// IsSetRole returns true if Role is not nil.
func (v *RingInfo) IsSetRole() bool {
	return v != nil && v.Role != nil
}

// GetMemberCount returns the value of MemberCount if it is set or its
// zero value if it is unset.
func (v *RingInfo) GetMemberCount() (o int32) {
	if v != nil && v.MemberCount != nil {
		return *v.MemberCount
	}

	return
}

// IsSetMemberCount returns true if MemberCount is not nil.
func (v *RingInfo) IsSetMemberCount() bool {
	return v != nil && v.MemberCount != nil
}

// GetMembers returns the value of Members if it is set or its
// zero value if it is unset.
func (v *RingInfo) GetMembers() (o []*HostInfo) {
	if v != nil && v.Members != nil {
		return v.Members
	}

	return
}

// IsSetMembers returns true if Members is not nil.
func (v *RingInfo) IsSetMembers() bool {
	return v != nil && v.Members != nil
}

type UpdateDomainAsyncWorkflowConfiguratonRequest struct {
	Domain        *string                            `json:"domain,omitempty"`
	Configuration *shared.AsyncWorkflowConfiguration `json:"configuration,omitempty"`
}

// ToWire translates a UpdateDomainAsyncWorkflowConfiguratonRequest 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 *UpdateDomainAsyncWorkflowConfiguratonRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.Configuration != nil {
		w, err = v.Configuration.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateDomainAsyncWorkflowConfiguratonRequest 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 UpdateDomainAsyncWorkflowConfiguratonRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateDomainAsyncWorkflowConfiguratonRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.Configuration, err = _AsyncWorkflowConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a UpdateDomainAsyncWorkflowConfiguratonRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateDomainAsyncWorkflowConfiguratonRequest struct could not be encoded.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.Configuration != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Configuration.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateDomainAsyncWorkflowConfiguratonRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateDomainAsyncWorkflowConfiguratonRequest struct could not be generated from the wire
// representation.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.Configuration, err = _AsyncWorkflowConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateDomainAsyncWorkflowConfiguratonRequest
// struct.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.Configuration != nil {
		fields[i] = fmt.Sprintf("Configuration: %v", v.Configuration)
		i++
	}

	return fmt.Sprintf("UpdateDomainAsyncWorkflowConfiguratonRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateDomainAsyncWorkflowConfiguratonRequest match the
// provided UpdateDomainAsyncWorkflowConfiguratonRequest.
//
// This function performs a deep comparison.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) Equals(rhs *UpdateDomainAsyncWorkflowConfiguratonRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.Configuration == nil && rhs.Configuration == nil) || (v.Configuration != nil && rhs.Configuration != nil && v.Configuration.Equals(rhs.Configuration))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateDomainAsyncWorkflowConfiguratonRequest.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.Configuration != nil {
		err = multierr.Append(err, enc.AddObject("configuration", v.Configuration))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetConfiguration returns the value of Configuration if it is set or its
// zero value if it is unset.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) GetConfiguration() (o *shared.AsyncWorkflowConfiguration) {
	if v != nil && v.Configuration != nil {
		return v.Configuration
	}

	return
}

// IsSetConfiguration returns true if Configuration is not nil.
func (v *UpdateDomainAsyncWorkflowConfiguratonRequest) IsSetConfiguration() bool {
	return v != nil && v.Configuration != nil
}

type UpdateDomainAsyncWorkflowConfiguratonResponse struct {
}

// ToWire translates a UpdateDomainAsyncWorkflowConfiguratonResponse 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 *UpdateDomainAsyncWorkflowConfiguratonResponse) ToWire() (wire.Value, error) {
	var (
		fields [0]wire.Field
		i      int = 0
	)

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateDomainAsyncWorkflowConfiguratonResponse 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 UpdateDomainAsyncWorkflowConfiguratonResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateDomainAsyncWorkflowConfiguratonResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// Encode serializes a UpdateDomainAsyncWorkflowConfiguratonResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateDomainAsyncWorkflowConfiguratonResponse struct could not be encoded.
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateDomainAsyncWorkflowConfiguratonResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateDomainAsyncWorkflowConfiguratonResponse struct could not be generated from the wire
// representation.
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateDomainAsyncWorkflowConfiguratonResponse
// struct.
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("UpdateDomainAsyncWorkflowConfiguratonResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateDomainAsyncWorkflowConfiguratonResponse match the
// provided UpdateDomainAsyncWorkflowConfiguratonResponse.
//
// This function performs a deep comparison.
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) Equals(rhs *UpdateDomainAsyncWorkflowConfiguratonResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateDomainAsyncWorkflowConfiguratonResponse.
func (v *UpdateDomainAsyncWorkflowConfiguratonResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	return err
}

type UpdateDomainIsolationGroupsRequest struct {
	Domain          *string                             `json:"domain,omitempty"`
	IsolationGroups *shared.IsolationGroupConfiguration `json:"isolationGroups,omitempty"`
}

// ToWire translates a UpdateDomainIsolationGroupsRequest 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 *UpdateDomainIsolationGroupsRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Domain != nil {
		w, err = wire.NewValueString(*(v.Domain)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.IsolationGroups != nil {
		w, err = v.IsolationGroups.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateDomainIsolationGroupsRequest 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 UpdateDomainIsolationGroupsRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateDomainIsolationGroupsRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateDomainIsolationGroupsRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.Domain = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TStruct {
				v.IsolationGroups, err = _IsolationGroupConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a UpdateDomainIsolationGroupsRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateDomainIsolationGroupsRequest struct could not be encoded.
func (v *UpdateDomainIsolationGroupsRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Domain != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.Domain)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.IsolationGroups != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.IsolationGroups.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateDomainIsolationGroupsRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateDomainIsolationGroupsRequest struct could not be generated from the wire
// representation.
func (v *UpdateDomainIsolationGroupsRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.Domain = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TStruct:
			v.IsolationGroups, err = _IsolationGroupConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateDomainIsolationGroupsRequest
// struct.
func (v *UpdateDomainIsolationGroupsRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Domain != nil {
		fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain))
		i++
	}
	if v.IsolationGroups != nil {
		fields[i] = fmt.Sprintf("IsolationGroups: %v", v.IsolationGroups)
		i++
	}

	return fmt.Sprintf("UpdateDomainIsolationGroupsRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateDomainIsolationGroupsRequest match the
// provided UpdateDomainIsolationGroupsRequest.
//
// This function performs a deep comparison.
func (v *UpdateDomainIsolationGroupsRequest) Equals(rhs *UpdateDomainIsolationGroupsRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.Domain, rhs.Domain) {
		return false
	}
	if !((v.IsolationGroups == nil && rhs.IsolationGroups == nil) || (v.IsolationGroups != nil && rhs.IsolationGroups != nil && v.IsolationGroups.Equals(rhs.IsolationGroups))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateDomainIsolationGroupsRequest.
func (v *UpdateDomainIsolationGroupsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Domain != nil {
		enc.AddString("domain", *v.Domain)
	}
	if v.IsolationGroups != nil {
		err = multierr.Append(err, enc.AddObject("isolationGroups", v.IsolationGroups))
	}
	return err
}

// GetDomain returns the value of Domain if it is set or its
// zero value if it is unset.
func (v *UpdateDomainIsolationGroupsRequest) GetDomain() (o string) {
	if v != nil && v.Domain != nil {
		return *v.Domain
	}

	return
}

// IsSetDomain returns true if Domain is not nil.
func (v *UpdateDomainIsolationGroupsRequest) IsSetDomain() bool {
	return v != nil && v.Domain != nil
}

// GetIsolationGroups returns the value of IsolationGroups if it is set or its
// zero value if it is unset.
func (v *UpdateDomainIsolationGroupsRequest) GetIsolationGroups() (o *shared.IsolationGroupConfiguration) {
	if v != nil && v.IsolationGroups != nil {
		return v.IsolationGroups
	}

	return
}

// IsSetIsolationGroups returns true if IsolationGroups is not nil.
func (v *UpdateDomainIsolationGroupsRequest) IsSetIsolationGroups() bool {
	return v != nil && v.IsolationGroups != nil
}

type UpdateDomainIsolationGroupsResponse struct {
}

// ToWire translates a UpdateDomainIsolationGroupsResponse 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 *UpdateDomainIsolationGroupsResponse) ToWire() (wire.Value, error) {
	var (
		fields [0]wire.Field
		i      int = 0
	)

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateDomainIsolationGroupsResponse 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 UpdateDomainIsolationGroupsResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateDomainIsolationGroupsResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateDomainIsolationGroupsResponse) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// Encode serializes a UpdateDomainIsolationGroupsResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateDomainIsolationGroupsResponse struct could not be encoded.
func (v *UpdateDomainIsolationGroupsResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateDomainIsolationGroupsResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateDomainIsolationGroupsResponse struct could not be generated from the wire
// representation.
func (v *UpdateDomainIsolationGroupsResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateDomainIsolationGroupsResponse
// struct.
func (v *UpdateDomainIsolationGroupsResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("UpdateDomainIsolationGroupsResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateDomainIsolationGroupsResponse match the
// provided UpdateDomainIsolationGroupsResponse.
//
// This function performs a deep comparison.
func (v *UpdateDomainIsolationGroupsResponse) Equals(rhs *UpdateDomainIsolationGroupsResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateDomainIsolationGroupsResponse.
func (v *UpdateDomainIsolationGroupsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	return err
}

type UpdateDynamicConfigRequest struct {
	ConfigName   *string                      `json:"configName,omitempty"`
	ConfigValues []*config.DynamicConfigValue `json:"configValues,omitempty"`
}

type _List_DynamicConfigValue_ValueList []*config.DynamicConfigValue

func (v _List_DynamicConfigValue_ValueList) ForEach(f func(wire.Value) error) error {
	for i, x := range v {
		if x == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigValue', index [%v]: value is nil", i)
		}
		w, err := x.ToWire()
		if err != nil {
			return err
		}
		err = f(w)
		if err != nil {
			return err
		}
	}
	return nil
}

func (v _List_DynamicConfigValue_ValueList) Size() int {
	return len(v)
}

func (_List_DynamicConfigValue_ValueList) ValueType() wire.Type {
	return wire.TStruct
}

func (_List_DynamicConfigValue_ValueList) Close() {}

// ToWire translates a UpdateDynamicConfigRequest 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 *UpdateDynamicConfigRequest) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ConfigName != nil {
		w, err = wire.NewValueString(*(v.ConfigName)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.ConfigValues != nil {
		w, err = wire.NewValueList(_List_DynamicConfigValue_ValueList(v.ConfigValues)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DynamicConfigValue_Read(w wire.Value) (*config.DynamicConfigValue, error) {
	var v config.DynamicConfigValue
	err := v.FromWire(w)
	return &v, err
}

func _List_DynamicConfigValue_Read(l wire.ValueList) ([]*config.DynamicConfigValue, error) {
	if l.ValueType() != wire.TStruct {
		return nil, nil
	}

	o := make([]*config.DynamicConfigValue, 0, l.Size())
	err := l.ForEach(func(x wire.Value) error {
		i, err := _DynamicConfigValue_Read(x)
		if err != nil {
			return err
		}
		o = append(o, i)
		return nil
	})
	l.Close()
	return o, err
}

// FromWire deserializes a UpdateDynamicConfigRequest 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 UpdateDynamicConfigRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateDynamicConfigRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateDynamicConfigRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TBinary {
				var x string
				x, err = field.Value.GetString(), error(nil)
				v.ConfigName = &x
				if err != nil {
					return err
				}

			}
		case 20:
			if field.Value.Type() == wire.TList {
				v.ConfigValues, err = _List_DynamicConfigValue_Read(field.Value.GetList())
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

func _List_DynamicConfigValue_Encode(val []*config.DynamicConfigValue, sw stream.Writer) error {

	lh := stream.ListHeader{
		Type:   wire.TStruct,
		Length: len(val),
	}
	if err := sw.WriteListBegin(lh); err != nil {
		return err
	}

	for i, v := range val {
		if v == nil {
			return fmt.Errorf("invalid list '[]*config.DynamicConfigValue', index [%v]: value is nil", i)
		}
		if err := v.Encode(sw); err != nil {
			return err
		}
	}
	return sw.WriteListEnd()
}

// Encode serializes a UpdateDynamicConfigRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateDynamicConfigRequest struct could not be encoded.
func (v *UpdateDynamicConfigRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ConfigName != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil {
			return err
		}
		if err := sw.WriteString(*(v.ConfigName)); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ConfigValues != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil {
			return err
		}
		if err := _List_DynamicConfigValue_Encode(v.ConfigValues, sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DynamicConfigValue_Decode(sr stream.Reader) (*config.DynamicConfigValue, error) {
	var v config.DynamicConfigValue
	err := v.Decode(sr)
	return &v, err
}

func _List_DynamicConfigValue_Decode(sr stream.Reader) ([]*config.DynamicConfigValue, error) {
	lh, err := sr.ReadListBegin()
	if err != nil {
		return nil, err
	}

	if lh.Type != wire.TStruct {
		for i := 0; i < lh.Length; i++ {
			if err := sr.Skip(lh.Type); err != nil {
				return nil, err
			}
		}
		return nil, sr.ReadListEnd()
	}

	o := make([]*config.DynamicConfigValue, 0, lh.Length)
	for i := 0; i < lh.Length; i++ {
		v, err := _DynamicConfigValue_Decode(sr)
		if err != nil {
			return nil, err
		}
		o = append(o, v)
	}

	if err = sr.ReadListEnd(); err != nil {
		return nil, err
	}
	return o, err
}

// Decode deserializes a UpdateDynamicConfigRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateDynamicConfigRequest struct could not be generated from the wire
// representation.
func (v *UpdateDynamicConfigRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TBinary:
			var x string
			x, err = sr.ReadString()
			v.ConfigName = &x
			if err != nil {
				return err
			}

		case fh.ID == 20 && fh.Type == wire.TList:
			v.ConfigValues, err = _List_DynamicConfigValue_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateDynamicConfigRequest
// struct.
func (v *UpdateDynamicConfigRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.ConfigName != nil {
		fields[i] = fmt.Sprintf("ConfigName: %v", *(v.ConfigName))
		i++
	}
	if v.ConfigValues != nil {
		fields[i] = fmt.Sprintf("ConfigValues: %v", v.ConfigValues)
		i++
	}

	return fmt.Sprintf("UpdateDynamicConfigRequest{%v}", strings.Join(fields[:i], ", "))
}

func _List_DynamicConfigValue_Equals(lhs, rhs []*config.DynamicConfigValue) bool {
	if len(lhs) != len(rhs) {
		return false
	}

	for i, lv := range lhs {
		rv := rhs[i]
		if !lv.Equals(rv) {
			return false
		}
	}

	return true
}

// Equals returns true if all the fields of this UpdateDynamicConfigRequest match the
// provided UpdateDynamicConfigRequest.
//
// This function performs a deep comparison.
func (v *UpdateDynamicConfigRequest) Equals(rhs *UpdateDynamicConfigRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_String_EqualsPtr(v.ConfigName, rhs.ConfigName) {
		return false
	}
	if !((v.ConfigValues == nil && rhs.ConfigValues == nil) || (v.ConfigValues != nil && rhs.ConfigValues != nil && _List_DynamicConfigValue_Equals(v.ConfigValues, rhs.ConfigValues))) {
		return false
	}

	return true
}

type _List_DynamicConfigValue_Zapper []*config.DynamicConfigValue

// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of _List_DynamicConfigValue_Zapper.
func (l _List_DynamicConfigValue_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) {
	for _, v := range l {
		err = multierr.Append(err, enc.AppendObject(v))
	}
	return err
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateDynamicConfigRequest.
func (v *UpdateDynamicConfigRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ConfigName != nil {
		enc.AddString("configName", *v.ConfigName)
	}
	if v.ConfigValues != nil {
		err = multierr.Append(err, enc.AddArray("configValues", (_List_DynamicConfigValue_Zapper)(v.ConfigValues)))
	}
	return err
}

// GetConfigName returns the value of ConfigName if it is set or its
// zero value if it is unset.
func (v *UpdateDynamicConfigRequest) GetConfigName() (o string) {
	if v != nil && v.ConfigName != nil {
		return *v.ConfigName
	}

	return
}

// IsSetConfigName returns true if ConfigName is not nil.
func (v *UpdateDynamicConfigRequest) IsSetConfigName() bool {
	return v != nil && v.ConfigName != nil
}

// GetConfigValues returns the value of ConfigValues if it is set or its
// zero value if it is unset.
func (v *UpdateDynamicConfigRequest) GetConfigValues() (o []*config.DynamicConfigValue) {
	if v != nil && v.ConfigValues != nil {
		return v.ConfigValues
	}

	return
}

// IsSetConfigValues returns true if ConfigValues is not nil.
func (v *UpdateDynamicConfigRequest) IsSetConfigValues() bool {
	return v != nil && v.ConfigValues != nil
}

type UpdateGlobalIsolationGroupsRequest struct {
	IsolationGroups *shared.IsolationGroupConfiguration `json:"isolationGroups,omitempty"`
}

// ToWire translates a UpdateGlobalIsolationGroupsRequest 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 *UpdateGlobalIsolationGroupsRequest) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.IsolationGroups != nil {
		w, err = v.IsolationGroups.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateGlobalIsolationGroupsRequest 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 UpdateGlobalIsolationGroupsRequest struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateGlobalIsolationGroupsRequest
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateGlobalIsolationGroupsRequest) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.IsolationGroups, err = _IsolationGroupConfiguration_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a UpdateGlobalIsolationGroupsRequest struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateGlobalIsolationGroupsRequest struct could not be encoded.
func (v *UpdateGlobalIsolationGroupsRequest) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.IsolationGroups != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.IsolationGroups.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateGlobalIsolationGroupsRequest struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateGlobalIsolationGroupsRequest struct could not be generated from the wire
// representation.
func (v *UpdateGlobalIsolationGroupsRequest) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 10 && fh.Type == wire.TStruct:
			v.IsolationGroups, err = _IsolationGroupConfiguration_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateGlobalIsolationGroupsRequest
// struct.
func (v *UpdateGlobalIsolationGroupsRequest) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.IsolationGroups != nil {
		fields[i] = fmt.Sprintf("IsolationGroups: %v", v.IsolationGroups)
		i++
	}

	return fmt.Sprintf("UpdateGlobalIsolationGroupsRequest{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateGlobalIsolationGroupsRequest match the
// provided UpdateGlobalIsolationGroupsRequest.
//
// This function performs a deep comparison.
func (v *UpdateGlobalIsolationGroupsRequest) Equals(rhs *UpdateGlobalIsolationGroupsRequest) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.IsolationGroups == nil && rhs.IsolationGroups == nil) || (v.IsolationGroups != nil && rhs.IsolationGroups != nil && v.IsolationGroups.Equals(rhs.IsolationGroups))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateGlobalIsolationGroupsRequest.
func (v *UpdateGlobalIsolationGroupsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.IsolationGroups != nil {
		err = multierr.Append(err, enc.AddObject("isolationGroups", v.IsolationGroups))
	}
	return err
}

// GetIsolationGroups returns the value of IsolationGroups if it is set or its
// zero value if it is unset.
func (v *UpdateGlobalIsolationGroupsRequest) GetIsolationGroups() (o *shared.IsolationGroupConfiguration) {
	if v != nil && v.IsolationGroups != nil {
		return v.IsolationGroups
	}

	return
}

// IsSetIsolationGroups returns true if IsolationGroups is not nil.
func (v *UpdateGlobalIsolationGroupsRequest) IsSetIsolationGroups() bool {
	return v != nil && v.IsolationGroups != nil
}

type UpdateGlobalIsolationGroupsResponse struct {
}

// ToWire translates a UpdateGlobalIsolationGroupsResponse 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 *UpdateGlobalIsolationGroupsResponse) ToWire() (wire.Value, error) {
	var (
		fields [0]wire.Field
		i      int = 0
	)

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a UpdateGlobalIsolationGroupsResponse 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 UpdateGlobalIsolationGroupsResponse struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v UpdateGlobalIsolationGroupsResponse
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *UpdateGlobalIsolationGroupsResponse) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// Encode serializes a UpdateGlobalIsolationGroupsResponse struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a UpdateGlobalIsolationGroupsResponse struct could not be encoded.
func (v *UpdateGlobalIsolationGroupsResponse) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a UpdateGlobalIsolationGroupsResponse struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a UpdateGlobalIsolationGroupsResponse struct could not be generated from the wire
// representation.
func (v *UpdateGlobalIsolationGroupsResponse) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a UpdateGlobalIsolationGroupsResponse
// struct.
func (v *UpdateGlobalIsolationGroupsResponse) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("UpdateGlobalIsolationGroupsResponse{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this UpdateGlobalIsolationGroupsResponse match the
// provided UpdateGlobalIsolationGroupsResponse.
//
// This function performs a deep comparison.
func (v *UpdateGlobalIsolationGroupsResponse) Equals(rhs *UpdateGlobalIsolationGroupsResponse) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of UpdateGlobalIsolationGroupsResponse.
func (v *UpdateGlobalIsolationGroupsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	return err
}

// ThriftModule represents the IDL file used to generate this package.
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "admin",
	Package:  "github.com/uber/cadence/.gen/go/admin",
	FilePath: "admin.thrift",
	SHA1:     "cd332257c2e6f1bcc07bdfaae63cb757ecf2cba3",
	Includes: []*thriftreflect.ThriftModule{
		config.ThriftModule,
		replicator.ThriftModule,
		shared.ThriftModule,
	},
	Raw: rawIDL,
}

const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nnamespace java com.uber.cadence.admin\n\ninclude \"shared.thrift\"\ninclude \"replicator.thrift\"\ninclude \"config.thrift\"\n\n/**\n* AdminService provides advanced APIs for debugging and analysis with admin privilege\n**/\nservice AdminService {\n  /**\n  * DescribeWorkflowExecution returns information about the internal states of workflow execution.\n  **/\n  DescribeWorkflowExecutionResponse DescribeWorkflowExecution(1: DescribeWorkflowExecutionRequest request)\n    throws (\n      1: shared.BadRequestError         badRequestError,\n      2: shared.InternalServiceError    internalServiceError,\n      3: shared.EntityNotExistsError    entityNotExistError,\n      4: shared.AccessDeniedError       accessDeniedError,\n    )\n\n  /**\n  * DescribeShardDistribution returns information about history shards within the cluster\n  **/\n  shared.DescribeShardDistributionResponse DescribeShardDistribution(1: shared.DescribeShardDistributionRequest request)\n    throws (\n      1: shared.InternalServiceError internalServiceError,\n    )\n\n  /**\n  * DescribeHistoryHost returns information about the internal states of a history host\n  **/\n  shared.DescribeHistoryHostResponse DescribeHistoryHost(1: shared.DescribeHistoryHostRequest request)\n    throws (\n      1: shared.BadRequestError       badRequestError,\n      2: shared.InternalServiceError  internalServiceError,\n      3: shared.AccessDeniedError     accessDeniedError,\n    )\n\n  void CloseShard(1: shared.CloseShardRequest request)\n    throws (\n      1: shared.BadRequestError       badRequestError,\n      2: shared.InternalServiceError  internalServiceError,\n      3: shared.AccessDeniedError     accessDeniedError,\n    )\n\n  void RemoveTask(1: shared.RemoveTaskRequest request)\n    throws (\n      1: shared.BadRequestError       badRequestError,\n      2: shared.InternalServiceError  internalServiceError,\n      3: shared.AccessDeniedError     accessDeniedError,\n    )\n\n  void ResetQueue(1: shared.ResetQueueRequest request)\n    throws (\n      1: shared.BadRequestError       badRequestError,\n      2: shared.InternalServiceError  internalServiceError,\n      3: shared.AccessDeniedError     accessDeniedError,\n    )\n\n  shared.DescribeQueueResponse DescribeQueue(1: shared.DescribeQueueRequest request)\n    throws (\n      1: shared.BadRequestError       badRequestError,\n      2: shared.InternalServiceError  internalServiceError,\n      3: shared.AccessDeniedError     accessDeniedError,\n    )\n\n  /**\n  * Returns the raw history of specified workflow execution.  It fails with 'EntityNotExistError' if speficied workflow\n  * execution in unknown to the service.\n  * StartEventId defines the beginning of the event to fetch. The first event is inclusive.\n  * EndEventId and EndEventVersion defines the end of the event to fetch. The end event is exclusive.\n  **/\n  GetWorkflowExecutionRawHistoryV2Response GetWorkflowExecutionRawHistoryV2(1: GetWorkflowExecutionRawHistoryV2Request getRequest)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.EntityNotExistsError entityNotExistError,\n      4: shared.ServiceBusyError serviceBusyError,\n    )\n\n  replicator.GetReplicationMessagesResponse GetReplicationMessages(1: replicator.GetReplicationMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      3: shared.LimitExceededError limitExceededError,\n      4: shared.ServiceBusyError serviceBusyError,\n      5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n    )\n\n  replicator.GetDomainReplicationMessagesResponse GetDomainReplicationMessages(1: replicator.GetDomainReplicationMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      3: shared.LimitExceededError limitExceededError,\n      4: shared.ServiceBusyError serviceBusyError,\n      5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n    )\n\n  replicator.GetDLQReplicationMessagesResponse GetDLQReplicationMessages(1: replicator.GetDLQReplicationMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.ServiceBusyError serviceBusyError,\n    )\n\n  /**\n  * ReapplyEvents applies stale events to the current workflow and current run\n  **/\n  void ReapplyEvents(1: shared.ReapplyEventsRequest reapplyEventsRequest)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      3: shared.DomainNotActiveError domainNotActiveError,\n      4: shared.LimitExceededError limitExceededError,\n      5: shared.ServiceBusyError serviceBusyError,\n      6: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * AddSearchAttribute whitelist search attribute in request.\n  **/\n  void AddSearchAttribute(1: AddSearchAttributeRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n    )\n\n  /**\n  * DescribeCluster returns information about cadence cluster\n  **/\n  DescribeClusterResponse DescribeCluster()\n    throws (\n      1: shared.InternalServiceError internalServiceError,\n      2: shared.ServiceBusyError serviceBusyError,\n    )\n\n  /**\n  * ReadDLQMessages returns messages from DLQ\n  **/\n  replicator.ReadDLQMessagesResponse ReadDLQMessages(1: replicator.ReadDLQMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n      4: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * PurgeDLQMessages purges messages from DLQ\n  **/\n  void PurgeDLQMessages(1: replicator.PurgeDLQMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n      4: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * MergeDLQMessages merges messages from DLQ\n  **/\n  replicator.MergeDLQMessagesResponse MergeDLQMessages(1: replicator.MergeDLQMessagesRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n      4: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * RefreshWorkflowTasks refreshes all tasks of a workflow\n  **/\n  void RefreshWorkflowTasks(1: shared.RefreshWorkflowTasksRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.DomainNotActiveError domainNotActiveError,\n      3: shared.ServiceBusyError serviceBusyError,\n      4: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * ResendReplicationTasks requests replication tasks from remote cluster and apply tasks to current cluster\n  **/\n  void ResendReplicationTasks(1: ResendReplicationTasksRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.ServiceBusyError serviceBusyError,\n      3: shared.EntityNotExistsError entityNotExistError,\n    )\n\n  /**\n  * GetCrossClusterTasks fetches cross cluster tasks\n  **/\n  shared.GetCrossClusterTasksResponse GetCrossClusterTasks(1: shared.GetCrossClusterTasksRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n    )\n\n  /**\n  * RespondCrossClusterTasksCompleted responds the result of processing cross cluster tasks\n  **/\n  shared.RespondCrossClusterTasksCompletedResponse RespondCrossClusterTasksCompleted(1: shared.RespondCrossClusterTasksCompletedRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n      3: shared.ServiceBusyError serviceBusyError,\n    )\n\n  /**\n  * GetDynamicConfig returns values associated with a specified dynamic config parameter.\n  **/\n  GetDynamicConfigResponse GetDynamicConfig(1: GetDynamicConfigRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n    )\n\n  void UpdateDynamicConfig(1: UpdateDynamicConfigRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n    )\n\n  void RestoreDynamicConfig(1: RestoreDynamicConfigRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n      2: shared.InternalServiceError internalServiceError,\n    )\n\n  ListDynamicConfigResponse ListDynamicConfig(1: ListDynamicConfigRequest request)\n    throws (\n      1: shared.InternalServiceError internalServiceError,\n    )\n\n  AdminDeleteWorkflowResponse DeleteWorkflow(1: AdminDeleteWorkflowRequest request)\n    throws (\n      1: shared.BadRequestError         badRequestError,\n      2: shared.EntityNotExistsError    entityNotExistError,\n      3: shared.InternalServiceError    internalServiceError,\n    )\n\n  AdminMaintainWorkflowResponse MaintainCorruptWorkflow(1: AdminMaintainWorkflowRequest request)\n    throws (\n      1: shared.BadRequestError         badRequestError,\n      2: shared.EntityNotExistsError    entityNotExistError,\n      3: shared.InternalServiceError    internalServiceError,\n    )\n\n  GetGlobalIsolationGroupsResponse GetGlobalIsolationGroups(1: GetGlobalIsolationGroupsRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n\n  UpdateGlobalIsolationGroupsResponse UpdateGlobalIsolationGroups(1: UpdateGlobalIsolationGroupsRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n\n  GetDomainIsolationGroupsResponse GetDomainIsolationGroups(1: GetDomainIsolationGroupsRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n\n  UpdateDomainIsolationGroupsResponse UpdateDomainIsolationGroups(1: UpdateDomainIsolationGroupsRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n\n\n  GetDomainAsyncWorkflowConfiguratonResponse GetDomainAsyncWorkflowConfiguraton(1: GetDomainAsyncWorkflowConfiguratonRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n\n  UpdateDomainAsyncWorkflowConfiguratonResponse UpdateDomainAsyncWorkflowConfiguraton(1: UpdateDomainAsyncWorkflowConfiguratonRequest request)\n    throws (\n      1: shared.BadRequestError badRequestError,\n    )\n}\n\nstruct DescribeWorkflowExecutionRequest {\n  10: optional string                       domain\n  20: optional shared.WorkflowExecution     execution\n}\n\nstruct DescribeWorkflowExecutionResponse {\n  10: optional string shardId\n  20: optional string historyAddr\n  40: optional string mutableStateInCache\n  50: optional string mutableStateInDatabase\n}\n\n/**\n  * StartEventId defines the beginning of the event to fetch. The first event is exclusive.\n  * EndEventId and EndEventVersion defines the end of the event to fetch. The end event is exclusive.\n  **/\nstruct GetWorkflowExecutionRawHistoryV2Request {\n  10: optional string domain\n  20: optional shared.WorkflowExecution execution\n  30: optional i64 (js.type = \"Long\") startEventId\n  40: optional i64 (js.type = \"Long\") startEventVersion\n  50: optional i64 (js.type = \"Long\") endEventId\n  60: optional i64 (js.type = \"Long\") endEventVersion\n  70: optional i32 maximumPageSize\n  80: optional binary nextPageToken\n}\n\nstruct GetWorkflowExecutionRawHistoryV2Response {\n  10: optional binary nextPageToken\n  20: optional list<shared.DataBlob> historyBatches\n  30: optional shared.VersionHistory versionHistory\n}\n\nstruct AddSearchAttributeRequest {\n  10: optional map<string, shared.IndexedValueType> searchAttribute\n  20: optional string securityToken\n}\n\nstruct HostInfo {\n  10: optional string Identity\n}\n\nstruct RingInfo {\n  10: optional string role\n  20: optional i32 memberCount\n  30: optional list<HostInfo> members\n}\n\nstruct MembershipInfo {\n  10: optional HostInfo currentHost\n  20: optional list<string> reachableMembers\n  30: optional list<RingInfo> rings\n}\n\nstruct PersistenceSetting {\n  10: optional string key\n  20: optional string value\n}\n\nstruct PersistenceFeature {\n  10: optional string key\n  20: optional bool enabled\n}\n\nstruct PersistenceInfo {\n  10: optional string backend\n  20: optional list<PersistenceSetting> settings\n  30: optional list<PersistenceFeature> features\n}\n\nstruct DescribeClusterResponse {\n  10: optional shared.SupportedClientVersions supportedClientVersions\n  20: optional MembershipInfo membershipInfo\n  30: optional map<string,PersistenceInfo> persistenceInfo\n}\n\nstruct ResendReplicationTasksRequest {\n  10: optional string domainID\n  20: optional string workflowID\n  30: optional string runID\n  40: optional string remoteCluster\n  50: optional i64 (js.type = \"Long\") startEventID\n  60: optional i64 (js.type = \"Long\") startVersion\n  70: optional i64 (js.type = \"Long\") endEventID\n  80: optional i64 (js.type = \"Long\") endVersion\n}\n\nstruct GetDynamicConfigRequest {\n  10: optional string configName\n  20: optional list<config.DynamicConfigFilter> filters\n}\n\nstruct GetDynamicConfigResponse {\n  10: optional shared.DataBlob value\n}\n\nstruct UpdateDynamicConfigRequest {\n  10: optional string configName\n  20: optional list<config.DynamicConfigValue> configValues\n}\n\nstruct RestoreDynamicConfigRequest {\n  10: optional string configName\n  20: optional list<config.DynamicConfigFilter> filters\n}\n\nstruct AdminDeleteWorkflowRequest {\n  10: optional string                       domain\n  20: optional shared.WorkflowExecution     execution\n}\n\nstruct AdminDeleteWorkflowResponse {\n  10: optional bool historyDeleted\n  20: optional bool executionsDeleted\n  30: optional bool visibilityDeleted\n}\n\nstruct AdminMaintainWorkflowRequest {\n  10: optional string                       domain\n  20: optional shared.WorkflowExecution     execution\n}\n\nstruct AdminMaintainWorkflowResponse {\n  10: optional bool historyDeleted\n  20: optional bool executionsDeleted\n  30: optional bool visibilityDeleted\n}\n\n//Eventually remove configName and integrate this functionality into Get.\n//GetDynamicConfigResponse would need to change as well.\nstruct ListDynamicConfigRequest {\n  10: optional string configName\n}\n\nstruct ListDynamicConfigResponse {\n  10: optional list<config.DynamicConfigEntry> entries\n}\n\n// global\nstruct GetGlobalIsolationGroupsRequest{}\n\nstruct GetGlobalIsolationGroupsResponse{\n    10: optional shared.IsolationGroupConfiguration isolationGroups\n}\n\nstruct UpdateGlobalIsolationGroupsRequest{\n    10: optional shared.IsolationGroupConfiguration isolationGroups\n}\n\nstruct UpdateGlobalIsolationGroupsResponse{}\n\n\n// For domains\nstruct GetDomainIsolationGroupsRequest{\n    10: optional string domain\n}\n\nstruct GetDomainIsolationGroupsResponse{\n    10: optional shared.IsolationGroupConfiguration isolationGroups\n}\n\nstruct UpdateDomainIsolationGroupsRequest{\n    10: optional string domain\n    20: optional shared.IsolationGroupConfiguration isolationGroups\n}\n\nstruct UpdateDomainIsolationGroupsResponse{}\n\n// Async workflow configuration request/response payloads\nstruct GetDomainAsyncWorkflowConfiguratonRequest {\n    10: optional string domain\n}\n\nstruct GetDomainAsyncWorkflowConfiguratonResponse {\n    10: optional shared.AsyncWorkflowConfiguration configuration\n}\n\nstruct UpdateDomainAsyncWorkflowConfiguratonRequest {\n    10: optional string domain\n    20: optional shared.AsyncWorkflowConfiguration configuration\n}\n\nstruct UpdateDomainAsyncWorkflowConfiguratonResponse {}\n"

// AdminService_AddSearchAttribute_Args represents the arguments for the AdminService.AddSearchAttribute function.
//
// The arguments for AddSearchAttribute are sent and received over the wire as this struct.
type AdminService_AddSearchAttribute_Args struct {
	Request *AddSearchAttributeRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_AddSearchAttribute_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 *AdminService_AddSearchAttribute_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _AddSearchAttributeRequest_Read(w wire.Value) (*AddSearchAttributeRequest, error) {
	var v AddSearchAttributeRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_AddSearchAttribute_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 AdminService_AddSearchAttribute_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_AddSearchAttribute_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_AddSearchAttribute_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.Request, err = _AddSearchAttributeRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_AddSearchAttribute_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_AddSearchAttribute_Args struct could not be encoded.
func (v *AdminService_AddSearchAttribute_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _AddSearchAttributeRequest_Decode(sr stream.Reader) (*AddSearchAttributeRequest, error) {
	var v AddSearchAttributeRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_AddSearchAttribute_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_AddSearchAttribute_Args struct could not be generated from the wire
// representation.
func (v *AdminService_AddSearchAttribute_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _AddSearchAttributeRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_AddSearchAttribute_Args
// struct.
func (v *AdminService_AddSearchAttribute_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_AddSearchAttribute_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_AddSearchAttribute_Args match the
// provided AdminService_AddSearchAttribute_Args.
//
// This function performs a deep comparison.
func (v *AdminService_AddSearchAttribute_Args) Equals(rhs *AdminService_AddSearchAttribute_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_AddSearchAttribute_Args.
func (v *AdminService_AddSearchAttribute_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_AddSearchAttribute_Args) GetRequest() (o *AddSearchAttributeRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_AddSearchAttribute_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "AddSearchAttribute" for this struct.
func (v *AdminService_AddSearchAttribute_Args) MethodName() string {
	return "AddSearchAttribute"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_AddSearchAttribute_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_AddSearchAttribute_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.AddSearchAttribute
// function.
var AdminService_AddSearchAttribute_Helper = struct {
	// Args accepts the parameters of AddSearchAttribute in-order and returns
	// the arguments struct for the function.
	Args func(
		request *AddSearchAttributeRequest,
	) *AdminService_AddSearchAttribute_Args

	// IsException returns true if the given error can be thrown
	// by AddSearchAttribute.
	//
	// An error can be thrown by AddSearchAttribute 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 AddSearchAttribute
	// given the error returned by it. The provided error may
	// be nil if AddSearchAttribute did not fail.
	//
	// This allows mapping errors returned by AddSearchAttribute into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// AddSearchAttribute
	//
	//   err := AddSearchAttribute(args)
	//   result, err := AdminService_AddSearchAttribute_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from AddSearchAttribute: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_AddSearchAttribute_Result, error)

	// UnwrapResponse takes the result struct for AddSearchAttribute
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if AddSearchAttribute threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_AddSearchAttribute_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_AddSearchAttribute_Result) error
}{}

func init() {
	AdminService_AddSearchAttribute_Helper.Args = func(
		request *AddSearchAttributeRequest,
	) *AdminService_AddSearchAttribute_Args {
		return &AdminService_AddSearchAttribute_Args{
			Request: request,
		}
	}

	AdminService_AddSearchAttribute_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_AddSearchAttribute_Helper.WrapResponse = func(err error) (*AdminService_AddSearchAttribute_Result, error) {
		if err == nil {
			return &AdminService_AddSearchAttribute_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 AdminService_AddSearchAttribute_Result.BadRequestError")
			}
			return &AdminService_AddSearchAttribute_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_AddSearchAttribute_Result.InternalServiceError")
			}
			return &AdminService_AddSearchAttribute_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_AddSearchAttribute_Result.ServiceBusyError")
			}
			return &AdminService_AddSearchAttribute_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_AddSearchAttribute_Helper.UnwrapResponse = func(result *AdminService_AddSearchAttribute_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		return
	}

}

// AdminService_AddSearchAttribute_Result represents the result of a AdminService.AddSearchAttribute function call.
//
// The result of a AddSearchAttribute execution is sent and received over the wire as this struct.
type AdminService_AddSearchAttribute_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_AddSearchAttribute_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 *AdminService_AddSearchAttribute_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_AddSearchAttribute_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _BadRequestError_Read(w wire.Value) (*shared.BadRequestError, error) {
	var v shared.BadRequestError
	err := v.FromWire(w)
	return &v, err
}

func _InternalServiceError_Read(w wire.Value) (*shared.InternalServiceError, error) {
	var v shared.InternalServiceError
	err := v.FromWire(w)
	return &v, err
}

func _ServiceBusyError_Read(w wire.Value) (*shared.ServiceBusyError, error) {
	var v shared.ServiceBusyError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_AddSearchAttribute_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 AdminService_AddSearchAttribute_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_AddSearchAttribute_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_AddSearchAttribute_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.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.ServiceBusyError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_AddSearchAttribute_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_AddSearchAttribute_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_AddSearchAttribute_Result struct could not be encoded.
func (v *AdminService_AddSearchAttribute_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_AddSearchAttribute_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _BadRequestError_Decode(sr stream.Reader) (*shared.BadRequestError, error) {
	var v shared.BadRequestError
	err := v.Decode(sr)
	return &v, err
}

func _InternalServiceError_Decode(sr stream.Reader) (*shared.InternalServiceError, error) {
	var v shared.InternalServiceError
	err := v.Decode(sr)
	return &v, err
}

func _ServiceBusyError_Decode(sr stream.Reader) (*shared.ServiceBusyError, error) {
	var v shared.ServiceBusyError
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_AddSearchAttribute_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_AddSearchAttribute_Result struct could not be generated from the wire
// representation.
func (v *AdminService_AddSearchAttribute_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_AddSearchAttribute_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_AddSearchAttribute_Result
// struct.
func (v *AdminService_AddSearchAttribute_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_AddSearchAttribute_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_AddSearchAttribute_Result match the
// provided AdminService_AddSearchAttribute_Result.
//
// This function performs a deep comparison.
func (v *AdminService_AddSearchAttribute_Result) Equals(rhs *AdminService_AddSearchAttribute_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.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 AdminService_AddSearchAttribute_Result.
func (v *AdminService_AddSearchAttribute_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.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 *AdminService_AddSearchAttribute_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_AddSearchAttribute_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_AddSearchAttribute_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_AddSearchAttribute_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_AddSearchAttribute_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_AddSearchAttribute_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "AddSearchAttribute" for this struct.
func (v *AdminService_AddSearchAttribute_Result) MethodName() string {
	return "AddSearchAttribute"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_AddSearchAttribute_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_CloseShard_Args represents the arguments for the AdminService.CloseShard function.
//
// The arguments for CloseShard are sent and received over the wire as this struct.
type AdminService_CloseShard_Args struct {
	Request *shared.CloseShardRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_CloseShard_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 *AdminService_CloseShard_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _CloseShardRequest_Read(w wire.Value) (*shared.CloseShardRequest, error) {
	var v shared.CloseShardRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_CloseShard_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 AdminService_CloseShard_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_CloseShard_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_CloseShard_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.Request, err = _CloseShardRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_CloseShard_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_CloseShard_Args struct could not be encoded.
func (v *AdminService_CloseShard_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _CloseShardRequest_Decode(sr stream.Reader) (*shared.CloseShardRequest, error) {
	var v shared.CloseShardRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_CloseShard_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_CloseShard_Args struct could not be generated from the wire
// representation.
func (v *AdminService_CloseShard_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _CloseShardRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_CloseShard_Args
// struct.
func (v *AdminService_CloseShard_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_CloseShard_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_CloseShard_Args match the
// provided AdminService_CloseShard_Args.
//
// This function performs a deep comparison.
func (v *AdminService_CloseShard_Args) Equals(rhs *AdminService_CloseShard_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_CloseShard_Args.
func (v *AdminService_CloseShard_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_CloseShard_Args) GetRequest() (o *shared.CloseShardRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_CloseShard_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "CloseShard" for this struct.
func (v *AdminService_CloseShard_Args) MethodName() string {
	return "CloseShard"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_CloseShard_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_CloseShard_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.CloseShard
// function.
var AdminService_CloseShard_Helper = struct {
	// Args accepts the parameters of CloseShard in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.CloseShardRequest,
	) *AdminService_CloseShard_Args

	// IsException returns true if the given error can be thrown
	// by CloseShard.
	//
	// An error can be thrown by CloseShard 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 CloseShard
	// given the error returned by it. The provided error may
	// be nil if CloseShard did not fail.
	//
	// This allows mapping errors returned by CloseShard into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// CloseShard
	//
	//   err := CloseShard(args)
	//   result, err := AdminService_CloseShard_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from CloseShard: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_CloseShard_Result, error)

	// UnwrapResponse takes the result struct for CloseShard
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if CloseShard threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_CloseShard_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_CloseShard_Result) error
}{}

func init() {
	AdminService_CloseShard_Helper.Args = func(
		request *shared.CloseShardRequest,
	) *AdminService_CloseShard_Args {
		return &AdminService_CloseShard_Args{
			Request: request,
		}
	}

	AdminService_CloseShard_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_CloseShard_Helper.WrapResponse = func(err error) (*AdminService_CloseShard_Result, error) {
		if err == nil {
			return &AdminService_CloseShard_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 AdminService_CloseShard_Result.BadRequestError")
			}
			return &AdminService_CloseShard_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_CloseShard_Result.InternalServiceError")
			}
			return &AdminService_CloseShard_Result{InternalServiceError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_CloseShard_Result.AccessDeniedError")
			}
			return &AdminService_CloseShard_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_CloseShard_Helper.UnwrapResponse = func(result *AdminService_CloseShard_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// AdminService_CloseShard_Result represents the result of a AdminService.CloseShard function call.
//
// The result of a CloseShard execution is sent and received over the wire as this struct.
type AdminService_CloseShard_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_CloseShard_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 *AdminService_CloseShard_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_CloseShard_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _AccessDeniedError_Read(w wire.Value) (*shared.AccessDeniedError, error) {
	var v shared.AccessDeniedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_CloseShard_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 AdminService_CloseShard_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_CloseShard_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_CloseShard_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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_CloseShard_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_CloseShard_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_CloseShard_Result struct could not be encoded.
func (v *AdminService_CloseShard_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_CloseShard_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _AccessDeniedError_Decode(sr stream.Reader) (*shared.AccessDeniedError, error) {
	var v shared.AccessDeniedError
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_CloseShard_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_CloseShard_Result struct could not be generated from the wire
// representation.
func (v *AdminService_CloseShard_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_CloseShard_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_CloseShard_Result
// struct.
func (v *AdminService_CloseShard_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_CloseShard_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_CloseShard_Result match the
// provided AdminService_CloseShard_Result.
//
// This function performs a deep comparison.
func (v *AdminService_CloseShard_Result) Equals(rhs *AdminService_CloseShard_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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_CloseShard_Result.
func (v *AdminService_CloseShard_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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_CloseShard_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_CloseShard_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_CloseShard_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_CloseShard_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_CloseShard_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_CloseShard_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "CloseShard" for this struct.
func (v *AdminService_CloseShard_Result) MethodName() string {
	return "CloseShard"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_CloseShard_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DeleteWorkflow_Args represents the arguments for the AdminService.DeleteWorkflow function.
//
// The arguments for DeleteWorkflow are sent and received over the wire as this struct.
type AdminService_DeleteWorkflow_Args struct {
	Request *AdminDeleteWorkflowRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_DeleteWorkflow_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 *AdminService_DeleteWorkflow_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _AdminDeleteWorkflowRequest_Read(w wire.Value) (*AdminDeleteWorkflowRequest, error) {
	var v AdminDeleteWorkflowRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DeleteWorkflow_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 AdminService_DeleteWorkflow_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DeleteWorkflow_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DeleteWorkflow_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.Request, err = _AdminDeleteWorkflowRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_DeleteWorkflow_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DeleteWorkflow_Args struct could not be encoded.
func (v *AdminService_DeleteWorkflow_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _AdminDeleteWorkflowRequest_Decode(sr stream.Reader) (*AdminDeleteWorkflowRequest, error) {
	var v AdminDeleteWorkflowRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DeleteWorkflow_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DeleteWorkflow_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DeleteWorkflow_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _AdminDeleteWorkflowRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DeleteWorkflow_Args
// struct.
func (v *AdminService_DeleteWorkflow_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_DeleteWorkflow_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DeleteWorkflow_Args match the
// provided AdminService_DeleteWorkflow_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DeleteWorkflow_Args) Equals(rhs *AdminService_DeleteWorkflow_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DeleteWorkflow_Args.
func (v *AdminService_DeleteWorkflow_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_DeleteWorkflow_Args) GetRequest() (o *AdminDeleteWorkflowRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_DeleteWorkflow_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DeleteWorkflow" for this struct.
func (v *AdminService_DeleteWorkflow_Args) MethodName() string {
	return "DeleteWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DeleteWorkflow_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DeleteWorkflow_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DeleteWorkflow
// function.
var AdminService_DeleteWorkflow_Helper = struct {
	// Args accepts the parameters of DeleteWorkflow in-order and returns
	// the arguments struct for the function.
	Args func(
		request *AdminDeleteWorkflowRequest,
	) *AdminService_DeleteWorkflow_Args

	// IsException returns true if the given error can be thrown
	// by DeleteWorkflow.
	//
	// An error can be thrown by DeleteWorkflow 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 DeleteWorkflow
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DeleteWorkflow into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DeleteWorkflow
	//
	//   value, err := DeleteWorkflow(args)
	//   result, err := AdminService_DeleteWorkflow_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DeleteWorkflow: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*AdminDeleteWorkflowResponse, error) (*AdminService_DeleteWorkflow_Result, error)

	// UnwrapResponse takes the result struct for DeleteWorkflow
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DeleteWorkflow threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DeleteWorkflow_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DeleteWorkflow_Result) (*AdminDeleteWorkflowResponse, error)
}{}

func init() {
	AdminService_DeleteWorkflow_Helper.Args = func(
		request *AdminDeleteWorkflowRequest,
	) *AdminService_DeleteWorkflow_Args {
		return &AdminService_DeleteWorkflow_Args{
			Request: request,
		}
	}

	AdminService_DeleteWorkflow_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_DeleteWorkflow_Helper.WrapResponse = func(success *AdminDeleteWorkflowResponse, err error) (*AdminService_DeleteWorkflow_Result, error) {
		if err == nil {
			return &AdminService_DeleteWorkflow_Result{Success: success}, 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 AdminService_DeleteWorkflow_Result.BadRequestError")
			}
			return &AdminService_DeleteWorkflow_Result{BadRequestError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DeleteWorkflow_Result.EntityNotExistError")
			}
			return &AdminService_DeleteWorkflow_Result{EntityNotExistError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DeleteWorkflow_Result.InternalServiceError")
			}
			return &AdminService_DeleteWorkflow_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_DeleteWorkflow_Helper.UnwrapResponse = func(result *AdminService_DeleteWorkflow_Result) (success *AdminDeleteWorkflowResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DeleteWorkflow_Result represents the result of a AdminService.DeleteWorkflow function call.
//
// The result of a DeleteWorkflow execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DeleteWorkflow_Result struct {
	// Value returned by DeleteWorkflow after a successful execution.
	Success              *AdminDeleteWorkflowResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_DeleteWorkflow_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 *AdminService_DeleteWorkflow_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.InternalServiceError != nil {
		w, err = v.InternalServiceError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DeleteWorkflow_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _AdminDeleteWorkflowResponse_Read(w wire.Value) (*AdminDeleteWorkflowResponse, error) {
	var v AdminDeleteWorkflowResponse
	err := v.FromWire(w)
	return &v, err
}

func _EntityNotExistsError_Read(w wire.Value) (*shared.EntityNotExistsError, error) {
	var v shared.EntityNotExistsError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DeleteWorkflow_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 AdminService_DeleteWorkflow_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DeleteWorkflow_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DeleteWorkflow_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _AdminDeleteWorkflowResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DeleteWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DeleteWorkflow_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DeleteWorkflow_Result struct could not be encoded.
func (v *AdminService_DeleteWorkflow_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DeleteWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _AdminDeleteWorkflowResponse_Decode(sr stream.Reader) (*AdminDeleteWorkflowResponse, error) {
	var v AdminDeleteWorkflowResponse
	err := v.Decode(sr)
	return &v, err
}

func _EntityNotExistsError_Decode(sr stream.Reader) (*shared.EntityNotExistsError, error) {
	var v shared.EntityNotExistsError
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DeleteWorkflow_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DeleteWorkflow_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DeleteWorkflow_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _AdminDeleteWorkflowResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DeleteWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DeleteWorkflow_Result
// struct.
func (v *AdminService_DeleteWorkflow_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}

	return fmt.Sprintf("AdminService_DeleteWorkflow_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DeleteWorkflow_Result match the
// provided AdminService_DeleteWorkflow_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DeleteWorkflow_Result) Equals(rhs *AdminService_DeleteWorkflow_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DeleteWorkflow_Result.
func (v *AdminService_DeleteWorkflow_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DeleteWorkflow_Result) GetSuccess() (o *AdminDeleteWorkflowResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DeleteWorkflow_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_DeleteWorkflow_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_DeleteWorkflow_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_DeleteWorkflow_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_DeleteWorkflow_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DeleteWorkflow_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DeleteWorkflow_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DeleteWorkflow" for this struct.
func (v *AdminService_DeleteWorkflow_Result) MethodName() string {
	return "DeleteWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DeleteWorkflow_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DescribeCluster_Args represents the arguments for the AdminService.DescribeCluster function.
//
// The arguments for DescribeCluster are sent and received over the wire as this struct.
type AdminService_DescribeCluster_Args struct {
}

// ToWire translates a AdminService_DescribeCluster_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 *AdminService_DescribeCluster_Args) ToWire() (wire.Value, error) {
	var (
		fields [0]wire.Field
		i      int = 0
	)

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_DescribeCluster_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 AdminService_DescribeCluster_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeCluster_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeCluster_Args) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// Encode serializes a AdminService_DescribeCluster_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeCluster_Args struct could not be encoded.
func (v *AdminService_DescribeCluster_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_DescribeCluster_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeCluster_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeCluster_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeCluster_Args
// struct.
func (v *AdminService_DescribeCluster_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("AdminService_DescribeCluster_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeCluster_Args match the
// provided AdminService_DescribeCluster_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeCluster_Args) Equals(rhs *AdminService_DescribeCluster_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeCluster_Args.
func (v *AdminService_DescribeCluster_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	return err
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DescribeCluster" for this struct.
func (v *AdminService_DescribeCluster_Args) MethodName() string {
	return "DescribeCluster"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DescribeCluster_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DescribeCluster_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DescribeCluster
// function.
var AdminService_DescribeCluster_Helper = struct {
	// Args accepts the parameters of DescribeCluster in-order and returns
	// the arguments struct for the function.
	Args func() *AdminService_DescribeCluster_Args

	// IsException returns true if the given error can be thrown
	// by DescribeCluster.
	//
	// An error can be thrown by DescribeCluster 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 DescribeCluster
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeCluster into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeCluster
	//
	//   value, err := DescribeCluster(args)
	//   result, err := AdminService_DescribeCluster_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeCluster: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*DescribeClusterResponse, error) (*AdminService_DescribeCluster_Result, error)

	// UnwrapResponse takes the result struct for DescribeCluster
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeCluster threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DescribeCluster_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DescribeCluster_Result) (*DescribeClusterResponse, error)
}{}

func init() {
	AdminService_DescribeCluster_Helper.Args = func() *AdminService_DescribeCluster_Args {
		return &AdminService_DescribeCluster_Args{}
	}

	AdminService_DescribeCluster_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_DescribeCluster_Helper.WrapResponse = func(success *DescribeClusterResponse, err error) (*AdminService_DescribeCluster_Result, error) {
		if err == nil {
			return &AdminService_DescribeCluster_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeCluster_Result.InternalServiceError")
			}
			return &AdminService_DescribeCluster_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeCluster_Result.ServiceBusyError")
			}
			return &AdminService_DescribeCluster_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_DescribeCluster_Helper.UnwrapResponse = func(result *AdminService_DescribeCluster_Result) (success *DescribeClusterResponse, err error) {
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DescribeCluster_Result represents the result of a AdminService.DescribeCluster function call.
//
// The result of a DescribeCluster execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DescribeCluster_Result struct {
	// Value returned by DescribeCluster after a successful execution.
	Success              *DescribeClusterResponse     `json:"success,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_DescribeCluster_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 *AdminService_DescribeCluster_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.InternalServiceError != nil {
		w, err = v.InternalServiceError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DescribeCluster_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeClusterResponse_Read(w wire.Value) (*DescribeClusterResponse, error) {
	var v DescribeClusterResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeCluster_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 AdminService_DescribeCluster_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeCluster_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeCluster_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _DescribeClusterResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 2:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeCluster_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DescribeCluster_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeCluster_Result struct could not be encoded.
func (v *AdminService_DescribeCluster_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DescribeCluster_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DescribeClusterResponse_Decode(sr stream.Reader) (*DescribeClusterResponse, error) {
	var v DescribeClusterResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeCluster_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeCluster_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeCluster_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _DescribeClusterResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeCluster_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeCluster_Result
// struct.
func (v *AdminService_DescribeCluster_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeCluster_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeCluster_Result match the
// provided AdminService_DescribeCluster_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeCluster_Result) Equals(rhs *AdminService_DescribeCluster_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		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 AdminService_DescribeCluster_Result.
func (v *AdminService_DescribeCluster_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeCluster_Result) GetSuccess() (o *DescribeClusterResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DescribeCluster_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeCluster_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DescribeCluster_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeCluster_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_DescribeCluster_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DescribeCluster" for this struct.
func (v *AdminService_DescribeCluster_Result) MethodName() string {
	return "DescribeCluster"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DescribeCluster_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DescribeHistoryHost_Args represents the arguments for the AdminService.DescribeHistoryHost function.
//
// The arguments for DescribeHistoryHost are sent and received over the wire as this struct.
type AdminService_DescribeHistoryHost_Args struct {
	Request *shared.DescribeHistoryHostRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_DescribeHistoryHost_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 *AdminService_DescribeHistoryHost_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _DescribeHistoryHostRequest_Read(w wire.Value) (*shared.DescribeHistoryHostRequest, error) {
	var v shared.DescribeHistoryHostRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeHistoryHost_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 AdminService_DescribeHistoryHost_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeHistoryHost_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeHistoryHost_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.Request, err = _DescribeHistoryHostRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_DescribeHistoryHost_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeHistoryHost_Args struct could not be encoded.
func (v *AdminService_DescribeHistoryHost_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DescribeHistoryHostRequest_Decode(sr stream.Reader) (*shared.DescribeHistoryHostRequest, error) {
	var v shared.DescribeHistoryHostRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeHistoryHost_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeHistoryHost_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeHistoryHost_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _DescribeHistoryHostRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeHistoryHost_Args
// struct.
func (v *AdminService_DescribeHistoryHost_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeHistoryHost_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeHistoryHost_Args match the
// provided AdminService_DescribeHistoryHost_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeHistoryHost_Args) Equals(rhs *AdminService_DescribeHistoryHost_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeHistoryHost_Args.
func (v *AdminService_DescribeHistoryHost_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeHistoryHost_Args) GetRequest() (o *shared.DescribeHistoryHostRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_DescribeHistoryHost_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DescribeHistoryHost" for this struct.
func (v *AdminService_DescribeHistoryHost_Args) MethodName() string {
	return "DescribeHistoryHost"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DescribeHistoryHost_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DescribeHistoryHost_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DescribeHistoryHost
// function.
var AdminService_DescribeHistoryHost_Helper = struct {
	// Args accepts the parameters of DescribeHistoryHost in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.DescribeHistoryHostRequest,
	) *AdminService_DescribeHistoryHost_Args

	// IsException returns true if the given error can be thrown
	// by DescribeHistoryHost.
	//
	// An error can be thrown by DescribeHistoryHost 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 DescribeHistoryHost
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeHistoryHost into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeHistoryHost
	//
	//   value, err := DescribeHistoryHost(args)
	//   result, err := AdminService_DescribeHistoryHost_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeHistoryHost: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeHistoryHostResponse, error) (*AdminService_DescribeHistoryHost_Result, error)

	// UnwrapResponse takes the result struct for DescribeHistoryHost
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeHistoryHost threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DescribeHistoryHost_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DescribeHistoryHost_Result) (*shared.DescribeHistoryHostResponse, error)
}{}

func init() {
	AdminService_DescribeHistoryHost_Helper.Args = func(
		request *shared.DescribeHistoryHostRequest,
	) *AdminService_DescribeHistoryHost_Args {
		return &AdminService_DescribeHistoryHost_Args{
			Request: request,
		}
	}

	AdminService_DescribeHistoryHost_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_DescribeHistoryHost_Helper.WrapResponse = func(success *shared.DescribeHistoryHostResponse, err error) (*AdminService_DescribeHistoryHost_Result, error) {
		if err == nil {
			return &AdminService_DescribeHistoryHost_Result{Success: success}, 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 AdminService_DescribeHistoryHost_Result.BadRequestError")
			}
			return &AdminService_DescribeHistoryHost_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeHistoryHost_Result.InternalServiceError")
			}
			return &AdminService_DescribeHistoryHost_Result{InternalServiceError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeHistoryHost_Result.AccessDeniedError")
			}
			return &AdminService_DescribeHistoryHost_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_DescribeHistoryHost_Helper.UnwrapResponse = func(result *AdminService_DescribeHistoryHost_Result) (success *shared.DescribeHistoryHostResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DescribeHistoryHost_Result represents the result of a AdminService.DescribeHistoryHost function call.
//
// The result of a DescribeHistoryHost execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DescribeHistoryHost_Result struct {
	// Value returned by DescribeHistoryHost after a successful execution.
	Success              *shared.DescribeHistoryHostResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError             `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError        `json:"internalServiceError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError           `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_DescribeHistoryHost_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 *AdminService_DescribeHistoryHost_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DescribeHistoryHost_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeHistoryHostResponse_Read(w wire.Value) (*shared.DescribeHistoryHostResponse, error) {
	var v shared.DescribeHistoryHostResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeHistoryHost_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 AdminService_DescribeHistoryHost_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeHistoryHost_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeHistoryHost_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _DescribeHistoryHostResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeHistoryHost_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DescribeHistoryHost_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeHistoryHost_Result struct could not be encoded.
func (v *AdminService_DescribeHistoryHost_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DescribeHistoryHost_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DescribeHistoryHostResponse_Decode(sr stream.Reader) (*shared.DescribeHistoryHostResponse, error) {
	var v shared.DescribeHistoryHostResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeHistoryHost_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeHistoryHost_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeHistoryHost_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _DescribeHistoryHostResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeHistoryHost_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeHistoryHost_Result
// struct.
func (v *AdminService_DescribeHistoryHost_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeHistoryHost_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeHistoryHost_Result match the
// provided AdminService_DescribeHistoryHost_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeHistoryHost_Result) Equals(rhs *AdminService_DescribeHistoryHost_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeHistoryHost_Result.
func (v *AdminService_DescribeHistoryHost_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeHistoryHost_Result) GetSuccess() (o *shared.DescribeHistoryHostResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DescribeHistoryHost_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeHistoryHost_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_DescribeHistoryHost_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeHistoryHost_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DescribeHistoryHost_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeHistoryHost_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_DescribeHistoryHost_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DescribeHistoryHost" for this struct.
func (v *AdminService_DescribeHistoryHost_Result) MethodName() string {
	return "DescribeHistoryHost"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DescribeHistoryHost_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DescribeQueue_Args represents the arguments for the AdminService.DescribeQueue function.
//
// The arguments for DescribeQueue are sent and received over the wire as this struct.
type AdminService_DescribeQueue_Args struct {
	Request *shared.DescribeQueueRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_DescribeQueue_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 *AdminService_DescribeQueue_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _DescribeQueueRequest_Read(w wire.Value) (*shared.DescribeQueueRequest, error) {
	var v shared.DescribeQueueRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeQueue_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 AdminService_DescribeQueue_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeQueue_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeQueue_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.Request, err = _DescribeQueueRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_DescribeQueue_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeQueue_Args struct could not be encoded.
func (v *AdminService_DescribeQueue_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DescribeQueueRequest_Decode(sr stream.Reader) (*shared.DescribeQueueRequest, error) {
	var v shared.DescribeQueueRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeQueue_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeQueue_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeQueue_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _DescribeQueueRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeQueue_Args
// struct.
func (v *AdminService_DescribeQueue_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeQueue_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeQueue_Args match the
// provided AdminService_DescribeQueue_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeQueue_Args) Equals(rhs *AdminService_DescribeQueue_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeQueue_Args.
func (v *AdminService_DescribeQueue_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeQueue_Args) GetRequest() (o *shared.DescribeQueueRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_DescribeQueue_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DescribeQueue" for this struct.
func (v *AdminService_DescribeQueue_Args) MethodName() string {
	return "DescribeQueue"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DescribeQueue_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DescribeQueue_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DescribeQueue
// function.
var AdminService_DescribeQueue_Helper = struct {
	// Args accepts the parameters of DescribeQueue in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.DescribeQueueRequest,
	) *AdminService_DescribeQueue_Args

	// IsException returns true if the given error can be thrown
	// by DescribeQueue.
	//
	// An error can be thrown by DescribeQueue 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 DescribeQueue
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeQueue into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeQueue
	//
	//   value, err := DescribeQueue(args)
	//   result, err := AdminService_DescribeQueue_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeQueue: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeQueueResponse, error) (*AdminService_DescribeQueue_Result, error)

	// UnwrapResponse takes the result struct for DescribeQueue
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeQueue threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DescribeQueue_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DescribeQueue_Result) (*shared.DescribeQueueResponse, error)
}{}

func init() {
	AdminService_DescribeQueue_Helper.Args = func(
		request *shared.DescribeQueueRequest,
	) *AdminService_DescribeQueue_Args {
		return &AdminService_DescribeQueue_Args{
			Request: request,
		}
	}

	AdminService_DescribeQueue_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_DescribeQueue_Helper.WrapResponse = func(success *shared.DescribeQueueResponse, err error) (*AdminService_DescribeQueue_Result, error) {
		if err == nil {
			return &AdminService_DescribeQueue_Result{Success: success}, 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 AdminService_DescribeQueue_Result.BadRequestError")
			}
			return &AdminService_DescribeQueue_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeQueue_Result.InternalServiceError")
			}
			return &AdminService_DescribeQueue_Result{InternalServiceError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeQueue_Result.AccessDeniedError")
			}
			return &AdminService_DescribeQueue_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_DescribeQueue_Helper.UnwrapResponse = func(result *AdminService_DescribeQueue_Result) (success *shared.DescribeQueueResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DescribeQueue_Result represents the result of a AdminService.DescribeQueue function call.
//
// The result of a DescribeQueue execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DescribeQueue_Result struct {
	// Value returned by DescribeQueue after a successful execution.
	Success              *shared.DescribeQueueResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError       `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError  `json:"internalServiceError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError     `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_DescribeQueue_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 *AdminService_DescribeQueue_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DescribeQueue_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeQueueResponse_Read(w wire.Value) (*shared.DescribeQueueResponse, error) {
	var v shared.DescribeQueueResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeQueue_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 AdminService_DescribeQueue_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeQueue_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeQueue_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _DescribeQueueResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeQueue_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DescribeQueue_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeQueue_Result struct could not be encoded.
func (v *AdminService_DescribeQueue_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DescribeQueue_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DescribeQueueResponse_Decode(sr stream.Reader) (*shared.DescribeQueueResponse, error) {
	var v shared.DescribeQueueResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeQueue_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeQueue_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeQueue_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _DescribeQueueResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeQueue_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeQueue_Result
// struct.
func (v *AdminService_DescribeQueue_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeQueue_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeQueue_Result match the
// provided AdminService_DescribeQueue_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeQueue_Result) Equals(rhs *AdminService_DescribeQueue_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeQueue_Result.
func (v *AdminService_DescribeQueue_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeQueue_Result) GetSuccess() (o *shared.DescribeQueueResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DescribeQueue_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeQueue_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_DescribeQueue_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeQueue_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DescribeQueue_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeQueue_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_DescribeQueue_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DescribeQueue" for this struct.
func (v *AdminService_DescribeQueue_Result) MethodName() string {
	return "DescribeQueue"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DescribeQueue_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DescribeShardDistribution_Args represents the arguments for the AdminService.DescribeShardDistribution function.
//
// The arguments for DescribeShardDistribution are sent and received over the wire as this struct.
type AdminService_DescribeShardDistribution_Args struct {
	Request *shared.DescribeShardDistributionRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_DescribeShardDistribution_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 *AdminService_DescribeShardDistribution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _DescribeShardDistributionRequest_Read(w wire.Value) (*shared.DescribeShardDistributionRequest, error) {
	var v shared.DescribeShardDistributionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeShardDistribution_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 AdminService_DescribeShardDistribution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeShardDistribution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeShardDistribution_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.Request, err = _DescribeShardDistributionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_DescribeShardDistribution_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeShardDistribution_Args struct could not be encoded.
func (v *AdminService_DescribeShardDistribution_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DescribeShardDistributionRequest_Decode(sr stream.Reader) (*shared.DescribeShardDistributionRequest, error) {
	var v shared.DescribeShardDistributionRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeShardDistribution_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeShardDistribution_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeShardDistribution_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _DescribeShardDistributionRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeShardDistribution_Args
// struct.
func (v *AdminService_DescribeShardDistribution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeShardDistribution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeShardDistribution_Args match the
// provided AdminService_DescribeShardDistribution_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeShardDistribution_Args) Equals(rhs *AdminService_DescribeShardDistribution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeShardDistribution_Args.
func (v *AdminService_DescribeShardDistribution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeShardDistribution_Args) GetRequest() (o *shared.DescribeShardDistributionRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_DescribeShardDistribution_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DescribeShardDistribution" for this struct.
func (v *AdminService_DescribeShardDistribution_Args) MethodName() string {
	return "DescribeShardDistribution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DescribeShardDistribution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DescribeShardDistribution_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DescribeShardDistribution
// function.
var AdminService_DescribeShardDistribution_Helper = struct {
	// Args accepts the parameters of DescribeShardDistribution in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.DescribeShardDistributionRequest,
	) *AdminService_DescribeShardDistribution_Args

	// IsException returns true if the given error can be thrown
	// by DescribeShardDistribution.
	//
	// An error can be thrown by DescribeShardDistribution 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 DescribeShardDistribution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeShardDistribution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeShardDistribution
	//
	//   value, err := DescribeShardDistribution(args)
	//   result, err := AdminService_DescribeShardDistribution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeShardDistribution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeShardDistributionResponse, error) (*AdminService_DescribeShardDistribution_Result, error)

	// UnwrapResponse takes the result struct for DescribeShardDistribution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeShardDistribution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DescribeShardDistribution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DescribeShardDistribution_Result) (*shared.DescribeShardDistributionResponse, error)
}{}

func init() {
	AdminService_DescribeShardDistribution_Helper.Args = func(
		request *shared.DescribeShardDistributionRequest,
	) *AdminService_DescribeShardDistribution_Args {
		return &AdminService_DescribeShardDistribution_Args{
			Request: request,
		}
	}

	AdminService_DescribeShardDistribution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_DescribeShardDistribution_Helper.WrapResponse = func(success *shared.DescribeShardDistributionResponse, err error) (*AdminService_DescribeShardDistribution_Result, error) {
		if err == nil {
			return &AdminService_DescribeShardDistribution_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeShardDistribution_Result.InternalServiceError")
			}
			return &AdminService_DescribeShardDistribution_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_DescribeShardDistribution_Helper.UnwrapResponse = func(result *AdminService_DescribeShardDistribution_Result) (success *shared.DescribeShardDistributionResponse, err error) {
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DescribeShardDistribution_Result represents the result of a AdminService.DescribeShardDistribution function call.
//
// The result of a DescribeShardDistribution execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DescribeShardDistribution_Result struct {
	// Value returned by DescribeShardDistribution after a successful execution.
	Success              *shared.DescribeShardDistributionResponse `json:"success,omitempty"`
	InternalServiceError *shared.InternalServiceError              `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_DescribeShardDistribution_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 *AdminService_DescribeShardDistribution_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.InternalServiceError != nil {
		w, err = v.InternalServiceError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DescribeShardDistribution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeShardDistributionResponse_Read(w wire.Value) (*shared.DescribeShardDistributionResponse, error) {
	var v shared.DescribeShardDistributionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeShardDistribution_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 AdminService_DescribeShardDistribution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeShardDistribution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeShardDistribution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _DescribeShardDistributionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeShardDistribution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DescribeShardDistribution_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeShardDistribution_Result struct could not be encoded.
func (v *AdminService_DescribeShardDistribution_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DescribeShardDistribution_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DescribeShardDistributionResponse_Decode(sr stream.Reader) (*shared.DescribeShardDistributionResponse, error) {
	var v shared.DescribeShardDistributionResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeShardDistribution_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeShardDistribution_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeShardDistribution_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _DescribeShardDistributionResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeShardDistribution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeShardDistribution_Result
// struct.
func (v *AdminService_DescribeShardDistribution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeShardDistribution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeShardDistribution_Result match the
// provided AdminService_DescribeShardDistribution_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeShardDistribution_Result) Equals(rhs *AdminService_DescribeShardDistribution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeShardDistribution_Result.
func (v *AdminService_DescribeShardDistribution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeShardDistribution_Result) GetSuccess() (o *shared.DescribeShardDistributionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DescribeShardDistribution_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeShardDistribution_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DescribeShardDistribution_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DescribeShardDistribution" for this struct.
func (v *AdminService_DescribeShardDistribution_Result) MethodName() string {
	return "DescribeShardDistribution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DescribeShardDistribution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_DescribeWorkflowExecution_Args represents the arguments for the AdminService.DescribeWorkflowExecution function.
//
// The arguments for DescribeWorkflowExecution are sent and received over the wire as this struct.
type AdminService_DescribeWorkflowExecution_Args struct {
	Request *DescribeWorkflowExecutionRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_DescribeWorkflowExecution_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 *AdminService_DescribeWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _DescribeWorkflowExecutionRequest_Read(w wire.Value) (*DescribeWorkflowExecutionRequest, error) {
	var v DescribeWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeWorkflowExecution_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 AdminService_DescribeWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeWorkflowExecution_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.Request, err = _DescribeWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_DescribeWorkflowExecution_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeWorkflowExecution_Args struct could not be encoded.
func (v *AdminService_DescribeWorkflowExecution_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _DescribeWorkflowExecutionRequest_Decode(sr stream.Reader) (*DescribeWorkflowExecutionRequest, error) {
	var v DescribeWorkflowExecutionRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeWorkflowExecution_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeWorkflowExecution_Args struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeWorkflowExecution_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _DescribeWorkflowExecutionRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeWorkflowExecution_Args
// struct.
func (v *AdminService_DescribeWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeWorkflowExecution_Args match the
// provided AdminService_DescribeWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeWorkflowExecution_Args) Equals(rhs *AdminService_DescribeWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeWorkflowExecution_Args.
func (v *AdminService_DescribeWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Args) GetRequest() (o *DescribeWorkflowExecutionRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_DescribeWorkflowExecution_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "DescribeWorkflowExecution" for this struct.
func (v *AdminService_DescribeWorkflowExecution_Args) MethodName() string {
	return "DescribeWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_DescribeWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_DescribeWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.DescribeWorkflowExecution
// function.
var AdminService_DescribeWorkflowExecution_Helper = struct {
	// Args accepts the parameters of DescribeWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		request *DescribeWorkflowExecutionRequest,
	) *AdminService_DescribeWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by DescribeWorkflowExecution.
	//
	// An error can be thrown by DescribeWorkflowExecution 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 DescribeWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeWorkflowExecution
	//
	//   value, err := DescribeWorkflowExecution(args)
	//   result, err := AdminService_DescribeWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*DescribeWorkflowExecutionResponse, error) (*AdminService_DescribeWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for DescribeWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_DescribeWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_DescribeWorkflowExecution_Result) (*DescribeWorkflowExecutionResponse, error)
}{}

func init() {
	AdminService_DescribeWorkflowExecution_Helper.Args = func(
		request *DescribeWorkflowExecutionRequest,
	) *AdminService_DescribeWorkflowExecution_Args {
		return &AdminService_DescribeWorkflowExecution_Args{
			Request: request,
		}
	}

	AdminService_DescribeWorkflowExecution_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 *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_DescribeWorkflowExecution_Helper.WrapResponse = func(success *DescribeWorkflowExecutionResponse, err error) (*AdminService_DescribeWorkflowExecution_Result, error) {
		if err == nil {
			return &AdminService_DescribeWorkflowExecution_Result{Success: success}, 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 AdminService_DescribeWorkflowExecution_Result.BadRequestError")
			}
			return &AdminService_DescribeWorkflowExecution_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeWorkflowExecution_Result.InternalServiceError")
			}
			return &AdminService_DescribeWorkflowExecution_Result{InternalServiceError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeWorkflowExecution_Result.EntityNotExistError")
			}
			return &AdminService_DescribeWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_DescribeWorkflowExecution_Result.AccessDeniedError")
			}
			return &AdminService_DescribeWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_DescribeWorkflowExecution_Helper.UnwrapResponse = func(result *AdminService_DescribeWorkflowExecution_Result) (success *DescribeWorkflowExecutionResponse, 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.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_DescribeWorkflowExecution_Result represents the result of a AdminService.DescribeWorkflowExecution function call.
//
// The result of a DescribeWorkflowExecution execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_DescribeWorkflowExecution_Result struct {
	// Value returned by DescribeWorkflowExecution after a successful execution.
	Success              *DescribeWorkflowExecutionResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError            `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError       `json:"internalServiceError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError       `json:"entityNotExistError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError          `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_DescribeWorkflowExecution_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 *AdminService_DescribeWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeWorkflowExecutionResponse_Read(w wire.Value) (*DescribeWorkflowExecutionResponse, error) {
	var v DescribeWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_DescribeWorkflowExecution_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 AdminService_DescribeWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_DescribeWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_DescribeWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _DescribeWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_DescribeWorkflowExecution_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_DescribeWorkflowExecution_Result struct could not be encoded.
func (v *AdminService_DescribeWorkflowExecution_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DescribeWorkflowExecutionResponse_Decode(sr stream.Reader) (*DescribeWorkflowExecutionResponse, error) {
	var v DescribeWorkflowExecutionResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_DescribeWorkflowExecution_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_DescribeWorkflowExecution_Result struct could not be generated from the wire
// representation.
func (v *AdminService_DescribeWorkflowExecution_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _DescribeWorkflowExecutionResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_DescribeWorkflowExecution_Result
// struct.
func (v *AdminService_DescribeWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_DescribeWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_DescribeWorkflowExecution_Result match the
// provided AdminService_DescribeWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *AdminService_DescribeWorkflowExecution_Result) Equals(rhs *AdminService_DescribeWorkflowExecution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_DescribeWorkflowExecution_Result.
func (v *AdminService_DescribeWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Result) GetSuccess() (o *DescribeWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_DescribeWorkflowExecution_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_DescribeWorkflowExecution_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_DescribeWorkflowExecution_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_DescribeWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_DescribeWorkflowExecution_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_DescribeWorkflowExecution_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "DescribeWorkflowExecution" for this struct.
func (v *AdminService_DescribeWorkflowExecution_Result) MethodName() string {
	return "DescribeWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_DescribeWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetCrossClusterTasks_Args represents the arguments for the AdminService.GetCrossClusterTasks function.
//
// The arguments for GetCrossClusterTasks are sent and received over the wire as this struct.
type AdminService_GetCrossClusterTasks_Args struct {
	Request *shared.GetCrossClusterTasksRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetCrossClusterTasks_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 *AdminService_GetCrossClusterTasks_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetCrossClusterTasksRequest_Read(w wire.Value) (*shared.GetCrossClusterTasksRequest, error) {
	var v shared.GetCrossClusterTasksRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetCrossClusterTasks_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 AdminService_GetCrossClusterTasks_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetCrossClusterTasks_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetCrossClusterTasks_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.Request, err = _GetCrossClusterTasksRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetCrossClusterTasks_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetCrossClusterTasks_Args struct could not be encoded.
func (v *AdminService_GetCrossClusterTasks_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetCrossClusterTasksRequest_Decode(sr stream.Reader) (*shared.GetCrossClusterTasksRequest, error) {
	var v shared.GetCrossClusterTasksRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetCrossClusterTasks_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetCrossClusterTasks_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetCrossClusterTasks_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetCrossClusterTasksRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetCrossClusterTasks_Args
// struct.
func (v *AdminService_GetCrossClusterTasks_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetCrossClusterTasks_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetCrossClusterTasks_Args match the
// provided AdminService_GetCrossClusterTasks_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetCrossClusterTasks_Args) Equals(rhs *AdminService_GetCrossClusterTasks_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetCrossClusterTasks_Args.
func (v *AdminService_GetCrossClusterTasks_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetCrossClusterTasks_Args) GetRequest() (o *shared.GetCrossClusterTasksRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetCrossClusterTasks_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetCrossClusterTasks" for this struct.
func (v *AdminService_GetCrossClusterTasks_Args) MethodName() string {
	return "GetCrossClusterTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetCrossClusterTasks_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetCrossClusterTasks_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetCrossClusterTasks
// function.
var AdminService_GetCrossClusterTasks_Helper = struct {
	// Args accepts the parameters of GetCrossClusterTasks in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.GetCrossClusterTasksRequest,
	) *AdminService_GetCrossClusterTasks_Args

	// IsException returns true if the given error can be thrown
	// by GetCrossClusterTasks.
	//
	// An error can be thrown by GetCrossClusterTasks 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 GetCrossClusterTasks
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetCrossClusterTasks into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetCrossClusterTasks
	//
	//   value, err := GetCrossClusterTasks(args)
	//   result, err := AdminService_GetCrossClusterTasks_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetCrossClusterTasks: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.GetCrossClusterTasksResponse, error) (*AdminService_GetCrossClusterTasks_Result, error)

	// UnwrapResponse takes the result struct for GetCrossClusterTasks
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetCrossClusterTasks threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetCrossClusterTasks_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetCrossClusterTasks_Result) (*shared.GetCrossClusterTasksResponse, error)
}{}

func init() {
	AdminService_GetCrossClusterTasks_Helper.Args = func(
		request *shared.GetCrossClusterTasksRequest,
	) *AdminService_GetCrossClusterTasks_Args {
		return &AdminService_GetCrossClusterTasks_Args{
			Request: request,
		}
	}

	AdminService_GetCrossClusterTasks_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_GetCrossClusterTasks_Helper.WrapResponse = func(success *shared.GetCrossClusterTasksResponse, err error) (*AdminService_GetCrossClusterTasks_Result, error) {
		if err == nil {
			return &AdminService_GetCrossClusterTasks_Result{Success: success}, 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 AdminService_GetCrossClusterTasks_Result.BadRequestError")
			}
			return &AdminService_GetCrossClusterTasks_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetCrossClusterTasks_Result.InternalServiceError")
			}
			return &AdminService_GetCrossClusterTasks_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetCrossClusterTasks_Result.ServiceBusyError")
			}
			return &AdminService_GetCrossClusterTasks_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_GetCrossClusterTasks_Helper.UnwrapResponse = func(result *AdminService_GetCrossClusterTasks_Result) (success *shared.GetCrossClusterTasksResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetCrossClusterTasks_Result represents the result of a AdminService.GetCrossClusterTasks function call.
//
// The result of a GetCrossClusterTasks execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetCrossClusterTasks_Result struct {
	// Value returned by GetCrossClusterTasks after a successful execution.
	Success              *shared.GetCrossClusterTasksResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError              `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError         `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError             `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_GetCrossClusterTasks_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 *AdminService_GetCrossClusterTasks_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetCrossClusterTasks_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetCrossClusterTasksResponse_Read(w wire.Value) (*shared.GetCrossClusterTasksResponse, error) {
	var v shared.GetCrossClusterTasksResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetCrossClusterTasks_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 AdminService_GetCrossClusterTasks_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetCrossClusterTasks_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetCrossClusterTasks_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetCrossClusterTasksResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetCrossClusterTasks_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetCrossClusterTasks_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetCrossClusterTasks_Result struct could not be encoded.
func (v *AdminService_GetCrossClusterTasks_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetCrossClusterTasks_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetCrossClusterTasksResponse_Decode(sr stream.Reader) (*shared.GetCrossClusterTasksResponse, error) {
	var v shared.GetCrossClusterTasksResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetCrossClusterTasks_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetCrossClusterTasks_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetCrossClusterTasks_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetCrossClusterTasksResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetCrossClusterTasks_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetCrossClusterTasks_Result
// struct.
func (v *AdminService_GetCrossClusterTasks_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_GetCrossClusterTasks_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetCrossClusterTasks_Result match the
// provided AdminService_GetCrossClusterTasks_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetCrossClusterTasks_Result) Equals(rhs *AdminService_GetCrossClusterTasks_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.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 AdminService_GetCrossClusterTasks_Result.
func (v *AdminService_GetCrossClusterTasks_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetCrossClusterTasks_Result) GetSuccess() (o *shared.GetCrossClusterTasksResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetCrossClusterTasks_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetCrossClusterTasks_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetCrossClusterTasks_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetCrossClusterTasks_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_GetCrossClusterTasks_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetCrossClusterTasks_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_GetCrossClusterTasks_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetCrossClusterTasks" for this struct.
func (v *AdminService_GetCrossClusterTasks_Result) MethodName() string {
	return "GetCrossClusterTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetCrossClusterTasks_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetDLQReplicationMessages_Args represents the arguments for the AdminService.GetDLQReplicationMessages function.
//
// The arguments for GetDLQReplicationMessages are sent and received over the wire as this struct.
type AdminService_GetDLQReplicationMessages_Args struct {
	Request *replicator.GetDLQReplicationMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetDLQReplicationMessages_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 *AdminService_GetDLQReplicationMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetDLQReplicationMessagesRequest_Read(w wire.Value) (*replicator.GetDLQReplicationMessagesRequest, error) {
	var v replicator.GetDLQReplicationMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDLQReplicationMessages_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 AdminService_GetDLQReplicationMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDLQReplicationMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDLQReplicationMessages_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.Request, err = _GetDLQReplicationMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetDLQReplicationMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDLQReplicationMessages_Args struct could not be encoded.
func (v *AdminService_GetDLQReplicationMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetDLQReplicationMessagesRequest_Decode(sr stream.Reader) (*replicator.GetDLQReplicationMessagesRequest, error) {
	var v replicator.GetDLQReplicationMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDLQReplicationMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDLQReplicationMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetDLQReplicationMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetDLQReplicationMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDLQReplicationMessages_Args
// struct.
func (v *AdminService_GetDLQReplicationMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetDLQReplicationMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDLQReplicationMessages_Args match the
// provided AdminService_GetDLQReplicationMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetDLQReplicationMessages_Args) Equals(rhs *AdminService_GetDLQReplicationMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDLQReplicationMessages_Args.
func (v *AdminService_GetDLQReplicationMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDLQReplicationMessages_Args) GetRequest() (o *replicator.GetDLQReplicationMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetDLQReplicationMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetDLQReplicationMessages" for this struct.
func (v *AdminService_GetDLQReplicationMessages_Args) MethodName() string {
	return "GetDLQReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetDLQReplicationMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetDLQReplicationMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetDLQReplicationMessages
// function.
var AdminService_GetDLQReplicationMessages_Helper = struct {
	// Args accepts the parameters of GetDLQReplicationMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.GetDLQReplicationMessagesRequest,
	) *AdminService_GetDLQReplicationMessages_Args

	// IsException returns true if the given error can be thrown
	// by GetDLQReplicationMessages.
	//
	// An error can be thrown by GetDLQReplicationMessages 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 GetDLQReplicationMessages
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetDLQReplicationMessages into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetDLQReplicationMessages
	//
	//   value, err := GetDLQReplicationMessages(args)
	//   result, err := AdminService_GetDLQReplicationMessages_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetDLQReplicationMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*replicator.GetDLQReplicationMessagesResponse, error) (*AdminService_GetDLQReplicationMessages_Result, error)

	// UnwrapResponse takes the result struct for GetDLQReplicationMessages
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetDLQReplicationMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetDLQReplicationMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetDLQReplicationMessages_Result) (*replicator.GetDLQReplicationMessagesResponse, error)
}{}

func init() {
	AdminService_GetDLQReplicationMessages_Helper.Args = func(
		request *replicator.GetDLQReplicationMessagesRequest,
	) *AdminService_GetDLQReplicationMessages_Args {
		return &AdminService_GetDLQReplicationMessages_Args{
			Request: request,
		}
	}

	AdminService_GetDLQReplicationMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_GetDLQReplicationMessages_Helper.WrapResponse = func(success *replicator.GetDLQReplicationMessagesResponse, err error) (*AdminService_GetDLQReplicationMessages_Result, error) {
		if err == nil {
			return &AdminService_GetDLQReplicationMessages_Result{Success: success}, 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 AdminService_GetDLQReplicationMessages_Result.BadRequestError")
			}
			return &AdminService_GetDLQReplicationMessages_Result{BadRequestError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetDLQReplicationMessages_Result.ServiceBusyError")
			}
			return &AdminService_GetDLQReplicationMessages_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_GetDLQReplicationMessages_Helper.UnwrapResponse = func(result *AdminService_GetDLQReplicationMessages_Result) (success *replicator.GetDLQReplicationMessagesResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetDLQReplicationMessages_Result represents the result of a AdminService.GetDLQReplicationMessages function call.
//
// The result of a GetDLQReplicationMessages execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetDLQReplicationMessages_Result struct {
	// Value returned by GetDLQReplicationMessages after a successful execution.
	Success          *replicator.GetDLQReplicationMessagesResponse `json:"success,omitempty"`
	BadRequestError  *shared.BadRequestError                       `json:"badRequestError,omitempty"`
	ServiceBusyError *shared.ServiceBusyError                      `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_GetDLQReplicationMessages_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 *AdminService_GetDLQReplicationMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetDLQReplicationMessages_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetDLQReplicationMessagesResponse_Read(w wire.Value) (*replicator.GetDLQReplicationMessagesResponse, error) {
	var v replicator.GetDLQReplicationMessagesResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDLQReplicationMessages_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 AdminService_GetDLQReplicationMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDLQReplicationMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDLQReplicationMessages_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetDLQReplicationMessagesResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDLQReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetDLQReplicationMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDLQReplicationMessages_Result struct could not be encoded.
func (v *AdminService_GetDLQReplicationMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetDLQReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetDLQReplicationMessagesResponse_Decode(sr stream.Reader) (*replicator.GetDLQReplicationMessagesResponse, error) {
	var v replicator.GetDLQReplicationMessagesResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDLQReplicationMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDLQReplicationMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetDLQReplicationMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetDLQReplicationMessagesResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDLQReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDLQReplicationMessages_Result
// struct.
func (v *AdminService_GetDLQReplicationMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_GetDLQReplicationMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDLQReplicationMessages_Result match the
// provided AdminService_GetDLQReplicationMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetDLQReplicationMessages_Result) Equals(rhs *AdminService_GetDLQReplicationMessages_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		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 AdminService_GetDLQReplicationMessages_Result.
func (v *AdminService_GetDLQReplicationMessages_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDLQReplicationMessages_Result) GetSuccess() (o *replicator.GetDLQReplicationMessagesResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetDLQReplicationMessages_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDLQReplicationMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetDLQReplicationMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDLQReplicationMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_GetDLQReplicationMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetDLQReplicationMessages" for this struct.
func (v *AdminService_GetDLQReplicationMessages_Result) MethodName() string {
	return "GetDLQReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetDLQReplicationMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetDomainAsyncWorkflowConfiguraton_Args represents the arguments for the AdminService.GetDomainAsyncWorkflowConfiguraton function.
//
// The arguments for GetDomainAsyncWorkflowConfiguraton are sent and received over the wire as this struct.
type AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct {
	Request *GetDomainAsyncWorkflowConfiguratonRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetDomainAsyncWorkflowConfiguraton_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 *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetDomainAsyncWorkflowConfiguratonRequest_Read(w wire.Value) (*GetDomainAsyncWorkflowConfiguratonRequest, error) {
	var v GetDomainAsyncWorkflowConfiguratonRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainAsyncWorkflowConfiguraton_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 AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainAsyncWorkflowConfiguraton_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_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.Request, err = _GetDomainAsyncWorkflowConfiguratonRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct could not be encoded.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetDomainAsyncWorkflowConfiguratonRequest_Decode(sr stream.Reader) (*GetDomainAsyncWorkflowConfiguratonRequest, error) {
	var v GetDomainAsyncWorkflowConfiguratonRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainAsyncWorkflowConfiguraton_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetDomainAsyncWorkflowConfiguratonRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainAsyncWorkflowConfiguraton_Args
// struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainAsyncWorkflowConfiguraton_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainAsyncWorkflowConfiguraton_Args match the
// provided AdminService_GetDomainAsyncWorkflowConfiguraton_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) Equals(rhs *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainAsyncWorkflowConfiguraton_Args.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) GetRequest() (o *GetDomainAsyncWorkflowConfiguratonRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetDomainAsyncWorkflowConfiguraton" for this struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) MethodName() string {
	return "GetDomainAsyncWorkflowConfiguraton"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetDomainAsyncWorkflowConfiguraton_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetDomainAsyncWorkflowConfiguraton
// function.
var AdminService_GetDomainAsyncWorkflowConfiguraton_Helper = struct {
	// Args accepts the parameters of GetDomainAsyncWorkflowConfiguraton in-order and returns
	// the arguments struct for the function.
	Args func(
		request *GetDomainAsyncWorkflowConfiguratonRequest,
	) *AdminService_GetDomainAsyncWorkflowConfiguraton_Args

	// IsException returns true if the given error can be thrown
	// by GetDomainAsyncWorkflowConfiguraton.
	//
	// An error can be thrown by GetDomainAsyncWorkflowConfiguraton 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 GetDomainAsyncWorkflowConfiguraton
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetDomainAsyncWorkflowConfiguraton into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetDomainAsyncWorkflowConfiguraton
	//
	//   value, err := GetDomainAsyncWorkflowConfiguraton(args)
	//   result, err := AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetDomainAsyncWorkflowConfiguraton: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*GetDomainAsyncWorkflowConfiguratonResponse, error) (*AdminService_GetDomainAsyncWorkflowConfiguraton_Result, error)

	// UnwrapResponse takes the result struct for GetDomainAsyncWorkflowConfiguraton
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetDomainAsyncWorkflowConfiguraton threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetDomainAsyncWorkflowConfiguraton_Result) (*GetDomainAsyncWorkflowConfiguratonResponse, error)
}{}

func init() {
	AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.Args = func(
		request *GetDomainAsyncWorkflowConfiguratonRequest,
	) *AdminService_GetDomainAsyncWorkflowConfiguraton_Args {
		return &AdminService_GetDomainAsyncWorkflowConfiguraton_Args{
			Request: request,
		}
	}

	AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.WrapResponse = func(success *GetDomainAsyncWorkflowConfiguratonResponse, err error) (*AdminService_GetDomainAsyncWorkflowConfiguraton_Result, error) {
		if err == nil {
			return &AdminService_GetDomainAsyncWorkflowConfiguraton_Result{Success: success}, 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 AdminService_GetDomainAsyncWorkflowConfiguraton_Result.BadRequestError")
			}
			return &AdminService_GetDomainAsyncWorkflowConfiguraton_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.UnwrapResponse = func(result *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) (success *GetDomainAsyncWorkflowConfiguratonResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetDomainAsyncWorkflowConfiguraton_Result represents the result of a AdminService.GetDomainAsyncWorkflowConfiguraton function call.
//
// The result of a GetDomainAsyncWorkflowConfiguraton execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct {
	// Value returned by GetDomainAsyncWorkflowConfiguraton after a successful execution.
	Success         *GetDomainAsyncWorkflowConfiguratonResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError                     `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_GetDomainAsyncWorkflowConfiguraton_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 *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetDomainAsyncWorkflowConfiguratonResponse_Read(w wire.Value) (*GetDomainAsyncWorkflowConfiguratonResponse, error) {
	var v GetDomainAsyncWorkflowConfiguratonResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainAsyncWorkflowConfiguraton_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 AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainAsyncWorkflowConfiguraton_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetDomainAsyncWorkflowConfiguratonResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct could not be encoded.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetDomainAsyncWorkflowConfiguratonResponse_Decode(sr stream.Reader) (*GetDomainAsyncWorkflowConfiguratonResponse, error) {
	var v GetDomainAsyncWorkflowConfiguratonResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainAsyncWorkflowConfiguraton_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetDomainAsyncWorkflowConfiguratonResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainAsyncWorkflowConfiguraton_Result
// struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainAsyncWorkflowConfiguraton_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainAsyncWorkflowConfiguraton_Result match the
// provided AdminService_GetDomainAsyncWorkflowConfiguraton_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) Equals(rhs *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainAsyncWorkflowConfiguraton_Result.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) GetSuccess() (o *GetDomainAsyncWorkflowConfiguratonResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetDomainAsyncWorkflowConfiguraton" for this struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) MethodName() string {
	return "GetDomainAsyncWorkflowConfiguraton"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetDomainAsyncWorkflowConfiguraton_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetDomainIsolationGroups_Args represents the arguments for the AdminService.GetDomainIsolationGroups function.
//
// The arguments for GetDomainIsolationGroups are sent and received over the wire as this struct.
type AdminService_GetDomainIsolationGroups_Args struct {
	Request *GetDomainIsolationGroupsRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetDomainIsolationGroups_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 *AdminService_GetDomainIsolationGroups_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetDomainIsolationGroupsRequest_Read(w wire.Value) (*GetDomainIsolationGroupsRequest, error) {
	var v GetDomainIsolationGroupsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainIsolationGroups_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 AdminService_GetDomainIsolationGroups_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainIsolationGroups_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainIsolationGroups_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.Request, err = _GetDomainIsolationGroupsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetDomainIsolationGroups_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainIsolationGroups_Args struct could not be encoded.
func (v *AdminService_GetDomainIsolationGroups_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetDomainIsolationGroupsRequest_Decode(sr stream.Reader) (*GetDomainIsolationGroupsRequest, error) {
	var v GetDomainIsolationGroupsRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainIsolationGroups_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainIsolationGroups_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainIsolationGroups_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetDomainIsolationGroupsRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainIsolationGroups_Args
// struct.
func (v *AdminService_GetDomainIsolationGroups_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainIsolationGroups_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainIsolationGroups_Args match the
// provided AdminService_GetDomainIsolationGroups_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainIsolationGroups_Args) Equals(rhs *AdminService_GetDomainIsolationGroups_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainIsolationGroups_Args.
func (v *AdminService_GetDomainIsolationGroups_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainIsolationGroups_Args) GetRequest() (o *GetDomainIsolationGroupsRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetDomainIsolationGroups_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetDomainIsolationGroups" for this struct.
func (v *AdminService_GetDomainIsolationGroups_Args) MethodName() string {
	return "GetDomainIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetDomainIsolationGroups_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetDomainIsolationGroups_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetDomainIsolationGroups
// function.
var AdminService_GetDomainIsolationGroups_Helper = struct {
	// Args accepts the parameters of GetDomainIsolationGroups in-order and returns
	// the arguments struct for the function.
	Args func(
		request *GetDomainIsolationGroupsRequest,
	) *AdminService_GetDomainIsolationGroups_Args

	// IsException returns true if the given error can be thrown
	// by GetDomainIsolationGroups.
	//
	// An error can be thrown by GetDomainIsolationGroups 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 GetDomainIsolationGroups
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetDomainIsolationGroups into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetDomainIsolationGroups
	//
	//   value, err := GetDomainIsolationGroups(args)
	//   result, err := AdminService_GetDomainIsolationGroups_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetDomainIsolationGroups: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*GetDomainIsolationGroupsResponse, error) (*AdminService_GetDomainIsolationGroups_Result, error)

	// UnwrapResponse takes the result struct for GetDomainIsolationGroups
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetDomainIsolationGroups threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetDomainIsolationGroups_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetDomainIsolationGroups_Result) (*GetDomainIsolationGroupsResponse, error)
}{}

func init() {
	AdminService_GetDomainIsolationGroups_Helper.Args = func(
		request *GetDomainIsolationGroupsRequest,
	) *AdminService_GetDomainIsolationGroups_Args {
		return &AdminService_GetDomainIsolationGroups_Args{
			Request: request,
		}
	}

	AdminService_GetDomainIsolationGroups_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_GetDomainIsolationGroups_Helper.WrapResponse = func(success *GetDomainIsolationGroupsResponse, err error) (*AdminService_GetDomainIsolationGroups_Result, error) {
		if err == nil {
			return &AdminService_GetDomainIsolationGroups_Result{Success: success}, 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 AdminService_GetDomainIsolationGroups_Result.BadRequestError")
			}
			return &AdminService_GetDomainIsolationGroups_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_GetDomainIsolationGroups_Helper.UnwrapResponse = func(result *AdminService_GetDomainIsolationGroups_Result) (success *GetDomainIsolationGroupsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetDomainIsolationGroups_Result represents the result of a AdminService.GetDomainIsolationGroups function call.
//
// The result of a GetDomainIsolationGroups execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetDomainIsolationGroups_Result struct {
	// Value returned by GetDomainIsolationGroups after a successful execution.
	Success         *GetDomainIsolationGroupsResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError           `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_GetDomainIsolationGroups_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 *AdminService_GetDomainIsolationGroups_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetDomainIsolationGroups_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetDomainIsolationGroupsResponse_Read(w wire.Value) (*GetDomainIsolationGroupsResponse, error) {
	var v GetDomainIsolationGroupsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainIsolationGroups_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 AdminService_GetDomainIsolationGroups_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainIsolationGroups_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainIsolationGroups_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetDomainIsolationGroupsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetDomainIsolationGroups_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainIsolationGroups_Result struct could not be encoded.
func (v *AdminService_GetDomainIsolationGroups_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetDomainIsolationGroupsResponse_Decode(sr stream.Reader) (*GetDomainIsolationGroupsResponse, error) {
	var v GetDomainIsolationGroupsResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainIsolationGroups_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainIsolationGroups_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainIsolationGroups_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetDomainIsolationGroupsResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainIsolationGroups_Result
// struct.
func (v *AdminService_GetDomainIsolationGroups_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainIsolationGroups_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainIsolationGroups_Result match the
// provided AdminService_GetDomainIsolationGroups_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainIsolationGroups_Result) Equals(rhs *AdminService_GetDomainIsolationGroups_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainIsolationGroups_Result.
func (v *AdminService_GetDomainIsolationGroups_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainIsolationGroups_Result) GetSuccess() (o *GetDomainIsolationGroupsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetDomainIsolationGroups_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainIsolationGroups_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetDomainIsolationGroups_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetDomainIsolationGroups" for this struct.
func (v *AdminService_GetDomainIsolationGroups_Result) MethodName() string {
	return "GetDomainIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetDomainIsolationGroups_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetDomainReplicationMessages_Args represents the arguments for the AdminService.GetDomainReplicationMessages function.
//
// The arguments for GetDomainReplicationMessages are sent and received over the wire as this struct.
type AdminService_GetDomainReplicationMessages_Args struct {
	Request *replicator.GetDomainReplicationMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetDomainReplicationMessages_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 *AdminService_GetDomainReplicationMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetDomainReplicationMessagesRequest_Read(w wire.Value) (*replicator.GetDomainReplicationMessagesRequest, error) {
	var v replicator.GetDomainReplicationMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainReplicationMessages_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 AdminService_GetDomainReplicationMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainReplicationMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainReplicationMessages_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.Request, err = _GetDomainReplicationMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetDomainReplicationMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainReplicationMessages_Args struct could not be encoded.
func (v *AdminService_GetDomainReplicationMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetDomainReplicationMessagesRequest_Decode(sr stream.Reader) (*replicator.GetDomainReplicationMessagesRequest, error) {
	var v replicator.GetDomainReplicationMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainReplicationMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainReplicationMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainReplicationMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetDomainReplicationMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainReplicationMessages_Args
// struct.
func (v *AdminService_GetDomainReplicationMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainReplicationMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainReplicationMessages_Args match the
// provided AdminService_GetDomainReplicationMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainReplicationMessages_Args) Equals(rhs *AdminService_GetDomainReplicationMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainReplicationMessages_Args.
func (v *AdminService_GetDomainReplicationMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Args) GetRequest() (o *replicator.GetDomainReplicationMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetDomainReplicationMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetDomainReplicationMessages" for this struct.
func (v *AdminService_GetDomainReplicationMessages_Args) MethodName() string {
	return "GetDomainReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetDomainReplicationMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetDomainReplicationMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetDomainReplicationMessages
// function.
var AdminService_GetDomainReplicationMessages_Helper = struct {
	// Args accepts the parameters of GetDomainReplicationMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.GetDomainReplicationMessagesRequest,
	) *AdminService_GetDomainReplicationMessages_Args

	// IsException returns true if the given error can be thrown
	// by GetDomainReplicationMessages.
	//
	// An error can be thrown by GetDomainReplicationMessages 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 GetDomainReplicationMessages
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetDomainReplicationMessages into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetDomainReplicationMessages
	//
	//   value, err := GetDomainReplicationMessages(args)
	//   result, err := AdminService_GetDomainReplicationMessages_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetDomainReplicationMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*replicator.GetDomainReplicationMessagesResponse, error) (*AdminService_GetDomainReplicationMessages_Result, error)

	// UnwrapResponse takes the result struct for GetDomainReplicationMessages
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetDomainReplicationMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetDomainReplicationMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetDomainReplicationMessages_Result) (*replicator.GetDomainReplicationMessagesResponse, error)
}{}

func init() {
	AdminService_GetDomainReplicationMessages_Helper.Args = func(
		request *replicator.GetDomainReplicationMessagesRequest,
	) *AdminService_GetDomainReplicationMessages_Args {
		return &AdminService_GetDomainReplicationMessages_Args{
			Request: request,
		}
	}

	AdminService_GetDomainReplicationMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		default:
			return false
		}
	}

	AdminService_GetDomainReplicationMessages_Helper.WrapResponse = func(success *replicator.GetDomainReplicationMessagesResponse, err error) (*AdminService_GetDomainReplicationMessages_Result, error) {
		if err == nil {
			return &AdminService_GetDomainReplicationMessages_Result{Success: success}, 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 AdminService_GetDomainReplicationMessages_Result.BadRequestError")
			}
			return &AdminService_GetDomainReplicationMessages_Result{BadRequestError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetDomainReplicationMessages_Result.LimitExceededError")
			}
			return &AdminService_GetDomainReplicationMessages_Result{LimitExceededError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetDomainReplicationMessages_Result.ServiceBusyError")
			}
			return &AdminService_GetDomainReplicationMessages_Result{ServiceBusyError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetDomainReplicationMessages_Result.ClientVersionNotSupportedError")
			}
			return &AdminService_GetDomainReplicationMessages_Result{ClientVersionNotSupportedError: e}, nil
		}

		return nil, err
	}
	AdminService_GetDomainReplicationMessages_Helper.UnwrapResponse = func(result *AdminService_GetDomainReplicationMessages_Result) (success *replicator.GetDomainReplicationMessagesResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetDomainReplicationMessages_Result represents the result of a AdminService.GetDomainReplicationMessages function call.
//
// The result of a GetDomainReplicationMessages execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetDomainReplicationMessages_Result struct {
	// Value returned by GetDomainReplicationMessages after a successful execution.
	Success                        *replicator.GetDomainReplicationMessagesResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                          `json:"badRequestError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                       `json:"limitExceededError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                         `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError           `json:"clientVersionNotSupportedError,omitempty"`
}

// ToWire translates a AdminService_GetDomainReplicationMessages_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 *AdminService_GetDomainReplicationMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetDomainReplicationMessages_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetDomainReplicationMessagesResponse_Read(w wire.Value) (*replicator.GetDomainReplicationMessagesResponse, error) {
	var v replicator.GetDomainReplicationMessagesResponse
	err := v.FromWire(w)
	return &v, err
}

func _LimitExceededError_Read(w wire.Value) (*shared.LimitExceededError, error) {
	var v shared.LimitExceededError
	err := v.FromWire(w)
	return &v, err
}

func _ClientVersionNotSupportedError_Read(w wire.Value) (*shared.ClientVersionNotSupportedError, error) {
	var v shared.ClientVersionNotSupportedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDomainReplicationMessages_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 AdminService_GetDomainReplicationMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDomainReplicationMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDomainReplicationMessages_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetDomainReplicationMessagesResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetDomainReplicationMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDomainReplicationMessages_Result struct could not be encoded.
func (v *AdminService_GetDomainReplicationMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.LimitExceededError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.LimitExceededError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ClientVersionNotSupportedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 5, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ClientVersionNotSupportedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetDomainReplicationMessagesResponse_Decode(sr stream.Reader) (*replicator.GetDomainReplicationMessagesResponse, error) {
	var v replicator.GetDomainReplicationMessagesResponse
	err := v.Decode(sr)
	return &v, err
}

func _LimitExceededError_Decode(sr stream.Reader) (*shared.LimitExceededError, error) {
	var v shared.LimitExceededError
	err := v.Decode(sr)
	return &v, err
}

func _ClientVersionNotSupportedError_Decode(sr stream.Reader) (*shared.ClientVersionNotSupportedError, error) {
	var v shared.ClientVersionNotSupportedError
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDomainReplicationMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDomainReplicationMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetDomainReplicationMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetDomainReplicationMessagesResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.LimitExceededError, err = _LimitExceededError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 5 && fh.Type == wire.TStruct:
			v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDomainReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDomainReplicationMessages_Result
// struct.
func (v *AdminService_GetDomainReplicationMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		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++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}

	return fmt.Sprintf("AdminService_GetDomainReplicationMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDomainReplicationMessages_Result match the
// provided AdminService_GetDomainReplicationMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetDomainReplicationMessages_Result) Equals(rhs *AdminService_GetDomainReplicationMessages_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		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
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDomainReplicationMessages_Result.
func (v *AdminService_GetDomainReplicationMessages_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	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))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Result) GetSuccess() (o *replicator.GetDomainReplicationMessagesResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetDomainReplicationMessages_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetDomainReplicationMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
	if v != nil && v.LimitExceededError != nil {
		return v.LimitExceededError
	}

	return
}

// IsSetLimitExceededError returns true if LimitExceededError is not nil.
func (v *AdminService_GetDomainReplicationMessages_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_GetDomainReplicationMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDomainReplicationMessages_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) {
	if v != nil && v.ClientVersionNotSupportedError != nil {
		return v.ClientVersionNotSupportedError
	}

	return
}

// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil.
func (v *AdminService_GetDomainReplicationMessages_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetDomainReplicationMessages" for this struct.
func (v *AdminService_GetDomainReplicationMessages_Result) MethodName() string {
	return "GetDomainReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetDomainReplicationMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetDynamicConfig_Args represents the arguments for the AdminService.GetDynamicConfig function.
//
// The arguments for GetDynamicConfig are sent and received over the wire as this struct.
type AdminService_GetDynamicConfig_Args struct {
	Request *GetDynamicConfigRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetDynamicConfig_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 *AdminService_GetDynamicConfig_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetDynamicConfigRequest_Read(w wire.Value) (*GetDynamicConfigRequest, error) {
	var v GetDynamicConfigRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDynamicConfig_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 AdminService_GetDynamicConfig_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDynamicConfig_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDynamicConfig_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.Request, err = _GetDynamicConfigRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetDynamicConfig_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDynamicConfig_Args struct could not be encoded.
func (v *AdminService_GetDynamicConfig_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetDynamicConfigRequest_Decode(sr stream.Reader) (*GetDynamicConfigRequest, error) {
	var v GetDynamicConfigRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDynamicConfig_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDynamicConfig_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetDynamicConfig_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetDynamicConfigRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDynamicConfig_Args
// struct.
func (v *AdminService_GetDynamicConfig_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetDynamicConfig_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDynamicConfig_Args match the
// provided AdminService_GetDynamicConfig_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetDynamicConfig_Args) Equals(rhs *AdminService_GetDynamicConfig_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDynamicConfig_Args.
func (v *AdminService_GetDynamicConfig_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDynamicConfig_Args) GetRequest() (o *GetDynamicConfigRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetDynamicConfig_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetDynamicConfig" for this struct.
func (v *AdminService_GetDynamicConfig_Args) MethodName() string {
	return "GetDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetDynamicConfig_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetDynamicConfig_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetDynamicConfig
// function.
var AdminService_GetDynamicConfig_Helper = struct {
	// Args accepts the parameters of GetDynamicConfig in-order and returns
	// the arguments struct for the function.
	Args func(
		request *GetDynamicConfigRequest,
	) *AdminService_GetDynamicConfig_Args

	// IsException returns true if the given error can be thrown
	// by GetDynamicConfig.
	//
	// An error can be thrown by GetDynamicConfig 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 GetDynamicConfig
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetDynamicConfig into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetDynamicConfig
	//
	//   value, err := GetDynamicConfig(args)
	//   result, err := AdminService_GetDynamicConfig_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetDynamicConfig: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*GetDynamicConfigResponse, error) (*AdminService_GetDynamicConfig_Result, error)

	// UnwrapResponse takes the result struct for GetDynamicConfig
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetDynamicConfig threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetDynamicConfig_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetDynamicConfig_Result) (*GetDynamicConfigResponse, error)
}{}

func init() {
	AdminService_GetDynamicConfig_Helper.Args = func(
		request *GetDynamicConfigRequest,
	) *AdminService_GetDynamicConfig_Args {
		return &AdminService_GetDynamicConfig_Args{
			Request: request,
		}
	}

	AdminService_GetDynamicConfig_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_GetDynamicConfig_Helper.WrapResponse = func(success *GetDynamicConfigResponse, err error) (*AdminService_GetDynamicConfig_Result, error) {
		if err == nil {
			return &AdminService_GetDynamicConfig_Result{Success: success}, 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 AdminService_GetDynamicConfig_Result.BadRequestError")
			}
			return &AdminService_GetDynamicConfig_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetDynamicConfig_Result.InternalServiceError")
			}
			return &AdminService_GetDynamicConfig_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_GetDynamicConfig_Helper.UnwrapResponse = func(result *AdminService_GetDynamicConfig_Result) (success *GetDynamicConfigResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetDynamicConfig_Result represents the result of a AdminService.GetDynamicConfig function call.
//
// The result of a GetDynamicConfig execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetDynamicConfig_Result struct {
	// Value returned by GetDynamicConfig after a successful execution.
	Success              *GetDynamicConfigResponse    `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_GetDynamicConfig_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 *AdminService_GetDynamicConfig_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetDynamicConfig_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetDynamicConfigResponse_Read(w wire.Value) (*GetDynamicConfigResponse, error) {
	var v GetDynamicConfigResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetDynamicConfig_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 AdminService_GetDynamicConfig_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetDynamicConfig_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetDynamicConfig_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetDynamicConfigResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetDynamicConfig_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetDynamicConfig_Result struct could not be encoded.
func (v *AdminService_GetDynamicConfig_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetDynamicConfigResponse_Decode(sr stream.Reader) (*GetDynamicConfigResponse, error) {
	var v GetDynamicConfigResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetDynamicConfig_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetDynamicConfig_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetDynamicConfig_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetDynamicConfigResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetDynamicConfig_Result
// struct.
func (v *AdminService_GetDynamicConfig_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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++
	}

	return fmt.Sprintf("AdminService_GetDynamicConfig_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetDynamicConfig_Result match the
// provided AdminService_GetDynamicConfig_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetDynamicConfig_Result) Equals(rhs *AdminService_GetDynamicConfig_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetDynamicConfig_Result.
func (v *AdminService_GetDynamicConfig_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDynamicConfig_Result) GetSuccess() (o *GetDynamicConfigResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetDynamicConfig_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDynamicConfig_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetDynamicConfig_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetDynamicConfig_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_GetDynamicConfig_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetDynamicConfig" for this struct.
func (v *AdminService_GetDynamicConfig_Result) MethodName() string {
	return "GetDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetDynamicConfig_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetGlobalIsolationGroups_Args represents the arguments for the AdminService.GetGlobalIsolationGroups function.
//
// The arguments for GetGlobalIsolationGroups are sent and received over the wire as this struct.
type AdminService_GetGlobalIsolationGroups_Args struct {
	Request *GetGlobalIsolationGroupsRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetGlobalIsolationGroups_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 *AdminService_GetGlobalIsolationGroups_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetGlobalIsolationGroupsRequest_Read(w wire.Value) (*GetGlobalIsolationGroupsRequest, error) {
	var v GetGlobalIsolationGroupsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetGlobalIsolationGroups_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 AdminService_GetGlobalIsolationGroups_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetGlobalIsolationGroups_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetGlobalIsolationGroups_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.Request, err = _GetGlobalIsolationGroupsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetGlobalIsolationGroups_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetGlobalIsolationGroups_Args struct could not be encoded.
func (v *AdminService_GetGlobalIsolationGroups_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetGlobalIsolationGroupsRequest_Decode(sr stream.Reader) (*GetGlobalIsolationGroupsRequest, error) {
	var v GetGlobalIsolationGroupsRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetGlobalIsolationGroups_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetGlobalIsolationGroups_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetGlobalIsolationGroups_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetGlobalIsolationGroupsRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetGlobalIsolationGroups_Args
// struct.
func (v *AdminService_GetGlobalIsolationGroups_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetGlobalIsolationGroups_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetGlobalIsolationGroups_Args match the
// provided AdminService_GetGlobalIsolationGroups_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetGlobalIsolationGroups_Args) Equals(rhs *AdminService_GetGlobalIsolationGroups_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetGlobalIsolationGroups_Args.
func (v *AdminService_GetGlobalIsolationGroups_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetGlobalIsolationGroups_Args) GetRequest() (o *GetGlobalIsolationGroupsRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetGlobalIsolationGroups_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetGlobalIsolationGroups" for this struct.
func (v *AdminService_GetGlobalIsolationGroups_Args) MethodName() string {
	return "GetGlobalIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetGlobalIsolationGroups_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetGlobalIsolationGroups_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetGlobalIsolationGroups
// function.
var AdminService_GetGlobalIsolationGroups_Helper = struct {
	// Args accepts the parameters of GetGlobalIsolationGroups in-order and returns
	// the arguments struct for the function.
	Args func(
		request *GetGlobalIsolationGroupsRequest,
	) *AdminService_GetGlobalIsolationGroups_Args

	// IsException returns true if the given error can be thrown
	// by GetGlobalIsolationGroups.
	//
	// An error can be thrown by GetGlobalIsolationGroups 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 GetGlobalIsolationGroups
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetGlobalIsolationGroups into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetGlobalIsolationGroups
	//
	//   value, err := GetGlobalIsolationGroups(args)
	//   result, err := AdminService_GetGlobalIsolationGroups_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetGlobalIsolationGroups: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*GetGlobalIsolationGroupsResponse, error) (*AdminService_GetGlobalIsolationGroups_Result, error)

	// UnwrapResponse takes the result struct for GetGlobalIsolationGroups
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetGlobalIsolationGroups threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetGlobalIsolationGroups_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetGlobalIsolationGroups_Result) (*GetGlobalIsolationGroupsResponse, error)
}{}

func init() {
	AdminService_GetGlobalIsolationGroups_Helper.Args = func(
		request *GetGlobalIsolationGroupsRequest,
	) *AdminService_GetGlobalIsolationGroups_Args {
		return &AdminService_GetGlobalIsolationGroups_Args{
			Request: request,
		}
	}

	AdminService_GetGlobalIsolationGroups_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_GetGlobalIsolationGroups_Helper.WrapResponse = func(success *GetGlobalIsolationGroupsResponse, err error) (*AdminService_GetGlobalIsolationGroups_Result, error) {
		if err == nil {
			return &AdminService_GetGlobalIsolationGroups_Result{Success: success}, 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 AdminService_GetGlobalIsolationGroups_Result.BadRequestError")
			}
			return &AdminService_GetGlobalIsolationGroups_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_GetGlobalIsolationGroups_Helper.UnwrapResponse = func(result *AdminService_GetGlobalIsolationGroups_Result) (success *GetGlobalIsolationGroupsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetGlobalIsolationGroups_Result represents the result of a AdminService.GetGlobalIsolationGroups function call.
//
// The result of a GetGlobalIsolationGroups execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetGlobalIsolationGroups_Result struct {
	// Value returned by GetGlobalIsolationGroups after a successful execution.
	Success         *GetGlobalIsolationGroupsResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError           `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_GetGlobalIsolationGroups_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 *AdminService_GetGlobalIsolationGroups_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetGlobalIsolationGroups_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetGlobalIsolationGroupsResponse_Read(w wire.Value) (*GetGlobalIsolationGroupsResponse, error) {
	var v GetGlobalIsolationGroupsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetGlobalIsolationGroups_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 AdminService_GetGlobalIsolationGroups_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetGlobalIsolationGroups_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetGlobalIsolationGroups_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetGlobalIsolationGroupsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetGlobalIsolationGroups_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetGlobalIsolationGroups_Result struct could not be encoded.
func (v *AdminService_GetGlobalIsolationGroups_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetGlobalIsolationGroupsResponse_Decode(sr stream.Reader) (*GetGlobalIsolationGroupsResponse, error) {
	var v GetGlobalIsolationGroupsResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetGlobalIsolationGroups_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetGlobalIsolationGroups_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetGlobalIsolationGroups_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetGlobalIsolationGroupsResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetGlobalIsolationGroups_Result
// struct.
func (v *AdminService_GetGlobalIsolationGroups_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_GetGlobalIsolationGroups_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetGlobalIsolationGroups_Result match the
// provided AdminService_GetGlobalIsolationGroups_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetGlobalIsolationGroups_Result) Equals(rhs *AdminService_GetGlobalIsolationGroups_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetGlobalIsolationGroups_Result.
func (v *AdminService_GetGlobalIsolationGroups_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetGlobalIsolationGroups_Result) GetSuccess() (o *GetGlobalIsolationGroupsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetGlobalIsolationGroups_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetGlobalIsolationGroups_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetGlobalIsolationGroups_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetGlobalIsolationGroups" for this struct.
func (v *AdminService_GetGlobalIsolationGroups_Result) MethodName() string {
	return "GetGlobalIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetGlobalIsolationGroups_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetReplicationMessages_Args represents the arguments for the AdminService.GetReplicationMessages function.
//
// The arguments for GetReplicationMessages are sent and received over the wire as this struct.
type AdminService_GetReplicationMessages_Args struct {
	Request *replicator.GetReplicationMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_GetReplicationMessages_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 *AdminService_GetReplicationMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _GetReplicationMessagesRequest_Read(w wire.Value) (*replicator.GetReplicationMessagesRequest, error) {
	var v replicator.GetReplicationMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetReplicationMessages_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 AdminService_GetReplicationMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetReplicationMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetReplicationMessages_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.Request, err = _GetReplicationMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetReplicationMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetReplicationMessages_Args struct could not be encoded.
func (v *AdminService_GetReplicationMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetReplicationMessagesRequest_Decode(sr stream.Reader) (*replicator.GetReplicationMessagesRequest, error) {
	var v replicator.GetReplicationMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetReplicationMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetReplicationMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetReplicationMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _GetReplicationMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetReplicationMessages_Args
// struct.
func (v *AdminService_GetReplicationMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_GetReplicationMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetReplicationMessages_Args match the
// provided AdminService_GetReplicationMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetReplicationMessages_Args) Equals(rhs *AdminService_GetReplicationMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetReplicationMessages_Args.
func (v *AdminService_GetReplicationMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Args) GetRequest() (o *replicator.GetReplicationMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_GetReplicationMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetReplicationMessages" for this struct.
func (v *AdminService_GetReplicationMessages_Args) MethodName() string {
	return "GetReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetReplicationMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetReplicationMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetReplicationMessages
// function.
var AdminService_GetReplicationMessages_Helper = struct {
	// Args accepts the parameters of GetReplicationMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.GetReplicationMessagesRequest,
	) *AdminService_GetReplicationMessages_Args

	// IsException returns true if the given error can be thrown
	// by GetReplicationMessages.
	//
	// An error can be thrown by GetReplicationMessages 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 GetReplicationMessages
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetReplicationMessages into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetReplicationMessages
	//
	//   value, err := GetReplicationMessages(args)
	//   result, err := AdminService_GetReplicationMessages_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetReplicationMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*replicator.GetReplicationMessagesResponse, error) (*AdminService_GetReplicationMessages_Result, error)

	// UnwrapResponse takes the result struct for GetReplicationMessages
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetReplicationMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetReplicationMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetReplicationMessages_Result) (*replicator.GetReplicationMessagesResponse, error)
}{}

func init() {
	AdminService_GetReplicationMessages_Helper.Args = func(
		request *replicator.GetReplicationMessagesRequest,
	) *AdminService_GetReplicationMessages_Args {
		return &AdminService_GetReplicationMessages_Args{
			Request: request,
		}
	}

	AdminService_GetReplicationMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		default:
			return false
		}
	}

	AdminService_GetReplicationMessages_Helper.WrapResponse = func(success *replicator.GetReplicationMessagesResponse, err error) (*AdminService_GetReplicationMessages_Result, error) {
		if err == nil {
			return &AdminService_GetReplicationMessages_Result{Success: success}, 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 AdminService_GetReplicationMessages_Result.BadRequestError")
			}
			return &AdminService_GetReplicationMessages_Result{BadRequestError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetReplicationMessages_Result.LimitExceededError")
			}
			return &AdminService_GetReplicationMessages_Result{LimitExceededError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetReplicationMessages_Result.ServiceBusyError")
			}
			return &AdminService_GetReplicationMessages_Result{ServiceBusyError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetReplicationMessages_Result.ClientVersionNotSupportedError")
			}
			return &AdminService_GetReplicationMessages_Result{ClientVersionNotSupportedError: e}, nil
		}

		return nil, err
	}
	AdminService_GetReplicationMessages_Helper.UnwrapResponse = func(result *AdminService_GetReplicationMessages_Result) (success *replicator.GetReplicationMessagesResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetReplicationMessages_Result represents the result of a AdminService.GetReplicationMessages function call.
//
// The result of a GetReplicationMessages execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetReplicationMessages_Result struct {
	// Value returned by GetReplicationMessages after a successful execution.
	Success                        *replicator.GetReplicationMessagesResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                    `json:"badRequestError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                 `json:"limitExceededError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                   `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError     `json:"clientVersionNotSupportedError,omitempty"`
}

// ToWire translates a AdminService_GetReplicationMessages_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 *AdminService_GetReplicationMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetReplicationMessages_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetReplicationMessagesResponse_Read(w wire.Value) (*replicator.GetReplicationMessagesResponse, error) {
	var v replicator.GetReplicationMessagesResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetReplicationMessages_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 AdminService_GetReplicationMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetReplicationMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetReplicationMessages_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetReplicationMessagesResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetReplicationMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetReplicationMessages_Result struct could not be encoded.
func (v *AdminService_GetReplicationMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.LimitExceededError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.LimitExceededError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ClientVersionNotSupportedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 5, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ClientVersionNotSupportedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetReplicationMessagesResponse_Decode(sr stream.Reader) (*replicator.GetReplicationMessagesResponse, error) {
	var v replicator.GetReplicationMessagesResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetReplicationMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetReplicationMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetReplicationMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetReplicationMessagesResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.LimitExceededError, err = _LimitExceededError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 5 && fh.Type == wire.TStruct:
			v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetReplicationMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetReplicationMessages_Result
// struct.
func (v *AdminService_GetReplicationMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		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++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}

	return fmt.Sprintf("AdminService_GetReplicationMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetReplicationMessages_Result match the
// provided AdminService_GetReplicationMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetReplicationMessages_Result) Equals(rhs *AdminService_GetReplicationMessages_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		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
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetReplicationMessages_Result.
func (v *AdminService_GetReplicationMessages_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	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))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Result) GetSuccess() (o *replicator.GetReplicationMessagesResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetReplicationMessages_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetReplicationMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
	if v != nil && v.LimitExceededError != nil {
		return v.LimitExceededError
	}

	return
}

// IsSetLimitExceededError returns true if LimitExceededError is not nil.
func (v *AdminService_GetReplicationMessages_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_GetReplicationMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetReplicationMessages_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) {
	if v != nil && v.ClientVersionNotSupportedError != nil {
		return v.ClientVersionNotSupportedError
	}

	return
}

// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil.
func (v *AdminService_GetReplicationMessages_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetReplicationMessages" for this struct.
func (v *AdminService_GetReplicationMessages_Result) MethodName() string {
	return "GetReplicationMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetReplicationMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_GetWorkflowExecutionRawHistoryV2_Args represents the arguments for the AdminService.GetWorkflowExecutionRawHistoryV2 function.
//
// The arguments for GetWorkflowExecutionRawHistoryV2 are sent and received over the wire as this struct.
type AdminService_GetWorkflowExecutionRawHistoryV2_Args struct {
	GetRequest *GetWorkflowExecutionRawHistoryV2Request `json:"getRequest,omitempty"`
}

// ToWire translates a AdminService_GetWorkflowExecutionRawHistoryV2_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 *AdminService_GetWorkflowExecutionRawHistoryV2_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.GetRequest != nil {
		w, err = v.GetRequest.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 _GetWorkflowExecutionRawHistoryV2Request_Read(w wire.Value) (*GetWorkflowExecutionRawHistoryV2Request, error) {
	var v GetWorkflowExecutionRawHistoryV2Request
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetWorkflowExecutionRawHistoryV2_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 AdminService_GetWorkflowExecutionRawHistoryV2_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetWorkflowExecutionRawHistoryV2_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_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.GetRequest, err = _GetWorkflowExecutionRawHistoryV2Request_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_GetWorkflowExecutionRawHistoryV2_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetWorkflowExecutionRawHistoryV2_Args struct could not be encoded.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.GetRequest != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.GetRequest.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _GetWorkflowExecutionRawHistoryV2Request_Decode(sr stream.Reader) (*GetWorkflowExecutionRawHistoryV2Request, error) {
	var v GetWorkflowExecutionRawHistoryV2Request
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetWorkflowExecutionRawHistoryV2_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetWorkflowExecutionRawHistoryV2_Args struct could not be generated from the wire
// representation.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.GetRequest, err = _GetWorkflowExecutionRawHistoryV2Request_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetWorkflowExecutionRawHistoryV2_Args
// struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.GetRequest != nil {
		fields[i] = fmt.Sprintf("GetRequest: %v", v.GetRequest)
		i++
	}

	return fmt.Sprintf("AdminService_GetWorkflowExecutionRawHistoryV2_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetWorkflowExecutionRawHistoryV2_Args match the
// provided AdminService_GetWorkflowExecutionRawHistoryV2_Args.
//
// This function performs a deep comparison.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) Equals(rhs *AdminService_GetWorkflowExecutionRawHistoryV2_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.GetRequest == nil && rhs.GetRequest == nil) || (v.GetRequest != nil && rhs.GetRequest != nil && v.GetRequest.Equals(rhs.GetRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_GetWorkflowExecutionRawHistoryV2_Args.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.GetRequest != nil {
		err = multierr.Append(err, enc.AddObject("getRequest", v.GetRequest))
	}
	return err
}

// GetGetRequest returns the value of GetRequest if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) GetGetRequest() (o *GetWorkflowExecutionRawHistoryV2Request) {
	if v != nil && v.GetRequest != nil {
		return v.GetRequest
	}

	return
}

// IsSetGetRequest returns true if GetRequest is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) IsSetGetRequest() bool {
	return v != nil && v.GetRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "GetWorkflowExecutionRawHistoryV2" for this struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) MethodName() string {
	return "GetWorkflowExecutionRawHistoryV2"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_GetWorkflowExecutionRawHistoryV2_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.GetWorkflowExecutionRawHistoryV2
// function.
var AdminService_GetWorkflowExecutionRawHistoryV2_Helper = struct {
	// Args accepts the parameters of GetWorkflowExecutionRawHistoryV2 in-order and returns
	// the arguments struct for the function.
	Args func(
		getRequest *GetWorkflowExecutionRawHistoryV2Request,
	) *AdminService_GetWorkflowExecutionRawHistoryV2_Args

	// IsException returns true if the given error can be thrown
	// by GetWorkflowExecutionRawHistoryV2.
	//
	// An error can be thrown by GetWorkflowExecutionRawHistoryV2 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 GetWorkflowExecutionRawHistoryV2
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetWorkflowExecutionRawHistoryV2 into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetWorkflowExecutionRawHistoryV2
	//
	//   value, err := GetWorkflowExecutionRawHistoryV2(args)
	//   result, err := AdminService_GetWorkflowExecutionRawHistoryV2_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetWorkflowExecutionRawHistoryV2: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*GetWorkflowExecutionRawHistoryV2Response, error) (*AdminService_GetWorkflowExecutionRawHistoryV2_Result, error)

	// UnwrapResponse takes the result struct for GetWorkflowExecutionRawHistoryV2
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetWorkflowExecutionRawHistoryV2 threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_GetWorkflowExecutionRawHistoryV2_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_GetWorkflowExecutionRawHistoryV2_Result) (*GetWorkflowExecutionRawHistoryV2Response, error)
}{}

func init() {
	AdminService_GetWorkflowExecutionRawHistoryV2_Helper.Args = func(
		getRequest *GetWorkflowExecutionRawHistoryV2Request,
	) *AdminService_GetWorkflowExecutionRawHistoryV2_Args {
		return &AdminService_GetWorkflowExecutionRawHistoryV2_Args{
			GetRequest: getRequest,
		}
	}

	AdminService_GetWorkflowExecutionRawHistoryV2_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 *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_GetWorkflowExecutionRawHistoryV2_Helper.WrapResponse = func(success *GetWorkflowExecutionRawHistoryV2Response, err error) (*AdminService_GetWorkflowExecutionRawHistoryV2_Result, error) {
		if err == nil {
			return &AdminService_GetWorkflowExecutionRawHistoryV2_Result{Success: success}, 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 AdminService_GetWorkflowExecutionRawHistoryV2_Result.BadRequestError")
			}
			return &AdminService_GetWorkflowExecutionRawHistoryV2_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetWorkflowExecutionRawHistoryV2_Result.InternalServiceError")
			}
			return &AdminService_GetWorkflowExecutionRawHistoryV2_Result{InternalServiceError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetWorkflowExecutionRawHistoryV2_Result.EntityNotExistError")
			}
			return &AdminService_GetWorkflowExecutionRawHistoryV2_Result{EntityNotExistError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_GetWorkflowExecutionRawHistoryV2_Result.ServiceBusyError")
			}
			return &AdminService_GetWorkflowExecutionRawHistoryV2_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_GetWorkflowExecutionRawHistoryV2_Helper.UnwrapResponse = func(result *AdminService_GetWorkflowExecutionRawHistoryV2_Result) (success *GetWorkflowExecutionRawHistoryV2Response, 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.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_GetWorkflowExecutionRawHistoryV2_Result represents the result of a AdminService.GetWorkflowExecutionRawHistoryV2 function call.
//
// The result of a GetWorkflowExecutionRawHistoryV2 execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_GetWorkflowExecutionRawHistoryV2_Result struct {
	// Value returned by GetWorkflowExecutionRawHistoryV2 after a successful execution.
	Success              *GetWorkflowExecutionRawHistoryV2Response `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError                   `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError              `json:"internalServiceError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError              `json:"entityNotExistError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError                  `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_GetWorkflowExecutionRawHistoryV2_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 *AdminService_GetWorkflowExecutionRawHistoryV2_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_GetWorkflowExecutionRawHistoryV2_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _GetWorkflowExecutionRawHistoryV2Response_Read(w wire.Value) (*GetWorkflowExecutionRawHistoryV2Response, error) {
	var v GetWorkflowExecutionRawHistoryV2Response
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_GetWorkflowExecutionRawHistoryV2_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 AdminService_GetWorkflowExecutionRawHistoryV2_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_GetWorkflowExecutionRawHistoryV2_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _GetWorkflowExecutionRawHistoryV2Response_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetWorkflowExecutionRawHistoryV2_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_GetWorkflowExecutionRawHistoryV2_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_GetWorkflowExecutionRawHistoryV2_Result struct could not be encoded.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_GetWorkflowExecutionRawHistoryV2_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _GetWorkflowExecutionRawHistoryV2Response_Decode(sr stream.Reader) (*GetWorkflowExecutionRawHistoryV2Response, error) {
	var v GetWorkflowExecutionRawHistoryV2Response
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_GetWorkflowExecutionRawHistoryV2_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_GetWorkflowExecutionRawHistoryV2_Result struct could not be generated from the wire
// representation.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _GetWorkflowExecutionRawHistoryV2Response_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_GetWorkflowExecutionRawHistoryV2_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_GetWorkflowExecutionRawHistoryV2_Result
// struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_GetWorkflowExecutionRawHistoryV2_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_GetWorkflowExecutionRawHistoryV2_Result match the
// provided AdminService_GetWorkflowExecutionRawHistoryV2_Result.
//
// This function performs a deep comparison.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) Equals(rhs *AdminService_GetWorkflowExecutionRawHistoryV2_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.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 AdminService_GetWorkflowExecutionRawHistoryV2_Result.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) GetSuccess() (o *GetWorkflowExecutionRawHistoryV2Response) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "GetWorkflowExecutionRawHistoryV2" for this struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) MethodName() string {
	return "GetWorkflowExecutionRawHistoryV2"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_GetWorkflowExecutionRawHistoryV2_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_ListDynamicConfig_Args represents the arguments for the AdminService.ListDynamicConfig function.
//
// The arguments for ListDynamicConfig are sent and received over the wire as this struct.
type AdminService_ListDynamicConfig_Args struct {
	Request *ListDynamicConfigRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_ListDynamicConfig_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 *AdminService_ListDynamicConfig_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _ListDynamicConfigRequest_Read(w wire.Value) (*ListDynamicConfigRequest, error) {
	var v ListDynamicConfigRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ListDynamicConfig_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 AdminService_ListDynamicConfig_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ListDynamicConfig_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ListDynamicConfig_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.Request, err = _ListDynamicConfigRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_ListDynamicConfig_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ListDynamicConfig_Args struct could not be encoded.
func (v *AdminService_ListDynamicConfig_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _ListDynamicConfigRequest_Decode(sr stream.Reader) (*ListDynamicConfigRequest, error) {
	var v ListDynamicConfigRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ListDynamicConfig_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ListDynamicConfig_Args struct could not be generated from the wire
// representation.
func (v *AdminService_ListDynamicConfig_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _ListDynamicConfigRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_ListDynamicConfig_Args
// struct.
func (v *AdminService_ListDynamicConfig_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_ListDynamicConfig_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ListDynamicConfig_Args match the
// provided AdminService_ListDynamicConfig_Args.
//
// This function performs a deep comparison.
func (v *AdminService_ListDynamicConfig_Args) Equals(rhs *AdminService_ListDynamicConfig_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ListDynamicConfig_Args.
func (v *AdminService_ListDynamicConfig_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_ListDynamicConfig_Args) GetRequest() (o *ListDynamicConfigRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_ListDynamicConfig_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "ListDynamicConfig" for this struct.
func (v *AdminService_ListDynamicConfig_Args) MethodName() string {
	return "ListDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_ListDynamicConfig_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_ListDynamicConfig_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.ListDynamicConfig
// function.
var AdminService_ListDynamicConfig_Helper = struct {
	// Args accepts the parameters of ListDynamicConfig in-order and returns
	// the arguments struct for the function.
	Args func(
		request *ListDynamicConfigRequest,
	) *AdminService_ListDynamicConfig_Args

	// IsException returns true if the given error can be thrown
	// by ListDynamicConfig.
	//
	// An error can be thrown by ListDynamicConfig 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 ListDynamicConfig
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListDynamicConfig into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListDynamicConfig
	//
	//   value, err := ListDynamicConfig(args)
	//   result, err := AdminService_ListDynamicConfig_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListDynamicConfig: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*ListDynamicConfigResponse, error) (*AdminService_ListDynamicConfig_Result, error)

	// UnwrapResponse takes the result struct for ListDynamicConfig
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListDynamicConfig threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_ListDynamicConfig_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_ListDynamicConfig_Result) (*ListDynamicConfigResponse, error)
}{}

func init() {
	AdminService_ListDynamicConfig_Helper.Args = func(
		request *ListDynamicConfigRequest,
	) *AdminService_ListDynamicConfig_Args {
		return &AdminService_ListDynamicConfig_Args{
			Request: request,
		}
	}

	AdminService_ListDynamicConfig_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_ListDynamicConfig_Helper.WrapResponse = func(success *ListDynamicConfigResponse, err error) (*AdminService_ListDynamicConfig_Result, error) {
		if err == nil {
			return &AdminService_ListDynamicConfig_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ListDynamicConfig_Result.InternalServiceError")
			}
			return &AdminService_ListDynamicConfig_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_ListDynamicConfig_Helper.UnwrapResponse = func(result *AdminService_ListDynamicConfig_Result) (success *ListDynamicConfigResponse, err error) {
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_ListDynamicConfig_Result represents the result of a AdminService.ListDynamicConfig function call.
//
// The result of a ListDynamicConfig execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_ListDynamicConfig_Result struct {
	// Value returned by ListDynamicConfig after a successful execution.
	Success              *ListDynamicConfigResponse   `json:"success,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_ListDynamicConfig_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 *AdminService_ListDynamicConfig_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.InternalServiceError != nil {
		w, err = v.InternalServiceError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_ListDynamicConfig_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ListDynamicConfigResponse_Read(w wire.Value) (*ListDynamicConfigResponse, error) {
	var v ListDynamicConfigResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ListDynamicConfig_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 AdminService_ListDynamicConfig_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ListDynamicConfig_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ListDynamicConfig_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _ListDynamicConfigResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_ListDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_ListDynamicConfig_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ListDynamicConfig_Result struct could not be encoded.
func (v *AdminService_ListDynamicConfig_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_ListDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _ListDynamicConfigResponse_Decode(sr stream.Reader) (*ListDynamicConfigResponse, error) {
	var v ListDynamicConfigResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ListDynamicConfig_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ListDynamicConfig_Result struct could not be generated from the wire
// representation.
func (v *AdminService_ListDynamicConfig_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _ListDynamicConfigResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_ListDynamicConfig_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_ListDynamicConfig_Result
// struct.
func (v *AdminService_ListDynamicConfig_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}

	return fmt.Sprintf("AdminService_ListDynamicConfig_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ListDynamicConfig_Result match the
// provided AdminService_ListDynamicConfig_Result.
//
// This function performs a deep comparison.
func (v *AdminService_ListDynamicConfig_Result) Equals(rhs *AdminService_ListDynamicConfig_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ListDynamicConfig_Result.
func (v *AdminService_ListDynamicConfig_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_ListDynamicConfig_Result) GetSuccess() (o *ListDynamicConfigResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_ListDynamicConfig_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_ListDynamicConfig_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_ListDynamicConfig_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "ListDynamicConfig" for this struct.
func (v *AdminService_ListDynamicConfig_Result) MethodName() string {
	return "ListDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_ListDynamicConfig_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_MaintainCorruptWorkflow_Args represents the arguments for the AdminService.MaintainCorruptWorkflow function.
//
// The arguments for MaintainCorruptWorkflow are sent and received over the wire as this struct.
type AdminService_MaintainCorruptWorkflow_Args struct {
	Request *AdminMaintainWorkflowRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_MaintainCorruptWorkflow_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 *AdminService_MaintainCorruptWorkflow_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _AdminMaintainWorkflowRequest_Read(w wire.Value) (*AdminMaintainWorkflowRequest, error) {
	var v AdminMaintainWorkflowRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_MaintainCorruptWorkflow_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 AdminService_MaintainCorruptWorkflow_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_MaintainCorruptWorkflow_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_MaintainCorruptWorkflow_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.Request, err = _AdminMaintainWorkflowRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_MaintainCorruptWorkflow_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_MaintainCorruptWorkflow_Args struct could not be encoded.
func (v *AdminService_MaintainCorruptWorkflow_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _AdminMaintainWorkflowRequest_Decode(sr stream.Reader) (*AdminMaintainWorkflowRequest, error) {
	var v AdminMaintainWorkflowRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_MaintainCorruptWorkflow_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_MaintainCorruptWorkflow_Args struct could not be generated from the wire
// representation.
func (v *AdminService_MaintainCorruptWorkflow_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _AdminMaintainWorkflowRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_MaintainCorruptWorkflow_Args
// struct.
func (v *AdminService_MaintainCorruptWorkflow_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_MaintainCorruptWorkflow_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_MaintainCorruptWorkflow_Args match the
// provided AdminService_MaintainCorruptWorkflow_Args.
//
// This function performs a deep comparison.
func (v *AdminService_MaintainCorruptWorkflow_Args) Equals(rhs *AdminService_MaintainCorruptWorkflow_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_MaintainCorruptWorkflow_Args.
func (v *AdminService_MaintainCorruptWorkflow_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_MaintainCorruptWorkflow_Args) GetRequest() (o *AdminMaintainWorkflowRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_MaintainCorruptWorkflow_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "MaintainCorruptWorkflow" for this struct.
func (v *AdminService_MaintainCorruptWorkflow_Args) MethodName() string {
	return "MaintainCorruptWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_MaintainCorruptWorkflow_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_MaintainCorruptWorkflow_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.MaintainCorruptWorkflow
// function.
var AdminService_MaintainCorruptWorkflow_Helper = struct {
	// Args accepts the parameters of MaintainCorruptWorkflow in-order and returns
	// the arguments struct for the function.
	Args func(
		request *AdminMaintainWorkflowRequest,
	) *AdminService_MaintainCorruptWorkflow_Args

	// IsException returns true if the given error can be thrown
	// by MaintainCorruptWorkflow.
	//
	// An error can be thrown by MaintainCorruptWorkflow 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 MaintainCorruptWorkflow
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// MaintainCorruptWorkflow into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by MaintainCorruptWorkflow
	//
	//   value, err := MaintainCorruptWorkflow(args)
	//   result, err := AdminService_MaintainCorruptWorkflow_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from MaintainCorruptWorkflow: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*AdminMaintainWorkflowResponse, error) (*AdminService_MaintainCorruptWorkflow_Result, error)

	// UnwrapResponse takes the result struct for MaintainCorruptWorkflow
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if MaintainCorruptWorkflow threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_MaintainCorruptWorkflow_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_MaintainCorruptWorkflow_Result) (*AdminMaintainWorkflowResponse, error)
}{}

func init() {
	AdminService_MaintainCorruptWorkflow_Helper.Args = func(
		request *AdminMaintainWorkflowRequest,
	) *AdminService_MaintainCorruptWorkflow_Args {
		return &AdminService_MaintainCorruptWorkflow_Args{
			Request: request,
		}
	}

	AdminService_MaintainCorruptWorkflow_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_MaintainCorruptWorkflow_Helper.WrapResponse = func(success *AdminMaintainWorkflowResponse, err error) (*AdminService_MaintainCorruptWorkflow_Result, error) {
		if err == nil {
			return &AdminService_MaintainCorruptWorkflow_Result{Success: success}, 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 AdminService_MaintainCorruptWorkflow_Result.BadRequestError")
			}
			return &AdminService_MaintainCorruptWorkflow_Result{BadRequestError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_MaintainCorruptWorkflow_Result.EntityNotExistError")
			}
			return &AdminService_MaintainCorruptWorkflow_Result{EntityNotExistError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_MaintainCorruptWorkflow_Result.InternalServiceError")
			}
			return &AdminService_MaintainCorruptWorkflow_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_MaintainCorruptWorkflow_Helper.UnwrapResponse = func(result *AdminService_MaintainCorruptWorkflow_Result) (success *AdminMaintainWorkflowResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_MaintainCorruptWorkflow_Result represents the result of a AdminService.MaintainCorruptWorkflow function call.
//
// The result of a MaintainCorruptWorkflow execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_MaintainCorruptWorkflow_Result struct {
	// Value returned by MaintainCorruptWorkflow after a successful execution.
	Success              *AdminMaintainWorkflowResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError        `json:"badRequestError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError   `json:"entityNotExistError,omitempty"`
	InternalServiceError *shared.InternalServiceError   `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_MaintainCorruptWorkflow_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 *AdminService_MaintainCorruptWorkflow_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.InternalServiceError != nil {
		w, err = v.InternalServiceError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_MaintainCorruptWorkflow_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _AdminMaintainWorkflowResponse_Read(w wire.Value) (*AdminMaintainWorkflowResponse, error) {
	var v AdminMaintainWorkflowResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_MaintainCorruptWorkflow_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 AdminService_MaintainCorruptWorkflow_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_MaintainCorruptWorkflow_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_MaintainCorruptWorkflow_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _AdminMaintainWorkflowResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_MaintainCorruptWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_MaintainCorruptWorkflow_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_MaintainCorruptWorkflow_Result struct could not be encoded.
func (v *AdminService_MaintainCorruptWorkflow_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_MaintainCorruptWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _AdminMaintainWorkflowResponse_Decode(sr stream.Reader) (*AdminMaintainWorkflowResponse, error) {
	var v AdminMaintainWorkflowResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_MaintainCorruptWorkflow_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_MaintainCorruptWorkflow_Result struct could not be generated from the wire
// representation.
func (v *AdminService_MaintainCorruptWorkflow_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _AdminMaintainWorkflowResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_MaintainCorruptWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_MaintainCorruptWorkflow_Result
// struct.
func (v *AdminService_MaintainCorruptWorkflow_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}

	return fmt.Sprintf("AdminService_MaintainCorruptWorkflow_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_MaintainCorruptWorkflow_Result match the
// provided AdminService_MaintainCorruptWorkflow_Result.
//
// This function performs a deep comparison.
func (v *AdminService_MaintainCorruptWorkflow_Result) Equals(rhs *AdminService_MaintainCorruptWorkflow_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_MaintainCorruptWorkflow_Result.
func (v *AdminService_MaintainCorruptWorkflow_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_MaintainCorruptWorkflow_Result) GetSuccess() (o *AdminMaintainWorkflowResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_MaintainCorruptWorkflow_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_MaintainCorruptWorkflow_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_MaintainCorruptWorkflow_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_MaintainCorruptWorkflow_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_MaintainCorruptWorkflow_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_MaintainCorruptWorkflow_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_MaintainCorruptWorkflow_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "MaintainCorruptWorkflow" for this struct.
func (v *AdminService_MaintainCorruptWorkflow_Result) MethodName() string {
	return "MaintainCorruptWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_MaintainCorruptWorkflow_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_MergeDLQMessages_Args represents the arguments for the AdminService.MergeDLQMessages function.
//
// The arguments for MergeDLQMessages are sent and received over the wire as this struct.
type AdminService_MergeDLQMessages_Args struct {
	Request *replicator.MergeDLQMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_MergeDLQMessages_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 *AdminService_MergeDLQMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _MergeDLQMessagesRequest_Read(w wire.Value) (*replicator.MergeDLQMessagesRequest, error) {
	var v replicator.MergeDLQMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_MergeDLQMessages_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 AdminService_MergeDLQMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_MergeDLQMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_MergeDLQMessages_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.Request, err = _MergeDLQMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_MergeDLQMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_MergeDLQMessages_Args struct could not be encoded.
func (v *AdminService_MergeDLQMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _MergeDLQMessagesRequest_Decode(sr stream.Reader) (*replicator.MergeDLQMessagesRequest, error) {
	var v replicator.MergeDLQMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_MergeDLQMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_MergeDLQMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_MergeDLQMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _MergeDLQMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_MergeDLQMessages_Args
// struct.
func (v *AdminService_MergeDLQMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_MergeDLQMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_MergeDLQMessages_Args match the
// provided AdminService_MergeDLQMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_MergeDLQMessages_Args) Equals(rhs *AdminService_MergeDLQMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_MergeDLQMessages_Args.
func (v *AdminService_MergeDLQMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Args) GetRequest() (o *replicator.MergeDLQMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_MergeDLQMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "MergeDLQMessages" for this struct.
func (v *AdminService_MergeDLQMessages_Args) MethodName() string {
	return "MergeDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_MergeDLQMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_MergeDLQMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.MergeDLQMessages
// function.
var AdminService_MergeDLQMessages_Helper = struct {
	// Args accepts the parameters of MergeDLQMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.MergeDLQMessagesRequest,
	) *AdminService_MergeDLQMessages_Args

	// IsException returns true if the given error can be thrown
	// by MergeDLQMessages.
	//
	// An error can be thrown by MergeDLQMessages 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 MergeDLQMessages
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// MergeDLQMessages into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by MergeDLQMessages
	//
	//   value, err := MergeDLQMessages(args)
	//   result, err := AdminService_MergeDLQMessages_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from MergeDLQMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*replicator.MergeDLQMessagesResponse, error) (*AdminService_MergeDLQMessages_Result, error)

	// UnwrapResponse takes the result struct for MergeDLQMessages
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if MergeDLQMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_MergeDLQMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_MergeDLQMessages_Result) (*replicator.MergeDLQMessagesResponse, error)
}{}

func init() {
	AdminService_MergeDLQMessages_Helper.Args = func(
		request *replicator.MergeDLQMessagesRequest,
	) *AdminService_MergeDLQMessages_Args {
		return &AdminService_MergeDLQMessages_Args{
			Request: request,
		}
	}

	AdminService_MergeDLQMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_MergeDLQMessages_Helper.WrapResponse = func(success *replicator.MergeDLQMessagesResponse, err error) (*AdminService_MergeDLQMessages_Result, error) {
		if err == nil {
			return &AdminService_MergeDLQMessages_Result{Success: success}, 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 AdminService_MergeDLQMessages_Result.BadRequestError")
			}
			return &AdminService_MergeDLQMessages_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_MergeDLQMessages_Result.InternalServiceError")
			}
			return &AdminService_MergeDLQMessages_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_MergeDLQMessages_Result.ServiceBusyError")
			}
			return &AdminService_MergeDLQMessages_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_MergeDLQMessages_Result.EntityNotExistError")
			}
			return &AdminService_MergeDLQMessages_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_MergeDLQMessages_Helper.UnwrapResponse = func(result *AdminService_MergeDLQMessages_Result) (success *replicator.MergeDLQMessagesResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_MergeDLQMessages_Result represents the result of a AdminService.MergeDLQMessages function call.
//
// The result of a MergeDLQMessages execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_MergeDLQMessages_Result struct {
	// Value returned by MergeDLQMessages after a successful execution.
	Success              *replicator.MergeDLQMessagesResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError              `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError         `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError             `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError         `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_MergeDLQMessages_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 *AdminService_MergeDLQMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_MergeDLQMessages_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _MergeDLQMessagesResponse_Read(w wire.Value) (*replicator.MergeDLQMessagesResponse, error) {
	var v replicator.MergeDLQMessagesResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_MergeDLQMessages_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 AdminService_MergeDLQMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_MergeDLQMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_MergeDLQMessages_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _MergeDLQMessagesResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_MergeDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_MergeDLQMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_MergeDLQMessages_Result struct could not be encoded.
func (v *AdminService_MergeDLQMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_MergeDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _MergeDLQMessagesResponse_Decode(sr stream.Reader) (*replicator.MergeDLQMessagesResponse, error) {
	var v replicator.MergeDLQMessagesResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_MergeDLQMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_MergeDLQMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_MergeDLQMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _MergeDLQMessagesResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_MergeDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_MergeDLQMessages_Result
// struct.
func (v *AdminService_MergeDLQMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_MergeDLQMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_MergeDLQMessages_Result match the
// provided AdminService_MergeDLQMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_MergeDLQMessages_Result) Equals(rhs *AdminService_MergeDLQMessages_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_MergeDLQMessages_Result.
func (v *AdminService_MergeDLQMessages_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Result) GetSuccess() (o *replicator.MergeDLQMessagesResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_MergeDLQMessages_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_MergeDLQMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_MergeDLQMessages_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_MergeDLQMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_MergeDLQMessages_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_MergeDLQMessages_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "MergeDLQMessages" for this struct.
func (v *AdminService_MergeDLQMessages_Result) MethodName() string {
	return "MergeDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_MergeDLQMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_PurgeDLQMessages_Args represents the arguments for the AdminService.PurgeDLQMessages function.
//
// The arguments for PurgeDLQMessages are sent and received over the wire as this struct.
type AdminService_PurgeDLQMessages_Args struct {
	Request *replicator.PurgeDLQMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_PurgeDLQMessages_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 *AdminService_PurgeDLQMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _PurgeDLQMessagesRequest_Read(w wire.Value) (*replicator.PurgeDLQMessagesRequest, error) {
	var v replicator.PurgeDLQMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_PurgeDLQMessages_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 AdminService_PurgeDLQMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_PurgeDLQMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_PurgeDLQMessages_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.Request, err = _PurgeDLQMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_PurgeDLQMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_PurgeDLQMessages_Args struct could not be encoded.
func (v *AdminService_PurgeDLQMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _PurgeDLQMessagesRequest_Decode(sr stream.Reader) (*replicator.PurgeDLQMessagesRequest, error) {
	var v replicator.PurgeDLQMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_PurgeDLQMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_PurgeDLQMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_PurgeDLQMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _PurgeDLQMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_PurgeDLQMessages_Args
// struct.
func (v *AdminService_PurgeDLQMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_PurgeDLQMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_PurgeDLQMessages_Args match the
// provided AdminService_PurgeDLQMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_PurgeDLQMessages_Args) Equals(rhs *AdminService_PurgeDLQMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_PurgeDLQMessages_Args.
func (v *AdminService_PurgeDLQMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_PurgeDLQMessages_Args) GetRequest() (o *replicator.PurgeDLQMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_PurgeDLQMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "PurgeDLQMessages" for this struct.
func (v *AdminService_PurgeDLQMessages_Args) MethodName() string {
	return "PurgeDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_PurgeDLQMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_PurgeDLQMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.PurgeDLQMessages
// function.
var AdminService_PurgeDLQMessages_Helper = struct {
	// Args accepts the parameters of PurgeDLQMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.PurgeDLQMessagesRequest,
	) *AdminService_PurgeDLQMessages_Args

	// IsException returns true if the given error can be thrown
	// by PurgeDLQMessages.
	//
	// An error can be thrown by PurgeDLQMessages 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 PurgeDLQMessages
	// given the error returned by it. The provided error may
	// be nil if PurgeDLQMessages did not fail.
	//
	// This allows mapping errors returned by PurgeDLQMessages into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// PurgeDLQMessages
	//
	//   err := PurgeDLQMessages(args)
	//   result, err := AdminService_PurgeDLQMessages_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from PurgeDLQMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_PurgeDLQMessages_Result, error)

	// UnwrapResponse takes the result struct for PurgeDLQMessages
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if PurgeDLQMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_PurgeDLQMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_PurgeDLQMessages_Result) error
}{}

func init() {
	AdminService_PurgeDLQMessages_Helper.Args = func(
		request *replicator.PurgeDLQMessagesRequest,
	) *AdminService_PurgeDLQMessages_Args {
		return &AdminService_PurgeDLQMessages_Args{
			Request: request,
		}
	}

	AdminService_PurgeDLQMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_PurgeDLQMessages_Helper.WrapResponse = func(err error) (*AdminService_PurgeDLQMessages_Result, error) {
		if err == nil {
			return &AdminService_PurgeDLQMessages_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 AdminService_PurgeDLQMessages_Result.BadRequestError")
			}
			return &AdminService_PurgeDLQMessages_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_PurgeDLQMessages_Result.InternalServiceError")
			}
			return &AdminService_PurgeDLQMessages_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_PurgeDLQMessages_Result.ServiceBusyError")
			}
			return &AdminService_PurgeDLQMessages_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_PurgeDLQMessages_Result.EntityNotExistError")
			}
			return &AdminService_PurgeDLQMessages_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_PurgeDLQMessages_Helper.UnwrapResponse = func(result *AdminService_PurgeDLQMessages_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		return
	}

}

// AdminService_PurgeDLQMessages_Result represents the result of a AdminService.PurgeDLQMessages function call.
//
// The result of a PurgeDLQMessages execution is sent and received over the wire as this struct.
type AdminService_PurgeDLQMessages_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_PurgeDLQMessages_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 *AdminService_PurgeDLQMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_PurgeDLQMessages_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_PurgeDLQMessages_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 AdminService_PurgeDLQMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_PurgeDLQMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_PurgeDLQMessages_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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_PurgeDLQMessages_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_PurgeDLQMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_PurgeDLQMessages_Result struct could not be encoded.
func (v *AdminService_PurgeDLQMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_PurgeDLQMessages_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_PurgeDLQMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_PurgeDLQMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_PurgeDLQMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_PurgeDLQMessages_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_PurgeDLQMessages_Result
// struct.
func (v *AdminService_PurgeDLQMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_PurgeDLQMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_PurgeDLQMessages_Result match the
// provided AdminService_PurgeDLQMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_PurgeDLQMessages_Result) Equals(rhs *AdminService_PurgeDLQMessages_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_PurgeDLQMessages_Result.
func (v *AdminService_PurgeDLQMessages_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_PurgeDLQMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_PurgeDLQMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_PurgeDLQMessages_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_PurgeDLQMessages_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_PurgeDLQMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_PurgeDLQMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_PurgeDLQMessages_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_PurgeDLQMessages_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "PurgeDLQMessages" for this struct.
func (v *AdminService_PurgeDLQMessages_Result) MethodName() string {
	return "PurgeDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_PurgeDLQMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_ReadDLQMessages_Args represents the arguments for the AdminService.ReadDLQMessages function.
//
// The arguments for ReadDLQMessages are sent and received over the wire as this struct.
type AdminService_ReadDLQMessages_Args struct {
	Request *replicator.ReadDLQMessagesRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_ReadDLQMessages_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 *AdminService_ReadDLQMessages_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _ReadDLQMessagesRequest_Read(w wire.Value) (*replicator.ReadDLQMessagesRequest, error) {
	var v replicator.ReadDLQMessagesRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ReadDLQMessages_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 AdminService_ReadDLQMessages_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ReadDLQMessages_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ReadDLQMessages_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.Request, err = _ReadDLQMessagesRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_ReadDLQMessages_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ReadDLQMessages_Args struct could not be encoded.
func (v *AdminService_ReadDLQMessages_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _ReadDLQMessagesRequest_Decode(sr stream.Reader) (*replicator.ReadDLQMessagesRequest, error) {
	var v replicator.ReadDLQMessagesRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ReadDLQMessages_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ReadDLQMessages_Args struct could not be generated from the wire
// representation.
func (v *AdminService_ReadDLQMessages_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _ReadDLQMessagesRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_ReadDLQMessages_Args
// struct.
func (v *AdminService_ReadDLQMessages_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_ReadDLQMessages_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ReadDLQMessages_Args match the
// provided AdminService_ReadDLQMessages_Args.
//
// This function performs a deep comparison.
func (v *AdminService_ReadDLQMessages_Args) Equals(rhs *AdminService_ReadDLQMessages_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ReadDLQMessages_Args.
func (v *AdminService_ReadDLQMessages_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Args) GetRequest() (o *replicator.ReadDLQMessagesRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_ReadDLQMessages_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "ReadDLQMessages" for this struct.
func (v *AdminService_ReadDLQMessages_Args) MethodName() string {
	return "ReadDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_ReadDLQMessages_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_ReadDLQMessages_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.ReadDLQMessages
// function.
var AdminService_ReadDLQMessages_Helper = struct {
	// Args accepts the parameters of ReadDLQMessages in-order and returns
	// the arguments struct for the function.
	Args func(
		request *replicator.ReadDLQMessagesRequest,
	) *AdminService_ReadDLQMessages_Args

	// IsException returns true if the given error can be thrown
	// by ReadDLQMessages.
	//
	// An error can be thrown by ReadDLQMessages 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 ReadDLQMessages
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ReadDLQMessages into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ReadDLQMessages
	//
	//   value, err := ReadDLQMessages(args)
	//   result, err := AdminService_ReadDLQMessages_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ReadDLQMessages: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*replicator.ReadDLQMessagesResponse, error) (*AdminService_ReadDLQMessages_Result, error)

	// UnwrapResponse takes the result struct for ReadDLQMessages
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ReadDLQMessages threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_ReadDLQMessages_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_ReadDLQMessages_Result) (*replicator.ReadDLQMessagesResponse, error)
}{}

func init() {
	AdminService_ReadDLQMessages_Helper.Args = func(
		request *replicator.ReadDLQMessagesRequest,
	) *AdminService_ReadDLQMessages_Args {
		return &AdminService_ReadDLQMessages_Args{
			Request: request,
		}
	}

	AdminService_ReadDLQMessages_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_ReadDLQMessages_Helper.WrapResponse = func(success *replicator.ReadDLQMessagesResponse, err error) (*AdminService_ReadDLQMessages_Result, error) {
		if err == nil {
			return &AdminService_ReadDLQMessages_Result{Success: success}, 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 AdminService_ReadDLQMessages_Result.BadRequestError")
			}
			return &AdminService_ReadDLQMessages_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReadDLQMessages_Result.InternalServiceError")
			}
			return &AdminService_ReadDLQMessages_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReadDLQMessages_Result.ServiceBusyError")
			}
			return &AdminService_ReadDLQMessages_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReadDLQMessages_Result.EntityNotExistError")
			}
			return &AdminService_ReadDLQMessages_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_ReadDLQMessages_Helper.UnwrapResponse = func(result *AdminService_ReadDLQMessages_Result) (success *replicator.ReadDLQMessagesResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_ReadDLQMessages_Result represents the result of a AdminService.ReadDLQMessages function call.
//
// The result of a ReadDLQMessages execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_ReadDLQMessages_Result struct {
	// Value returned by ReadDLQMessages after a successful execution.
	Success              *replicator.ReadDLQMessagesResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError             `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError        `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError            `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError        `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_ReadDLQMessages_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 *AdminService_ReadDLQMessages_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_ReadDLQMessages_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ReadDLQMessagesResponse_Read(w wire.Value) (*replicator.ReadDLQMessagesResponse, error) {
	var v replicator.ReadDLQMessagesResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ReadDLQMessages_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 AdminService_ReadDLQMessages_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ReadDLQMessages_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ReadDLQMessages_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _ReadDLQMessagesResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_ReadDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_ReadDLQMessages_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ReadDLQMessages_Result struct could not be encoded.
func (v *AdminService_ReadDLQMessages_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_ReadDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _ReadDLQMessagesResponse_Decode(sr stream.Reader) (*replicator.ReadDLQMessagesResponse, error) {
	var v replicator.ReadDLQMessagesResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ReadDLQMessages_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ReadDLQMessages_Result struct could not be generated from the wire
// representation.
func (v *AdminService_ReadDLQMessages_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _ReadDLQMessagesResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_ReadDLQMessages_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_ReadDLQMessages_Result
// struct.
func (v *AdminService_ReadDLQMessages_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_ReadDLQMessages_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ReadDLQMessages_Result match the
// provided AdminService_ReadDLQMessages_Result.
//
// This function performs a deep comparison.
func (v *AdminService_ReadDLQMessages_Result) Equals(rhs *AdminService_ReadDLQMessages_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ReadDLQMessages_Result.
func (v *AdminService_ReadDLQMessages_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Result) GetSuccess() (o *replicator.ReadDLQMessagesResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_ReadDLQMessages_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_ReadDLQMessages_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_ReadDLQMessages_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_ReadDLQMessages_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReadDLQMessages_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_ReadDLQMessages_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "ReadDLQMessages" for this struct.
func (v *AdminService_ReadDLQMessages_Result) MethodName() string {
	return "ReadDLQMessages"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_ReadDLQMessages_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_ReapplyEvents_Args represents the arguments for the AdminService.ReapplyEvents function.
//
// The arguments for ReapplyEvents are sent and received over the wire as this struct.
type AdminService_ReapplyEvents_Args struct {
	ReapplyEventsRequest *shared.ReapplyEventsRequest `json:"reapplyEventsRequest,omitempty"`
}

// ToWire translates a AdminService_ReapplyEvents_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 *AdminService_ReapplyEvents_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ReapplyEventsRequest != nil {
		w, err = v.ReapplyEventsRequest.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 _ReapplyEventsRequest_Read(w wire.Value) (*shared.ReapplyEventsRequest, error) {
	var v shared.ReapplyEventsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ReapplyEvents_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 AdminService_ReapplyEvents_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ReapplyEvents_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ReapplyEvents_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.ReapplyEventsRequest, err = _ReapplyEventsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_ReapplyEvents_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ReapplyEvents_Args struct could not be encoded.
func (v *AdminService_ReapplyEvents_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.ReapplyEventsRequest != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ReapplyEventsRequest.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _ReapplyEventsRequest_Decode(sr stream.Reader) (*shared.ReapplyEventsRequest, error) {
	var v shared.ReapplyEventsRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ReapplyEvents_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ReapplyEvents_Args struct could not be generated from the wire
// representation.
func (v *AdminService_ReapplyEvents_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.ReapplyEventsRequest, err = _ReapplyEventsRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_ReapplyEvents_Args
// struct.
func (v *AdminService_ReapplyEvents_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ReapplyEventsRequest != nil {
		fields[i] = fmt.Sprintf("ReapplyEventsRequest: %v", v.ReapplyEventsRequest)
		i++
	}

	return fmt.Sprintf("AdminService_ReapplyEvents_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ReapplyEvents_Args match the
// provided AdminService_ReapplyEvents_Args.
//
// This function performs a deep comparison.
func (v *AdminService_ReapplyEvents_Args) Equals(rhs *AdminService_ReapplyEvents_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ReapplyEventsRequest == nil && rhs.ReapplyEventsRequest == nil) || (v.ReapplyEventsRequest != nil && rhs.ReapplyEventsRequest != nil && v.ReapplyEventsRequest.Equals(rhs.ReapplyEventsRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ReapplyEvents_Args.
func (v *AdminService_ReapplyEvents_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ReapplyEventsRequest != nil {
		err = multierr.Append(err, enc.AddObject("reapplyEventsRequest", v.ReapplyEventsRequest))
	}
	return err
}

// GetReapplyEventsRequest returns the value of ReapplyEventsRequest if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Args) GetReapplyEventsRequest() (o *shared.ReapplyEventsRequest) {
	if v != nil && v.ReapplyEventsRequest != nil {
		return v.ReapplyEventsRequest
	}

	return
}

// IsSetReapplyEventsRequest returns true if ReapplyEventsRequest is not nil.
func (v *AdminService_ReapplyEvents_Args) IsSetReapplyEventsRequest() bool {
	return v != nil && v.ReapplyEventsRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "ReapplyEvents" for this struct.
func (v *AdminService_ReapplyEvents_Args) MethodName() string {
	return "ReapplyEvents"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_ReapplyEvents_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_ReapplyEvents_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.ReapplyEvents
// function.
var AdminService_ReapplyEvents_Helper = struct {
	// Args accepts the parameters of ReapplyEvents in-order and returns
	// the arguments struct for the function.
	Args func(
		reapplyEventsRequest *shared.ReapplyEventsRequest,
	) *AdminService_ReapplyEvents_Args

	// IsException returns true if the given error can be thrown
	// by ReapplyEvents.
	//
	// An error can be thrown by ReapplyEvents 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 ReapplyEvents
	// given the error returned by it. The provided error may
	// be nil if ReapplyEvents did not fail.
	//
	// This allows mapping errors returned by ReapplyEvents into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// ReapplyEvents
	//
	//   err := ReapplyEvents(args)
	//   result, err := AdminService_ReapplyEvents_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ReapplyEvents: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_ReapplyEvents_Result, error)

	// UnwrapResponse takes the result struct for ReapplyEvents
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if ReapplyEvents threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_ReapplyEvents_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_ReapplyEvents_Result) error
}{}

func init() {
	AdminService_ReapplyEvents_Helper.Args = func(
		reapplyEventsRequest *shared.ReapplyEventsRequest,
	) *AdminService_ReapplyEvents_Args {
		return &AdminService_ReapplyEvents_Args{
			ReapplyEventsRequest: reapplyEventsRequest,
		}
	}

	AdminService_ReapplyEvents_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_ReapplyEvents_Helper.WrapResponse = func(err error) (*AdminService_ReapplyEvents_Result, error) {
		if err == nil {
			return &AdminService_ReapplyEvents_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 AdminService_ReapplyEvents_Result.BadRequestError")
			}
			return &AdminService_ReapplyEvents_Result{BadRequestError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReapplyEvents_Result.DomainNotActiveError")
			}
			return &AdminService_ReapplyEvents_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReapplyEvents_Result.LimitExceededError")
			}
			return &AdminService_ReapplyEvents_Result{LimitExceededError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReapplyEvents_Result.ServiceBusyError")
			}
			return &AdminService_ReapplyEvents_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ReapplyEvents_Result.EntityNotExistError")
			}
			return &AdminService_ReapplyEvents_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_ReapplyEvents_Helper.UnwrapResponse = func(result *AdminService_ReapplyEvents_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			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
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		return
	}

}

// AdminService_ReapplyEvents_Result represents the result of a AdminService.ReapplyEvents function call.
//
// The result of a ReapplyEvents execution is sent and received over the wire as this struct.
type AdminService_ReapplyEvents_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"`
	LimitExceededError   *shared.LimitExceededError   `json:"limitExceededError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_ReapplyEvents_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 *AdminService_ReapplyEvents_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]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.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_ReapplyEvents_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DomainNotActiveError_Read(w wire.Value) (*shared.DomainNotActiveError, error) {
	var v shared.DomainNotActiveError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ReapplyEvents_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 AdminService_ReapplyEvents_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ReapplyEvents_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ReapplyEvents_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 3:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ReapplyEvents_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_ReapplyEvents_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ReapplyEvents_Result struct could not be encoded.
func (v *AdminService_ReapplyEvents_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.DomainNotActiveError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.DomainNotActiveError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.LimitExceededError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.LimitExceededError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 5, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 6, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_ReapplyEvents_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _DomainNotActiveError_Decode(sr stream.Reader) (*shared.DomainNotActiveError, error) {
	var v shared.DomainNotActiveError
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ReapplyEvents_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ReapplyEvents_Result struct could not be generated from the wire
// representation.
func (v *AdminService_ReapplyEvents_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.DomainNotActiveError, err = _DomainNotActiveError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.LimitExceededError, err = _LimitExceededError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 5 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 6 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ReapplyEvents_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_ReapplyEvents_Result
// struct.
func (v *AdminService_ReapplyEvents_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		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++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_ReapplyEvents_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ReapplyEvents_Result match the
// provided AdminService_ReapplyEvents_Result.
//
// This function performs a deep comparison.
func (v *AdminService_ReapplyEvents_Result) Equals(rhs *AdminService_ReapplyEvents_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.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
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ReapplyEvents_Result.
func (v *AdminService_ReapplyEvents_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.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))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_ReapplyEvents_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *AdminService_ReapplyEvents_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
	if v != nil && v.LimitExceededError != nil {
		return v.LimitExceededError
	}

	return
}

// IsSetLimitExceededError returns true if LimitExceededError is not nil.
func (v *AdminService_ReapplyEvents_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_ReapplyEvents_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_ReapplyEvents_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_ReapplyEvents_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "ReapplyEvents" for this struct.
func (v *AdminService_ReapplyEvents_Result) MethodName() string {
	return "ReapplyEvents"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_ReapplyEvents_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_RefreshWorkflowTasks_Args represents the arguments for the AdminService.RefreshWorkflowTasks function.
//
// The arguments for RefreshWorkflowTasks are sent and received over the wire as this struct.
type AdminService_RefreshWorkflowTasks_Args struct {
	Request *shared.RefreshWorkflowTasksRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_RefreshWorkflowTasks_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 *AdminService_RefreshWorkflowTasks_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _RefreshWorkflowTasksRequest_Read(w wire.Value) (*shared.RefreshWorkflowTasksRequest, error) {
	var v shared.RefreshWorkflowTasksRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_RefreshWorkflowTasks_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 AdminService_RefreshWorkflowTasks_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RefreshWorkflowTasks_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RefreshWorkflowTasks_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.Request, err = _RefreshWorkflowTasksRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_RefreshWorkflowTasks_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RefreshWorkflowTasks_Args struct could not be encoded.
func (v *AdminService_RefreshWorkflowTasks_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _RefreshWorkflowTasksRequest_Decode(sr stream.Reader) (*shared.RefreshWorkflowTasksRequest, error) {
	var v shared.RefreshWorkflowTasksRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_RefreshWorkflowTasks_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RefreshWorkflowTasks_Args struct could not be generated from the wire
// representation.
func (v *AdminService_RefreshWorkflowTasks_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _RefreshWorkflowTasksRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_RefreshWorkflowTasks_Args
// struct.
func (v *AdminService_RefreshWorkflowTasks_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_RefreshWorkflowTasks_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RefreshWorkflowTasks_Args match the
// provided AdminService_RefreshWorkflowTasks_Args.
//
// This function performs a deep comparison.
func (v *AdminService_RefreshWorkflowTasks_Args) Equals(rhs *AdminService_RefreshWorkflowTasks_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RefreshWorkflowTasks_Args.
func (v *AdminService_RefreshWorkflowTasks_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_RefreshWorkflowTasks_Args) GetRequest() (o *shared.RefreshWorkflowTasksRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_RefreshWorkflowTasks_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "RefreshWorkflowTasks" for this struct.
func (v *AdminService_RefreshWorkflowTasks_Args) MethodName() string {
	return "RefreshWorkflowTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_RefreshWorkflowTasks_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_RefreshWorkflowTasks_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.RefreshWorkflowTasks
// function.
var AdminService_RefreshWorkflowTasks_Helper = struct {
	// Args accepts the parameters of RefreshWorkflowTasks in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.RefreshWorkflowTasksRequest,
	) *AdminService_RefreshWorkflowTasks_Args

	// IsException returns true if the given error can be thrown
	// by RefreshWorkflowTasks.
	//
	// An error can be thrown by RefreshWorkflowTasks 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 RefreshWorkflowTasks
	// given the error returned by it. The provided error may
	// be nil if RefreshWorkflowTasks did not fail.
	//
	// This allows mapping errors returned by RefreshWorkflowTasks into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RefreshWorkflowTasks
	//
	//   err := RefreshWorkflowTasks(args)
	//   result, err := AdminService_RefreshWorkflowTasks_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RefreshWorkflowTasks: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_RefreshWorkflowTasks_Result, error)

	// UnwrapResponse takes the result struct for RefreshWorkflowTasks
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RefreshWorkflowTasks threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_RefreshWorkflowTasks_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_RefreshWorkflowTasks_Result) error
}{}

func init() {
	AdminService_RefreshWorkflowTasks_Helper.Args = func(
		request *shared.RefreshWorkflowTasksRequest,
	) *AdminService_RefreshWorkflowTasks_Args {
		return &AdminService_RefreshWorkflowTasks_Args{
			Request: request,
		}
	}

	AdminService_RefreshWorkflowTasks_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_RefreshWorkflowTasks_Helper.WrapResponse = func(err error) (*AdminService_RefreshWorkflowTasks_Result, error) {
		if err == nil {
			return &AdminService_RefreshWorkflowTasks_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 AdminService_RefreshWorkflowTasks_Result.BadRequestError")
			}
			return &AdminService_RefreshWorkflowTasks_Result{BadRequestError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RefreshWorkflowTasks_Result.DomainNotActiveError")
			}
			return &AdminService_RefreshWorkflowTasks_Result{DomainNotActiveError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RefreshWorkflowTasks_Result.ServiceBusyError")
			}
			return &AdminService_RefreshWorkflowTasks_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RefreshWorkflowTasks_Result.EntityNotExistError")
			}
			return &AdminService_RefreshWorkflowTasks_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_RefreshWorkflowTasks_Helper.UnwrapResponse = func(result *AdminService_RefreshWorkflowTasks_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		return
	}

}

// AdminService_RefreshWorkflowTasks_Result represents the result of a AdminService.RefreshWorkflowTasks function call.
//
// The result of a RefreshWorkflowTasks execution is sent and received over the wire as this struct.
type AdminService_RefreshWorkflowTasks_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_RefreshWorkflowTasks_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 *AdminService_RefreshWorkflowTasks_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]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.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_RefreshWorkflowTasks_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 AdminService_RefreshWorkflowTasks_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RefreshWorkflowTasks_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RefreshWorkflowTasks_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.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_RefreshWorkflowTasks_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RefreshWorkflowTasks_Result struct could not be encoded.
func (v *AdminService_RefreshWorkflowTasks_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.DomainNotActiveError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.DomainNotActiveError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_RefreshWorkflowTasks_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RefreshWorkflowTasks_Result struct could not be generated from the wire
// representation.
func (v *AdminService_RefreshWorkflowTasks_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.DomainNotActiveError, err = _DomainNotActiveError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 4 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_RefreshWorkflowTasks_Result
// struct.
func (v *AdminService_RefreshWorkflowTasks_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_RefreshWorkflowTasks_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RefreshWorkflowTasks_Result match the
// provided AdminService_RefreshWorkflowTasks_Result.
//
// This function performs a deep comparison.
func (v *AdminService_RefreshWorkflowTasks_Result) Equals(rhs *AdminService_RefreshWorkflowTasks_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RefreshWorkflowTasks_Result.
func (v *AdminService_RefreshWorkflowTasks_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_RefreshWorkflowTasks_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_RefreshWorkflowTasks_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *AdminService_RefreshWorkflowTasks_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *AdminService_RefreshWorkflowTasks_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_RefreshWorkflowTasks_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_RefreshWorkflowTasks_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_RefreshWorkflowTasks_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_RefreshWorkflowTasks_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "RefreshWorkflowTasks" for this struct.
func (v *AdminService_RefreshWorkflowTasks_Result) MethodName() string {
	return "RefreshWorkflowTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_RefreshWorkflowTasks_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_RemoveTask_Args represents the arguments for the AdminService.RemoveTask function.
//
// The arguments for RemoveTask are sent and received over the wire as this struct.
type AdminService_RemoveTask_Args struct {
	Request *shared.RemoveTaskRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_RemoveTask_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 *AdminService_RemoveTask_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _RemoveTaskRequest_Read(w wire.Value) (*shared.RemoveTaskRequest, error) {
	var v shared.RemoveTaskRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_RemoveTask_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 AdminService_RemoveTask_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RemoveTask_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RemoveTask_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.Request, err = _RemoveTaskRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_RemoveTask_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RemoveTask_Args struct could not be encoded.
func (v *AdminService_RemoveTask_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _RemoveTaskRequest_Decode(sr stream.Reader) (*shared.RemoveTaskRequest, error) {
	var v shared.RemoveTaskRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_RemoveTask_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RemoveTask_Args struct could not be generated from the wire
// representation.
func (v *AdminService_RemoveTask_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _RemoveTaskRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_RemoveTask_Args
// struct.
func (v *AdminService_RemoveTask_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_RemoveTask_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RemoveTask_Args match the
// provided AdminService_RemoveTask_Args.
//
// This function performs a deep comparison.
func (v *AdminService_RemoveTask_Args) Equals(rhs *AdminService_RemoveTask_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RemoveTask_Args.
func (v *AdminService_RemoveTask_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_RemoveTask_Args) GetRequest() (o *shared.RemoveTaskRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_RemoveTask_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "RemoveTask" for this struct.
func (v *AdminService_RemoveTask_Args) MethodName() string {
	return "RemoveTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_RemoveTask_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_RemoveTask_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.RemoveTask
// function.
var AdminService_RemoveTask_Helper = struct {
	// Args accepts the parameters of RemoveTask in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.RemoveTaskRequest,
	) *AdminService_RemoveTask_Args

	// IsException returns true if the given error can be thrown
	// by RemoveTask.
	//
	// An error can be thrown by RemoveTask 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 RemoveTask
	// given the error returned by it. The provided error may
	// be nil if RemoveTask did not fail.
	//
	// This allows mapping errors returned by RemoveTask into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RemoveTask
	//
	//   err := RemoveTask(args)
	//   result, err := AdminService_RemoveTask_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RemoveTask: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_RemoveTask_Result, error)

	// UnwrapResponse takes the result struct for RemoveTask
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RemoveTask threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_RemoveTask_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_RemoveTask_Result) error
}{}

func init() {
	AdminService_RemoveTask_Helper.Args = func(
		request *shared.RemoveTaskRequest,
	) *AdminService_RemoveTask_Args {
		return &AdminService_RemoveTask_Args{
			Request: request,
		}
	}

	AdminService_RemoveTask_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_RemoveTask_Helper.WrapResponse = func(err error) (*AdminService_RemoveTask_Result, error) {
		if err == nil {
			return &AdminService_RemoveTask_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 AdminService_RemoveTask_Result.BadRequestError")
			}
			return &AdminService_RemoveTask_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RemoveTask_Result.InternalServiceError")
			}
			return &AdminService_RemoveTask_Result{InternalServiceError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RemoveTask_Result.AccessDeniedError")
			}
			return &AdminService_RemoveTask_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_RemoveTask_Helper.UnwrapResponse = func(result *AdminService_RemoveTask_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// AdminService_RemoveTask_Result represents the result of a AdminService.RemoveTask function call.
//
// The result of a RemoveTask execution is sent and received over the wire as this struct.
type AdminService_RemoveTask_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_RemoveTask_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 *AdminService_RemoveTask_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_RemoveTask_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_RemoveTask_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 AdminService_RemoveTask_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RemoveTask_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RemoveTask_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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RemoveTask_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_RemoveTask_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RemoveTask_Result struct could not be encoded.
func (v *AdminService_RemoveTask_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_RemoveTask_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_RemoveTask_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RemoveTask_Result struct could not be generated from the wire
// representation.
func (v *AdminService_RemoveTask_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RemoveTask_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_RemoveTask_Result
// struct.
func (v *AdminService_RemoveTask_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_RemoveTask_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RemoveTask_Result match the
// provided AdminService_RemoveTask_Result.
//
// This function performs a deep comparison.
func (v *AdminService_RemoveTask_Result) Equals(rhs *AdminService_RemoveTask_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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RemoveTask_Result.
func (v *AdminService_RemoveTask_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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_RemoveTask_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_RemoveTask_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_RemoveTask_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_RemoveTask_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_RemoveTask_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_RemoveTask_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "RemoveTask" for this struct.
func (v *AdminService_RemoveTask_Result) MethodName() string {
	return "RemoveTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_RemoveTask_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_ResendReplicationTasks_Args represents the arguments for the AdminService.ResendReplicationTasks function.
//
// The arguments for ResendReplicationTasks are sent and received over the wire as this struct.
type AdminService_ResendReplicationTasks_Args struct {
	Request *ResendReplicationTasksRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_ResendReplicationTasks_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 *AdminService_ResendReplicationTasks_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _ResendReplicationTasksRequest_Read(w wire.Value) (*ResendReplicationTasksRequest, error) {
	var v ResendReplicationTasksRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ResendReplicationTasks_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 AdminService_ResendReplicationTasks_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ResendReplicationTasks_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ResendReplicationTasks_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.Request, err = _ResendReplicationTasksRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_ResendReplicationTasks_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ResendReplicationTasks_Args struct could not be encoded.
func (v *AdminService_ResendReplicationTasks_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _ResendReplicationTasksRequest_Decode(sr stream.Reader) (*ResendReplicationTasksRequest, error) {
	var v ResendReplicationTasksRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ResendReplicationTasks_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ResendReplicationTasks_Args struct could not be generated from the wire
// representation.
func (v *AdminService_ResendReplicationTasks_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _ResendReplicationTasksRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_ResendReplicationTasks_Args
// struct.
func (v *AdminService_ResendReplicationTasks_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_ResendReplicationTasks_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ResendReplicationTasks_Args match the
// provided AdminService_ResendReplicationTasks_Args.
//
// This function performs a deep comparison.
func (v *AdminService_ResendReplicationTasks_Args) Equals(rhs *AdminService_ResendReplicationTasks_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ResendReplicationTasks_Args.
func (v *AdminService_ResendReplicationTasks_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_ResendReplicationTasks_Args) GetRequest() (o *ResendReplicationTasksRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_ResendReplicationTasks_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "ResendReplicationTasks" for this struct.
func (v *AdminService_ResendReplicationTasks_Args) MethodName() string {
	return "ResendReplicationTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_ResendReplicationTasks_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_ResendReplicationTasks_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.ResendReplicationTasks
// function.
var AdminService_ResendReplicationTasks_Helper = struct {
	// Args accepts the parameters of ResendReplicationTasks in-order and returns
	// the arguments struct for the function.
	Args func(
		request *ResendReplicationTasksRequest,
	) *AdminService_ResendReplicationTasks_Args

	// IsException returns true if the given error can be thrown
	// by ResendReplicationTasks.
	//
	// An error can be thrown by ResendReplicationTasks 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 ResendReplicationTasks
	// given the error returned by it. The provided error may
	// be nil if ResendReplicationTasks did not fail.
	//
	// This allows mapping errors returned by ResendReplicationTasks into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// ResendReplicationTasks
	//
	//   err := ResendReplicationTasks(args)
	//   result, err := AdminService_ResendReplicationTasks_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ResendReplicationTasks: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_ResendReplicationTasks_Result, error)

	// UnwrapResponse takes the result struct for ResendReplicationTasks
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if ResendReplicationTasks threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_ResendReplicationTasks_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_ResendReplicationTasks_Result) error
}{}

func init() {
	AdminService_ResendReplicationTasks_Helper.Args = func(
		request *ResendReplicationTasksRequest,
	) *AdminService_ResendReplicationTasks_Args {
		return &AdminService_ResendReplicationTasks_Args{
			Request: request,
		}
	}

	AdminService_ResendReplicationTasks_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		default:
			return false
		}
	}

	AdminService_ResendReplicationTasks_Helper.WrapResponse = func(err error) (*AdminService_ResendReplicationTasks_Result, error) {
		if err == nil {
			return &AdminService_ResendReplicationTasks_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 AdminService_ResendReplicationTasks_Result.BadRequestError")
			}
			return &AdminService_ResendReplicationTasks_Result{BadRequestError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ResendReplicationTasks_Result.ServiceBusyError")
			}
			return &AdminService_ResendReplicationTasks_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ResendReplicationTasks_Result.EntityNotExistError")
			}
			return &AdminService_ResendReplicationTasks_Result{EntityNotExistError: e}, nil
		}

		return nil, err
	}
	AdminService_ResendReplicationTasks_Helper.UnwrapResponse = func(result *AdminService_ResendReplicationTasks_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		return
	}

}

// AdminService_ResendReplicationTasks_Result represents the result of a AdminService.ResendReplicationTasks function call.
//
// The result of a ResendReplicationTasks execution is sent and received over the wire as this struct.
type AdminService_ResendReplicationTasks_Result struct {
	BadRequestError     *shared.BadRequestError      `json:"badRequestError,omitempty"`
	ServiceBusyError    *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
}

// ToWire translates a AdminService_ResendReplicationTasks_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 *AdminService_ResendReplicationTasks_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.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 i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_ResendReplicationTasks_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_ResendReplicationTasks_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 AdminService_ResendReplicationTasks_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ResendReplicationTasks_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ResendReplicationTasks_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.ServiceBusyError, err = _ServiceBusyError_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
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ResendReplicationTasks_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_ResendReplicationTasks_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ResendReplicationTasks_Result struct could not be encoded.
func (v *AdminService_ResendReplicationTasks_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.EntityNotExistError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.EntityNotExistError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_ResendReplicationTasks_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_ResendReplicationTasks_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ResendReplicationTasks_Result struct could not be generated from the wire
// representation.
func (v *AdminService_ResendReplicationTasks_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ResendReplicationTasks_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_ResendReplicationTasks_Result
// struct.
func (v *AdminService_ResendReplicationTasks_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}

	return fmt.Sprintf("AdminService_ResendReplicationTasks_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ResendReplicationTasks_Result match the
// provided AdminService_ResendReplicationTasks_Result.
//
// This function performs a deep comparison.
func (v *AdminService_ResendReplicationTasks_Result) Equals(rhs *AdminService_ResendReplicationTasks_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ResendReplicationTasks_Result.
func (v *AdminService_ResendReplicationTasks_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResendReplicationTasks_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_ResendReplicationTasks_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResendReplicationTasks_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_ResendReplicationTasks_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResendReplicationTasks_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *AdminService_ResendReplicationTasks_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "ResendReplicationTasks" for this struct.
func (v *AdminService_ResendReplicationTasks_Result) MethodName() string {
	return "ResendReplicationTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_ResendReplicationTasks_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_ResetQueue_Args represents the arguments for the AdminService.ResetQueue function.
//
// The arguments for ResetQueue are sent and received over the wire as this struct.
type AdminService_ResetQueue_Args struct {
	Request *shared.ResetQueueRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_ResetQueue_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 *AdminService_ResetQueue_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _ResetQueueRequest_Read(w wire.Value) (*shared.ResetQueueRequest, error) {
	var v shared.ResetQueueRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_ResetQueue_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 AdminService_ResetQueue_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ResetQueue_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ResetQueue_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.Request, err = _ResetQueueRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_ResetQueue_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ResetQueue_Args struct could not be encoded.
func (v *AdminService_ResetQueue_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _ResetQueueRequest_Decode(sr stream.Reader) (*shared.ResetQueueRequest, error) {
	var v shared.ResetQueueRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_ResetQueue_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ResetQueue_Args struct could not be generated from the wire
// representation.
func (v *AdminService_ResetQueue_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _ResetQueueRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_ResetQueue_Args
// struct.
func (v *AdminService_ResetQueue_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_ResetQueue_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ResetQueue_Args match the
// provided AdminService_ResetQueue_Args.
//
// This function performs a deep comparison.
func (v *AdminService_ResetQueue_Args) Equals(rhs *AdminService_ResetQueue_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ResetQueue_Args.
func (v *AdminService_ResetQueue_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_ResetQueue_Args) GetRequest() (o *shared.ResetQueueRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_ResetQueue_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "ResetQueue" for this struct.
func (v *AdminService_ResetQueue_Args) MethodName() string {
	return "ResetQueue"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_ResetQueue_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_ResetQueue_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.ResetQueue
// function.
var AdminService_ResetQueue_Helper = struct {
	// Args accepts the parameters of ResetQueue in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.ResetQueueRequest,
	) *AdminService_ResetQueue_Args

	// IsException returns true if the given error can be thrown
	// by ResetQueue.
	//
	// An error can be thrown by ResetQueue 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 ResetQueue
	// given the error returned by it. The provided error may
	// be nil if ResetQueue did not fail.
	//
	// This allows mapping errors returned by ResetQueue into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// ResetQueue
	//
	//   err := ResetQueue(args)
	//   result, err := AdminService_ResetQueue_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ResetQueue: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_ResetQueue_Result, error)

	// UnwrapResponse takes the result struct for ResetQueue
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if ResetQueue threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_ResetQueue_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_ResetQueue_Result) error
}{}

func init() {
	AdminService_ResetQueue_Helper.Args = func(
		request *shared.ResetQueueRequest,
	) *AdminService_ResetQueue_Args {
		return &AdminService_ResetQueue_Args{
			Request: request,
		}
	}

	AdminService_ResetQueue_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	AdminService_ResetQueue_Helper.WrapResponse = func(err error) (*AdminService_ResetQueue_Result, error) {
		if err == nil {
			return &AdminService_ResetQueue_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 AdminService_ResetQueue_Result.BadRequestError")
			}
			return &AdminService_ResetQueue_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ResetQueue_Result.InternalServiceError")
			}
			return &AdminService_ResetQueue_Result{InternalServiceError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_ResetQueue_Result.AccessDeniedError")
			}
			return &AdminService_ResetQueue_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	AdminService_ResetQueue_Helper.UnwrapResponse = func(result *AdminService_ResetQueue_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// AdminService_ResetQueue_Result represents the result of a AdminService.ResetQueue function call.
//
// The result of a ResetQueue execution is sent and received over the wire as this struct.
type AdminService_ResetQueue_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a AdminService_ResetQueue_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 *AdminService_ResetQueue_Result) ToWire() (wire.Value, error) {
	var (
		fields [3]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.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_ResetQueue_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_ResetQueue_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 AdminService_ResetQueue_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_ResetQueue_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_ResetQueue_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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ResetQueue_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_ResetQueue_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_ResetQueue_Result struct could not be encoded.
func (v *AdminService_ResetQueue_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.AccessDeniedError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.AccessDeniedError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_ResetQueue_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_ResetQueue_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_ResetQueue_Result struct could not be generated from the wire
// representation.
func (v *AdminService_ResetQueue_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.AccessDeniedError, err = _AccessDeniedError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_ResetQueue_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_ResetQueue_Result
// struct.
func (v *AdminService_ResetQueue_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [3]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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("AdminService_ResetQueue_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_ResetQueue_Result match the
// provided AdminService_ResetQueue_Result.
//
// This function performs a deep comparison.
func (v *AdminService_ResetQueue_Result) Equals(rhs *AdminService_ResetQueue_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.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_ResetQueue_Result.
func (v *AdminService_ResetQueue_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.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResetQueue_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_ResetQueue_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResetQueue_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_ResetQueue_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *AdminService_ResetQueue_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) {
	if v != nil && v.AccessDeniedError != nil {
		return v.AccessDeniedError
	}

	return
}

// IsSetAccessDeniedError returns true if AccessDeniedError is not nil.
func (v *AdminService_ResetQueue_Result) IsSetAccessDeniedError() bool {
	return v != nil && v.AccessDeniedError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "ResetQueue" for this struct.
func (v *AdminService_ResetQueue_Result) MethodName() string {
	return "ResetQueue"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_ResetQueue_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_RespondCrossClusterTasksCompleted_Args represents the arguments for the AdminService.RespondCrossClusterTasksCompleted function.
//
// The arguments for RespondCrossClusterTasksCompleted are sent and received over the wire as this struct.
type AdminService_RespondCrossClusterTasksCompleted_Args struct {
	Request *shared.RespondCrossClusterTasksCompletedRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_RespondCrossClusterTasksCompleted_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 *AdminService_RespondCrossClusterTasksCompleted_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _RespondCrossClusterTasksCompletedRequest_Read(w wire.Value) (*shared.RespondCrossClusterTasksCompletedRequest, error) {
	var v shared.RespondCrossClusterTasksCompletedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_RespondCrossClusterTasksCompleted_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 AdminService_RespondCrossClusterTasksCompleted_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RespondCrossClusterTasksCompleted_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RespondCrossClusterTasksCompleted_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.Request, err = _RespondCrossClusterTasksCompletedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_RespondCrossClusterTasksCompleted_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RespondCrossClusterTasksCompleted_Args struct could not be encoded.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _RespondCrossClusterTasksCompletedRequest_Decode(sr stream.Reader) (*shared.RespondCrossClusterTasksCompletedRequest, error) {
	var v shared.RespondCrossClusterTasksCompletedRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_RespondCrossClusterTasksCompleted_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RespondCrossClusterTasksCompleted_Args struct could not be generated from the wire
// representation.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _RespondCrossClusterTasksCompletedRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_RespondCrossClusterTasksCompleted_Args
// struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_RespondCrossClusterTasksCompleted_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RespondCrossClusterTasksCompleted_Args match the
// provided AdminService_RespondCrossClusterTasksCompleted_Args.
//
// This function performs a deep comparison.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) Equals(rhs *AdminService_RespondCrossClusterTasksCompleted_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RespondCrossClusterTasksCompleted_Args.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) GetRequest() (o *shared.RespondCrossClusterTasksCompletedRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "RespondCrossClusterTasksCompleted" for this struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) MethodName() string {
	return "RespondCrossClusterTasksCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_RespondCrossClusterTasksCompleted_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.RespondCrossClusterTasksCompleted
// function.
var AdminService_RespondCrossClusterTasksCompleted_Helper = struct {
	// Args accepts the parameters of RespondCrossClusterTasksCompleted in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.RespondCrossClusterTasksCompletedRequest,
	) *AdminService_RespondCrossClusterTasksCompleted_Args

	// IsException returns true if the given error can be thrown
	// by RespondCrossClusterTasksCompleted.
	//
	// An error can be thrown by RespondCrossClusterTasksCompleted 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 RespondCrossClusterTasksCompleted
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// RespondCrossClusterTasksCompleted into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by RespondCrossClusterTasksCompleted
	//
	//   value, err := RespondCrossClusterTasksCompleted(args)
	//   result, err := AdminService_RespondCrossClusterTasksCompleted_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondCrossClusterTasksCompleted: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.RespondCrossClusterTasksCompletedResponse, error) (*AdminService_RespondCrossClusterTasksCompleted_Result, error)

	// UnwrapResponse takes the result struct for RespondCrossClusterTasksCompleted
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if RespondCrossClusterTasksCompleted threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_RespondCrossClusterTasksCompleted_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_RespondCrossClusterTasksCompleted_Result) (*shared.RespondCrossClusterTasksCompletedResponse, error)
}{}

func init() {
	AdminService_RespondCrossClusterTasksCompleted_Helper.Args = func(
		request *shared.RespondCrossClusterTasksCompletedRequest,
	) *AdminService_RespondCrossClusterTasksCompleted_Args {
		return &AdminService_RespondCrossClusterTasksCompleted_Args{
			Request: request,
		}
	}

	AdminService_RespondCrossClusterTasksCompleted_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		default:
			return false
		}
	}

	AdminService_RespondCrossClusterTasksCompleted_Helper.WrapResponse = func(success *shared.RespondCrossClusterTasksCompletedResponse, err error) (*AdminService_RespondCrossClusterTasksCompleted_Result, error) {
		if err == nil {
			return &AdminService_RespondCrossClusterTasksCompleted_Result{Success: success}, 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 AdminService_RespondCrossClusterTasksCompleted_Result.BadRequestError")
			}
			return &AdminService_RespondCrossClusterTasksCompleted_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RespondCrossClusterTasksCompleted_Result.InternalServiceError")
			}
			return &AdminService_RespondCrossClusterTasksCompleted_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RespondCrossClusterTasksCompleted_Result.ServiceBusyError")
			}
			return &AdminService_RespondCrossClusterTasksCompleted_Result{ServiceBusyError: e}, nil
		}

		return nil, err
	}
	AdminService_RespondCrossClusterTasksCompleted_Helper.UnwrapResponse = func(result *AdminService_RespondCrossClusterTasksCompleted_Result) (success *shared.RespondCrossClusterTasksCompletedResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_RespondCrossClusterTasksCompleted_Result represents the result of a AdminService.RespondCrossClusterTasksCompleted function call.
//
// The result of a RespondCrossClusterTasksCompleted execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_RespondCrossClusterTasksCompleted_Result struct {
	// Value returned by RespondCrossClusterTasksCompleted after a successful execution.
	Success              *shared.RespondCrossClusterTasksCompletedResponse `json:"success,omitempty"`
	BadRequestError      *shared.BadRequestError                           `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError                      `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError                          `json:"serviceBusyError,omitempty"`
}

// ToWire translates a AdminService_RespondCrossClusterTasksCompleted_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 *AdminService_RespondCrossClusterTasksCompleted_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_RespondCrossClusterTasksCompleted_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _RespondCrossClusterTasksCompletedResponse_Read(w wire.Value) (*shared.RespondCrossClusterTasksCompletedResponse, error) {
	var v shared.RespondCrossClusterTasksCompletedResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_RespondCrossClusterTasksCompleted_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 AdminService_RespondCrossClusterTasksCompleted_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RespondCrossClusterTasksCompleted_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _RespondCrossClusterTasksCompletedResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_RespondCrossClusterTasksCompleted_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_RespondCrossClusterTasksCompleted_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RespondCrossClusterTasksCompleted_Result struct could not be encoded.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.ServiceBusyError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.ServiceBusyError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_RespondCrossClusterTasksCompleted_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _RespondCrossClusterTasksCompletedResponse_Decode(sr stream.Reader) (*shared.RespondCrossClusterTasksCompletedResponse, error) {
	var v shared.RespondCrossClusterTasksCompletedResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_RespondCrossClusterTasksCompleted_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RespondCrossClusterTasksCompleted_Result struct could not be generated from the wire
// representation.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _RespondCrossClusterTasksCompletedResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 3 && fh.Type == wire.TStruct:
			v.ServiceBusyError, err = _ServiceBusyError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_RespondCrossClusterTasksCompleted_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_RespondCrossClusterTasksCompleted_Result
// struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}

	return fmt.Sprintf("AdminService_RespondCrossClusterTasksCompleted_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RespondCrossClusterTasksCompleted_Result match the
// provided AdminService_RespondCrossClusterTasksCompleted_Result.
//
// This function performs a deep comparison.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) Equals(rhs *AdminService_RespondCrossClusterTasksCompleted_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		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.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 AdminService_RespondCrossClusterTasksCompleted_Result.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) GetSuccess() (o *shared.RespondCrossClusterTasksCompletedResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "RespondCrossClusterTasksCompleted" for this struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) MethodName() string {
	return "RespondCrossClusterTasksCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_RespondCrossClusterTasksCompleted_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_RestoreDynamicConfig_Args represents the arguments for the AdminService.RestoreDynamicConfig function.
//
// The arguments for RestoreDynamicConfig are sent and received over the wire as this struct.
type AdminService_RestoreDynamicConfig_Args struct {
	Request *RestoreDynamicConfigRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_RestoreDynamicConfig_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 *AdminService_RestoreDynamicConfig_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _RestoreDynamicConfigRequest_Read(w wire.Value) (*RestoreDynamicConfigRequest, error) {
	var v RestoreDynamicConfigRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_RestoreDynamicConfig_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 AdminService_RestoreDynamicConfig_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RestoreDynamicConfig_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RestoreDynamicConfig_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.Request, err = _RestoreDynamicConfigRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_RestoreDynamicConfig_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RestoreDynamicConfig_Args struct could not be encoded.
func (v *AdminService_RestoreDynamicConfig_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _RestoreDynamicConfigRequest_Decode(sr stream.Reader) (*RestoreDynamicConfigRequest, error) {
	var v RestoreDynamicConfigRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_RestoreDynamicConfig_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RestoreDynamicConfig_Args struct could not be generated from the wire
// representation.
func (v *AdminService_RestoreDynamicConfig_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _RestoreDynamicConfigRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_RestoreDynamicConfig_Args
// struct.
func (v *AdminService_RestoreDynamicConfig_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_RestoreDynamicConfig_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RestoreDynamicConfig_Args match the
// provided AdminService_RestoreDynamicConfig_Args.
//
// This function performs a deep comparison.
func (v *AdminService_RestoreDynamicConfig_Args) Equals(rhs *AdminService_RestoreDynamicConfig_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RestoreDynamicConfig_Args.
func (v *AdminService_RestoreDynamicConfig_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_RestoreDynamicConfig_Args) GetRequest() (o *RestoreDynamicConfigRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_RestoreDynamicConfig_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "RestoreDynamicConfig" for this struct.
func (v *AdminService_RestoreDynamicConfig_Args) MethodName() string {
	return "RestoreDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_RestoreDynamicConfig_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_RestoreDynamicConfig_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.RestoreDynamicConfig
// function.
var AdminService_RestoreDynamicConfig_Helper = struct {
	// Args accepts the parameters of RestoreDynamicConfig in-order and returns
	// the arguments struct for the function.
	Args func(
		request *RestoreDynamicConfigRequest,
	) *AdminService_RestoreDynamicConfig_Args

	// IsException returns true if the given error can be thrown
	// by RestoreDynamicConfig.
	//
	// An error can be thrown by RestoreDynamicConfig 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 RestoreDynamicConfig
	// given the error returned by it. The provided error may
	// be nil if RestoreDynamicConfig did not fail.
	//
	// This allows mapping errors returned by RestoreDynamicConfig into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RestoreDynamicConfig
	//
	//   err := RestoreDynamicConfig(args)
	//   result, err := AdminService_RestoreDynamicConfig_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RestoreDynamicConfig: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_RestoreDynamicConfig_Result, error)

	// UnwrapResponse takes the result struct for RestoreDynamicConfig
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RestoreDynamicConfig threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_RestoreDynamicConfig_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_RestoreDynamicConfig_Result) error
}{}

func init() {
	AdminService_RestoreDynamicConfig_Helper.Args = func(
		request *RestoreDynamicConfigRequest,
	) *AdminService_RestoreDynamicConfig_Args {
		return &AdminService_RestoreDynamicConfig_Args{
			Request: request,
		}
	}

	AdminService_RestoreDynamicConfig_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_RestoreDynamicConfig_Helper.WrapResponse = func(err error) (*AdminService_RestoreDynamicConfig_Result, error) {
		if err == nil {
			return &AdminService_RestoreDynamicConfig_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 AdminService_RestoreDynamicConfig_Result.BadRequestError")
			}
			return &AdminService_RestoreDynamicConfig_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_RestoreDynamicConfig_Result.InternalServiceError")
			}
			return &AdminService_RestoreDynamicConfig_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_RestoreDynamicConfig_Helper.UnwrapResponse = func(result *AdminService_RestoreDynamicConfig_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		return
	}

}

// AdminService_RestoreDynamicConfig_Result represents the result of a AdminService.RestoreDynamicConfig function call.
//
// The result of a RestoreDynamicConfig execution is sent and received over the wire as this struct.
type AdminService_RestoreDynamicConfig_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_RestoreDynamicConfig_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 *AdminService_RestoreDynamicConfig_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]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 i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_RestoreDynamicConfig_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_RestoreDynamicConfig_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 AdminService_RestoreDynamicConfig_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_RestoreDynamicConfig_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_RestoreDynamicConfig_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
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RestoreDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_RestoreDynamicConfig_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_RestoreDynamicConfig_Result struct could not be encoded.
func (v *AdminService_RestoreDynamicConfig_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_RestoreDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_RestoreDynamicConfig_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_RestoreDynamicConfig_Result struct could not be generated from the wire
// representation.
func (v *AdminService_RestoreDynamicConfig_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_RestoreDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_RestoreDynamicConfig_Result
// struct.
func (v *AdminService_RestoreDynamicConfig_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]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++
	}

	return fmt.Sprintf("AdminService_RestoreDynamicConfig_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_RestoreDynamicConfig_Result match the
// provided AdminService_RestoreDynamicConfig_Result.
//
// This function performs a deep comparison.
func (v *AdminService_RestoreDynamicConfig_Result) Equals(rhs *AdminService_RestoreDynamicConfig_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
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_RestoreDynamicConfig_Result.
func (v *AdminService_RestoreDynamicConfig_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))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_RestoreDynamicConfig_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_RestoreDynamicConfig_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_RestoreDynamicConfig_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_RestoreDynamicConfig_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "RestoreDynamicConfig" for this struct.
func (v *AdminService_RestoreDynamicConfig_Result) MethodName() string {
	return "RestoreDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_RestoreDynamicConfig_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args represents the arguments for the AdminService.UpdateDomainAsyncWorkflowConfiguraton function.
//
// The arguments for UpdateDomainAsyncWorkflowConfiguraton are sent and received over the wire as this struct.
type AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct {
	Request *UpdateDomainAsyncWorkflowConfiguratonRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_UpdateDomainAsyncWorkflowConfiguraton_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 *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _UpdateDomainAsyncWorkflowConfiguratonRequest_Read(w wire.Value) (*UpdateDomainAsyncWorkflowConfiguratonRequest, error) {
	var v UpdateDomainAsyncWorkflowConfiguratonRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_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 AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_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.Request, err = _UpdateDomainAsyncWorkflowConfiguratonRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct could not be encoded.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _UpdateDomainAsyncWorkflowConfiguratonRequest_Decode(sr stream.Reader) (*UpdateDomainAsyncWorkflowConfiguratonRequest, error) {
	var v UpdateDomainAsyncWorkflowConfiguratonRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _UpdateDomainAsyncWorkflowConfiguratonRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args
// struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args match the
// provided AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) Equals(rhs *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) GetRequest() (o *UpdateDomainAsyncWorkflowConfiguratonRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "UpdateDomainAsyncWorkflowConfiguraton" for this struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) MethodName() string {
	return "UpdateDomainAsyncWorkflowConfiguraton"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.UpdateDomainAsyncWorkflowConfiguraton
// function.
var AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper = struct {
	// Args accepts the parameters of UpdateDomainAsyncWorkflowConfiguraton in-order and returns
	// the arguments struct for the function.
	Args func(
		request *UpdateDomainAsyncWorkflowConfiguratonRequest,
	) *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args

	// IsException returns true if the given error can be thrown
	// by UpdateDomainAsyncWorkflowConfiguraton.
	//
	// An error can be thrown by UpdateDomainAsyncWorkflowConfiguraton 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 UpdateDomainAsyncWorkflowConfiguraton
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// UpdateDomainAsyncWorkflowConfiguraton into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by UpdateDomainAsyncWorkflowConfiguraton
	//
	//   value, err := UpdateDomainAsyncWorkflowConfiguraton(args)
	//   result, err := AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from UpdateDomainAsyncWorkflowConfiguraton: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*UpdateDomainAsyncWorkflowConfiguratonResponse, error) (*AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result, error)

	// UnwrapResponse takes the result struct for UpdateDomainAsyncWorkflowConfiguraton
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if UpdateDomainAsyncWorkflowConfiguraton threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) (*UpdateDomainAsyncWorkflowConfiguratonResponse, error)
}{}

func init() {
	AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.Args = func(
		request *UpdateDomainAsyncWorkflowConfiguratonRequest,
	) *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args {
		return &AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args{
			Request: request,
		}
	}

	AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.WrapResponse = func(success *UpdateDomainAsyncWorkflowConfiguratonResponse, err error) (*AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result, error) {
		if err == nil {
			return &AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result{Success: success}, 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 AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result.BadRequestError")
			}
			return &AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.UnwrapResponse = func(result *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) (success *UpdateDomainAsyncWorkflowConfiguratonResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result represents the result of a AdminService.UpdateDomainAsyncWorkflowConfiguraton function call.
//
// The result of a UpdateDomainAsyncWorkflowConfiguraton execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct {
	// Value returned by UpdateDomainAsyncWorkflowConfiguraton after a successful execution.
	Success         *UpdateDomainAsyncWorkflowConfiguratonResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError                        `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_UpdateDomainAsyncWorkflowConfiguraton_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 *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _UpdateDomainAsyncWorkflowConfiguratonResponse_Read(w wire.Value) (*UpdateDomainAsyncWorkflowConfiguratonResponse, error) {
	var v UpdateDomainAsyncWorkflowConfiguratonResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_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 AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _UpdateDomainAsyncWorkflowConfiguratonResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct could not be encoded.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _UpdateDomainAsyncWorkflowConfiguratonResponse_Decode(sr stream.Reader) (*UpdateDomainAsyncWorkflowConfiguratonResponse, error) {
	var v UpdateDomainAsyncWorkflowConfiguratonResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _UpdateDomainAsyncWorkflowConfiguratonResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result
// struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result match the
// provided AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) Equals(rhs *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) GetSuccess() (o *UpdateDomainAsyncWorkflowConfiguratonResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "UpdateDomainAsyncWorkflowConfiguraton" for this struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) MethodName() string {
	return "UpdateDomainAsyncWorkflowConfiguraton"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_UpdateDomainAsyncWorkflowConfiguraton_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_UpdateDomainIsolationGroups_Args represents the arguments for the AdminService.UpdateDomainIsolationGroups function.
//
// The arguments for UpdateDomainIsolationGroups are sent and received over the wire as this struct.
type AdminService_UpdateDomainIsolationGroups_Args struct {
	Request *UpdateDomainIsolationGroupsRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_UpdateDomainIsolationGroups_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 *AdminService_UpdateDomainIsolationGroups_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _UpdateDomainIsolationGroupsRequest_Read(w wire.Value) (*UpdateDomainIsolationGroupsRequest, error) {
	var v UpdateDomainIsolationGroupsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateDomainIsolationGroups_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 AdminService_UpdateDomainIsolationGroups_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDomainIsolationGroups_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDomainIsolationGroups_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.Request, err = _UpdateDomainIsolationGroupsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_UpdateDomainIsolationGroups_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDomainIsolationGroups_Args struct could not be encoded.
func (v *AdminService_UpdateDomainIsolationGroups_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _UpdateDomainIsolationGroupsRequest_Decode(sr stream.Reader) (*UpdateDomainIsolationGroupsRequest, error) {
	var v UpdateDomainIsolationGroupsRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateDomainIsolationGroups_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDomainIsolationGroups_Args struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDomainIsolationGroups_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _UpdateDomainIsolationGroupsRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDomainIsolationGroups_Args
// struct.
func (v *AdminService_UpdateDomainIsolationGroups_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateDomainIsolationGroups_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDomainIsolationGroups_Args match the
// provided AdminService_UpdateDomainIsolationGroups_Args.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDomainIsolationGroups_Args) Equals(rhs *AdminService_UpdateDomainIsolationGroups_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDomainIsolationGroups_Args.
func (v *AdminService_UpdateDomainIsolationGroups_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainIsolationGroups_Args) GetRequest() (o *UpdateDomainIsolationGroupsRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_UpdateDomainIsolationGroups_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "UpdateDomainIsolationGroups" for this struct.
func (v *AdminService_UpdateDomainIsolationGroups_Args) MethodName() string {
	return "UpdateDomainIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_UpdateDomainIsolationGroups_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_UpdateDomainIsolationGroups_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.UpdateDomainIsolationGroups
// function.
var AdminService_UpdateDomainIsolationGroups_Helper = struct {
	// Args accepts the parameters of UpdateDomainIsolationGroups in-order and returns
	// the arguments struct for the function.
	Args func(
		request *UpdateDomainIsolationGroupsRequest,
	) *AdminService_UpdateDomainIsolationGroups_Args

	// IsException returns true if the given error can be thrown
	// by UpdateDomainIsolationGroups.
	//
	// An error can be thrown by UpdateDomainIsolationGroups 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 UpdateDomainIsolationGroups
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// UpdateDomainIsolationGroups into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by UpdateDomainIsolationGroups
	//
	//   value, err := UpdateDomainIsolationGroups(args)
	//   result, err := AdminService_UpdateDomainIsolationGroups_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from UpdateDomainIsolationGroups: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*UpdateDomainIsolationGroupsResponse, error) (*AdminService_UpdateDomainIsolationGroups_Result, error)

	// UnwrapResponse takes the result struct for UpdateDomainIsolationGroups
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if UpdateDomainIsolationGroups threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_UpdateDomainIsolationGroups_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_UpdateDomainIsolationGroups_Result) (*UpdateDomainIsolationGroupsResponse, error)
}{}

func init() {
	AdminService_UpdateDomainIsolationGroups_Helper.Args = func(
		request *UpdateDomainIsolationGroupsRequest,
	) *AdminService_UpdateDomainIsolationGroups_Args {
		return &AdminService_UpdateDomainIsolationGroups_Args{
			Request: request,
		}
	}

	AdminService_UpdateDomainIsolationGroups_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_UpdateDomainIsolationGroups_Helper.WrapResponse = func(success *UpdateDomainIsolationGroupsResponse, err error) (*AdminService_UpdateDomainIsolationGroups_Result, error) {
		if err == nil {
			return &AdminService_UpdateDomainIsolationGroups_Result{Success: success}, 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 AdminService_UpdateDomainIsolationGroups_Result.BadRequestError")
			}
			return &AdminService_UpdateDomainIsolationGroups_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_UpdateDomainIsolationGroups_Helper.UnwrapResponse = func(result *AdminService_UpdateDomainIsolationGroups_Result) (success *UpdateDomainIsolationGroupsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_UpdateDomainIsolationGroups_Result represents the result of a AdminService.UpdateDomainIsolationGroups function call.
//
// The result of a UpdateDomainIsolationGroups execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_UpdateDomainIsolationGroups_Result struct {
	// Value returned by UpdateDomainIsolationGroups after a successful execution.
	Success         *UpdateDomainIsolationGroupsResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError              `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_UpdateDomainIsolationGroups_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 *AdminService_UpdateDomainIsolationGroups_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_UpdateDomainIsolationGroups_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _UpdateDomainIsolationGroupsResponse_Read(w wire.Value) (*UpdateDomainIsolationGroupsResponse, error) {
	var v UpdateDomainIsolationGroupsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateDomainIsolationGroups_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 AdminService_UpdateDomainIsolationGroups_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDomainIsolationGroups_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDomainIsolationGroups_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _UpdateDomainIsolationGroupsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_UpdateDomainIsolationGroups_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDomainIsolationGroups_Result struct could not be encoded.
func (v *AdminService_UpdateDomainIsolationGroups_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _UpdateDomainIsolationGroupsResponse_Decode(sr stream.Reader) (*UpdateDomainIsolationGroupsResponse, error) {
	var v UpdateDomainIsolationGroupsResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateDomainIsolationGroups_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDomainIsolationGroups_Result struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDomainIsolationGroups_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _UpdateDomainIsolationGroupsResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateDomainIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDomainIsolationGroups_Result
// struct.
func (v *AdminService_UpdateDomainIsolationGroups_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateDomainIsolationGroups_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDomainIsolationGroups_Result match the
// provided AdminService_UpdateDomainIsolationGroups_Result.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDomainIsolationGroups_Result) Equals(rhs *AdminService_UpdateDomainIsolationGroups_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDomainIsolationGroups_Result.
func (v *AdminService_UpdateDomainIsolationGroups_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainIsolationGroups_Result) GetSuccess() (o *UpdateDomainIsolationGroupsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_UpdateDomainIsolationGroups_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDomainIsolationGroups_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_UpdateDomainIsolationGroups_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "UpdateDomainIsolationGroups" for this struct.
func (v *AdminService_UpdateDomainIsolationGroups_Result) MethodName() string {
	return "UpdateDomainIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_UpdateDomainIsolationGroups_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_UpdateDynamicConfig_Args represents the arguments for the AdminService.UpdateDynamicConfig function.
//
// The arguments for UpdateDynamicConfig are sent and received over the wire as this struct.
type AdminService_UpdateDynamicConfig_Args struct {
	Request *UpdateDynamicConfigRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_UpdateDynamicConfig_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 *AdminService_UpdateDynamicConfig_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _UpdateDynamicConfigRequest_Read(w wire.Value) (*UpdateDynamicConfigRequest, error) {
	var v UpdateDynamicConfigRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateDynamicConfig_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 AdminService_UpdateDynamicConfig_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDynamicConfig_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDynamicConfig_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.Request, err = _UpdateDynamicConfigRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_UpdateDynamicConfig_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDynamicConfig_Args struct could not be encoded.
func (v *AdminService_UpdateDynamicConfig_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _UpdateDynamicConfigRequest_Decode(sr stream.Reader) (*UpdateDynamicConfigRequest, error) {
	var v UpdateDynamicConfigRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateDynamicConfig_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDynamicConfig_Args struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDynamicConfig_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _UpdateDynamicConfigRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDynamicConfig_Args
// struct.
func (v *AdminService_UpdateDynamicConfig_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateDynamicConfig_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDynamicConfig_Args match the
// provided AdminService_UpdateDynamicConfig_Args.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDynamicConfig_Args) Equals(rhs *AdminService_UpdateDynamicConfig_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDynamicConfig_Args.
func (v *AdminService_UpdateDynamicConfig_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDynamicConfig_Args) GetRequest() (o *UpdateDynamicConfigRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_UpdateDynamicConfig_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "UpdateDynamicConfig" for this struct.
func (v *AdminService_UpdateDynamicConfig_Args) MethodName() string {
	return "UpdateDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_UpdateDynamicConfig_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_UpdateDynamicConfig_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.UpdateDynamicConfig
// function.
var AdminService_UpdateDynamicConfig_Helper = struct {
	// Args accepts the parameters of UpdateDynamicConfig in-order and returns
	// the arguments struct for the function.
	Args func(
		request *UpdateDynamicConfigRequest,
	) *AdminService_UpdateDynamicConfig_Args

	// IsException returns true if the given error can be thrown
	// by UpdateDynamicConfig.
	//
	// An error can be thrown by UpdateDynamicConfig 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 UpdateDynamicConfig
	// given the error returned by it. The provided error may
	// be nil if UpdateDynamicConfig did not fail.
	//
	// This allows mapping errors returned by UpdateDynamicConfig into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// UpdateDynamicConfig
	//
	//   err := UpdateDynamicConfig(args)
	//   result, err := AdminService_UpdateDynamicConfig_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from UpdateDynamicConfig: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*AdminService_UpdateDynamicConfig_Result, error)

	// UnwrapResponse takes the result struct for UpdateDynamicConfig
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if UpdateDynamicConfig threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := AdminService_UpdateDynamicConfig_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_UpdateDynamicConfig_Result) error
}{}

func init() {
	AdminService_UpdateDynamicConfig_Helper.Args = func(
		request *UpdateDynamicConfigRequest,
	) *AdminService_UpdateDynamicConfig_Args {
		return &AdminService_UpdateDynamicConfig_Args{
			Request: request,
		}
	}

	AdminService_UpdateDynamicConfig_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.InternalServiceError:
			return true
		default:
			return false
		}
	}

	AdminService_UpdateDynamicConfig_Helper.WrapResponse = func(err error) (*AdminService_UpdateDynamicConfig_Result, error) {
		if err == nil {
			return &AdminService_UpdateDynamicConfig_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 AdminService_UpdateDynamicConfig_Result.BadRequestError")
			}
			return &AdminService_UpdateDynamicConfig_Result{BadRequestError: e}, nil
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for AdminService_UpdateDynamicConfig_Result.InternalServiceError")
			}
			return &AdminService_UpdateDynamicConfig_Result{InternalServiceError: e}, nil
		}

		return nil, err
	}
	AdminService_UpdateDynamicConfig_Helper.UnwrapResponse = func(result *AdminService_UpdateDynamicConfig_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		return
	}

}

// AdminService_UpdateDynamicConfig_Result represents the result of a AdminService.UpdateDynamicConfig function call.
//
// The result of a UpdateDynamicConfig execution is sent and received over the wire as this struct.
type AdminService_UpdateDynamicConfig_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
}

// ToWire translates a AdminService_UpdateDynamicConfig_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 *AdminService_UpdateDynamicConfig_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]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 i > 1 {
		return wire.Value{}, fmt.Errorf("AdminService_UpdateDynamicConfig_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a AdminService_UpdateDynamicConfig_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 AdminService_UpdateDynamicConfig_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateDynamicConfig_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateDynamicConfig_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
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_UpdateDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_UpdateDynamicConfig_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateDynamicConfig_Result struct could not be encoded.
func (v *AdminService_UpdateDynamicConfig_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.InternalServiceError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.InternalServiceError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}

	if count > 1 {
		return fmt.Errorf("AdminService_UpdateDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

// Decode deserializes a AdminService_UpdateDynamicConfig_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateDynamicConfig_Result struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateDynamicConfig_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 2 && fh.Type == wire.TStruct:
			v.InternalServiceError, err = _InternalServiceError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("AdminService_UpdateDynamicConfig_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateDynamicConfig_Result
// struct.
func (v *AdminService_UpdateDynamicConfig_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]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++
	}

	return fmt.Sprintf("AdminService_UpdateDynamicConfig_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateDynamicConfig_Result match the
// provided AdminService_UpdateDynamicConfig_Result.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateDynamicConfig_Result) Equals(rhs *AdminService_UpdateDynamicConfig_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
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateDynamicConfig_Result.
func (v *AdminService_UpdateDynamicConfig_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))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDynamicConfig_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_UpdateDynamicConfig_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateDynamicConfig_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *AdminService_UpdateDynamicConfig_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "UpdateDynamicConfig" for this struct.
func (v *AdminService_UpdateDynamicConfig_Result) MethodName() string {
	return "UpdateDynamicConfig"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_UpdateDynamicConfig_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// AdminService_UpdateGlobalIsolationGroups_Args represents the arguments for the AdminService.UpdateGlobalIsolationGroups function.
//
// The arguments for UpdateGlobalIsolationGroups are sent and received over the wire as this struct.
type AdminService_UpdateGlobalIsolationGroups_Args struct {
	Request *UpdateGlobalIsolationGroupsRequest `json:"request,omitempty"`
}

// ToWire translates a AdminService_UpdateGlobalIsolationGroups_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 *AdminService_UpdateGlobalIsolationGroups_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Request != nil {
		w, err = v.Request.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 _UpdateGlobalIsolationGroupsRequest_Read(w wire.Value) (*UpdateGlobalIsolationGroupsRequest, error) {
	var v UpdateGlobalIsolationGroupsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateGlobalIsolationGroups_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 AdminService_UpdateGlobalIsolationGroups_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateGlobalIsolationGroups_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateGlobalIsolationGroups_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.Request, err = _UpdateGlobalIsolationGroupsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// Encode serializes a AdminService_UpdateGlobalIsolationGroups_Args struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateGlobalIsolationGroups_Args struct could not be encoded.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Request != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Request.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	return sw.WriteStructEnd()
}

func _UpdateGlobalIsolationGroupsRequest_Decode(sr stream.Reader) (*UpdateGlobalIsolationGroupsRequest, error) {
	var v UpdateGlobalIsolationGroupsRequest
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateGlobalIsolationGroups_Args struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateGlobalIsolationGroups_Args struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.Request, err = _UpdateGlobalIsolationGroupsRequest_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateGlobalIsolationGroups_Args
// struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateGlobalIsolationGroups_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateGlobalIsolationGroups_Args match the
// provided AdminService_UpdateGlobalIsolationGroups_Args.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) Equals(rhs *AdminService_UpdateGlobalIsolationGroups_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateGlobalIsolationGroups_Args.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Request != nil {
		err = multierr.Append(err, enc.AddObject("request", v.Request))
	}
	return err
}

// GetRequest returns the value of Request if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) GetRequest() (o *UpdateGlobalIsolationGroupsRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) IsSetRequest() bool {
	return v != nil && v.Request != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "UpdateGlobalIsolationGroups" for this struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) MethodName() string {
	return "UpdateGlobalIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// AdminService_UpdateGlobalIsolationGroups_Helper provides functions that aid in handling the
// parameters and return values of the AdminService.UpdateGlobalIsolationGroups
// function.
var AdminService_UpdateGlobalIsolationGroups_Helper = struct {
	// Args accepts the parameters of UpdateGlobalIsolationGroups in-order and returns
	// the arguments struct for the function.
	Args func(
		request *UpdateGlobalIsolationGroupsRequest,
	) *AdminService_UpdateGlobalIsolationGroups_Args

	// IsException returns true if the given error can be thrown
	// by UpdateGlobalIsolationGroups.
	//
	// An error can be thrown by UpdateGlobalIsolationGroups 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 UpdateGlobalIsolationGroups
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// UpdateGlobalIsolationGroups into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by UpdateGlobalIsolationGroups
	//
	//   value, err := UpdateGlobalIsolationGroups(args)
	//   result, err := AdminService_UpdateGlobalIsolationGroups_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from UpdateGlobalIsolationGroups: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*UpdateGlobalIsolationGroupsResponse, error) (*AdminService_UpdateGlobalIsolationGroups_Result, error)

	// UnwrapResponse takes the result struct for UpdateGlobalIsolationGroups
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if UpdateGlobalIsolationGroups threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := AdminService_UpdateGlobalIsolationGroups_Helper.UnwrapResponse(result)
	UnwrapResponse func(*AdminService_UpdateGlobalIsolationGroups_Result) (*UpdateGlobalIsolationGroupsResponse, error)
}{}

func init() {
	AdminService_UpdateGlobalIsolationGroups_Helper.Args = func(
		request *UpdateGlobalIsolationGroupsRequest,
	) *AdminService_UpdateGlobalIsolationGroups_Args {
		return &AdminService_UpdateGlobalIsolationGroups_Args{
			Request: request,
		}
	}

	AdminService_UpdateGlobalIsolationGroups_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		default:
			return false
		}
	}

	AdminService_UpdateGlobalIsolationGroups_Helper.WrapResponse = func(success *UpdateGlobalIsolationGroupsResponse, err error) (*AdminService_UpdateGlobalIsolationGroups_Result, error) {
		if err == nil {
			return &AdminService_UpdateGlobalIsolationGroups_Result{Success: success}, 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 AdminService_UpdateGlobalIsolationGroups_Result.BadRequestError")
			}
			return &AdminService_UpdateGlobalIsolationGroups_Result{BadRequestError: e}, nil
		}

		return nil, err
	}
	AdminService_UpdateGlobalIsolationGroups_Helper.UnwrapResponse = func(result *AdminService_UpdateGlobalIsolationGroups_Result) (success *UpdateGlobalIsolationGroupsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// AdminService_UpdateGlobalIsolationGroups_Result represents the result of a AdminService.UpdateGlobalIsolationGroups function call.
//
// The result of a UpdateGlobalIsolationGroups execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type AdminService_UpdateGlobalIsolationGroups_Result struct {
	// Value returned by UpdateGlobalIsolationGroups after a successful execution.
	Success         *UpdateGlobalIsolationGroupsResponse `json:"success,omitempty"`
	BadRequestError *shared.BadRequestError              `json:"badRequestError,omitempty"`
}

// ToWire translates a AdminService_UpdateGlobalIsolationGroups_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 *AdminService_UpdateGlobalIsolationGroups_Result) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	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 i != 1 {
		return wire.Value{}, fmt.Errorf("AdminService_UpdateGlobalIsolationGroups_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _UpdateGlobalIsolationGroupsResponse_Read(w wire.Value) (*UpdateGlobalIsolationGroupsResponse, error) {
	var v UpdateGlobalIsolationGroupsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a AdminService_UpdateGlobalIsolationGroups_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 AdminService_UpdateGlobalIsolationGroups_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v AdminService_UpdateGlobalIsolationGroups_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *AdminService_UpdateGlobalIsolationGroups_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _UpdateGlobalIsolationGroupsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// Encode serializes a AdminService_UpdateGlobalIsolationGroups_Result struct directly into bytes, without going
// through an intermediary type.
//
// An error is returned if a AdminService_UpdateGlobalIsolationGroups_Result struct could not be encoded.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) Encode(sw stream.Writer) error {
	if err := sw.WriteStructBegin(); err != nil {
		return err
	}

	if v.Success != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.Success.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	if v.BadRequestError != nil {
		if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil {
			return err
		}
		if err := v.BadRequestError.Encode(sw); err != nil {
			return err
		}
		if err := sw.WriteFieldEnd(); err != nil {
			return err
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}

	if count != 1 {
		return fmt.Errorf("AdminService_UpdateGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return sw.WriteStructEnd()
}

func _UpdateGlobalIsolationGroupsResponse_Decode(sr stream.Reader) (*UpdateGlobalIsolationGroupsResponse, error) {
	var v UpdateGlobalIsolationGroupsResponse
	err := v.Decode(sr)
	return &v, err
}

// Decode deserializes a AdminService_UpdateGlobalIsolationGroups_Result struct directly from its Thrift-level
// representation, without going through an intemediary type.
//
// An error is returned if a AdminService_UpdateGlobalIsolationGroups_Result struct could not be generated from the wire
// representation.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) Decode(sr stream.Reader) error {

	if err := sr.ReadStructBegin(); err != nil {
		return err
	}

	fh, ok, err := sr.ReadFieldBegin()
	if err != nil {
		return err
	}

	for ok {
		switch {
		case fh.ID == 0 && fh.Type == wire.TStruct:
			v.Success, err = _UpdateGlobalIsolationGroupsResponse_Decode(sr)
			if err != nil {
				return err
			}

		case fh.ID == 1 && fh.Type == wire.TStruct:
			v.BadRequestError, err = _BadRequestError_Decode(sr)
			if err != nil {
				return err
			}

		default:
			if err := sr.Skip(fh.Type); err != nil {
				return err
			}
		}

		if err := sr.ReadFieldEnd(); err != nil {
			return err
		}

		if fh, ok, err = sr.ReadFieldBegin(); err != nil {
			return err
		}
	}

	if err := sr.ReadStructEnd(); err != nil {
		return err
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.BadRequestError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("AdminService_UpdateGlobalIsolationGroups_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a AdminService_UpdateGlobalIsolationGroups_Result
// struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}

	return fmt.Sprintf("AdminService_UpdateGlobalIsolationGroups_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this AdminService_UpdateGlobalIsolationGroups_Result match the
// provided AdminService_UpdateGlobalIsolationGroups_Result.
//
// This function performs a deep comparison.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) Equals(rhs *AdminService_UpdateGlobalIsolationGroups_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of AdminService_UpdateGlobalIsolationGroups_Result.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	return err
}

// GetSuccess returns the value of Success if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) GetSuccess() (o *UpdateGlobalIsolationGroupsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the result.
//
// This will always be "UpdateGlobalIsolationGroups" for this struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) MethodName() string {
	return "UpdateGlobalIsolationGroups"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *AdminService_UpdateGlobalIsolationGroups_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}
