// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: wormhole/governance.proto

package types

import (
	bytes "bytes"
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// GuardianSetUpdateProposal defines a guardian set update governance proposal
type GuardianSetUpdateProposal struct {
	Title          string      `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description    string      `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	NewGuardianSet GuardianSet `protobuf:"bytes,3,opt,name=newGuardianSet,proto3" json:"newGuardianSet"`
}

func (m *GuardianSetUpdateProposal) Reset()      { *m = GuardianSetUpdateProposal{} }
func (*GuardianSetUpdateProposal) ProtoMessage() {}
func (*GuardianSetUpdateProposal) Descriptor() ([]byte, []int) {
	return fileDescriptor_ceebda8f8c3f5f74, []int{0}
}
func (m *GuardianSetUpdateProposal) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GuardianSetUpdateProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GuardianSetUpdateProposal.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *GuardianSetUpdateProposal) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GuardianSetUpdateProposal.Merge(m, src)
}
func (m *GuardianSetUpdateProposal) XXX_Size() int {
	return m.Size()
}
func (m *GuardianSetUpdateProposal) XXX_DiscardUnknown() {
	xxx_messageInfo_GuardianSetUpdateProposal.DiscardUnknown(m)
}

var xxx_messageInfo_GuardianSetUpdateProposal proto.InternalMessageInfo

func (m *GuardianSetUpdateProposal) GetTitle() string {
	if m != nil {
		return m.Title
	}
	return ""
}

func (m *GuardianSetUpdateProposal) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func (m *GuardianSetUpdateProposal) GetNewGuardianSet() GuardianSet {
	if m != nil {
		return m.NewGuardianSet
	}
	return GuardianSet{}
}

// GovernanceWormholeMessageProposal defines a governance proposal to emit a generic message in the governance message
// format.
type GovernanceWormholeMessageProposal struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Action      uint32 `protobuf:"varint,3,opt,name=action,proto3" json:"action,omitempty"`
	Module      []byte `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"`
	TargetChain uint32 `protobuf:"varint,5,opt,name=targetChain,proto3" json:"targetChain,omitempty"`
	Payload     []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (m *GovernanceWormholeMessageProposal) Reset()      { *m = GovernanceWormholeMessageProposal{} }
func (*GovernanceWormholeMessageProposal) ProtoMessage() {}
func (*GovernanceWormholeMessageProposal) Descriptor() ([]byte, []int) {
	return fileDescriptor_ceebda8f8c3f5f74, []int{1}
}
func (m *GovernanceWormholeMessageProposal) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GovernanceWormholeMessageProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GovernanceWormholeMessageProposal.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *GovernanceWormholeMessageProposal) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GovernanceWormholeMessageProposal.Merge(m, src)
}
func (m *GovernanceWormholeMessageProposal) XXX_Size() int {
	return m.Size()
}
func (m *GovernanceWormholeMessageProposal) XXX_DiscardUnknown() {
	xxx_messageInfo_GovernanceWormholeMessageProposal.DiscardUnknown(m)
}

var xxx_messageInfo_GovernanceWormholeMessageProposal proto.InternalMessageInfo

func (m *GovernanceWormholeMessageProposal) GetTitle() string {
	if m != nil {
		return m.Title
	}
	return ""
}

func (m *GovernanceWormholeMessageProposal) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func (m *GovernanceWormholeMessageProposal) GetAction() uint32 {
	if m != nil {
		return m.Action
	}
	return 0
}

func (m *GovernanceWormholeMessageProposal) GetModule() []byte {
	if m != nil {
		return m.Module
	}
	return nil
}

func (m *GovernanceWormholeMessageProposal) GetTargetChain() uint32 {
	if m != nil {
		return m.TargetChain
	}
	return 0
}

func (m *GovernanceWormholeMessageProposal) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

func init() {
	proto.RegisterType((*GuardianSetUpdateProposal)(nil), "wormhole_foundation.wormchain.wormhole.GuardianSetUpdateProposal")
	proto.RegisterType((*GovernanceWormholeMessageProposal)(nil), "wormhole_foundation.wormchain.wormhole.GovernanceWormholeMessageProposal")
}

func init() { proto.RegisterFile("wormhole/governance.proto", fileDescriptor_ceebda8f8c3f5f74) }

var fileDescriptor_ceebda8f8c3f5f74 = []byte{
	// 353 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x51, 0x31, 0x4f, 0xc2, 0x40,
	0x18, 0xed, 0x29, 0xa0, 0x1e, 0xea, 0xd0, 0x10, 0x2d, 0x0c, 0xa5, 0x32, 0x18, 0x16, 0xdb, 0x44,
	0x26, 0x1d, 0x71, 0x60, 0x32, 0x31, 0x25, 0xc6, 0xc4, 0xc5, 0x7c, 0xb4, 0x67, 0x69, 0x52, 0xfa,
	0x35, 0xd7, 0xab, 0xc8, 0xbf, 0x70, 0x74, 0xe4, 0xa7, 0x38, 0x32, 0xe2, 0xe6, 0x64, 0x0c, 0x2c,
	0xfe, 0x0c, 0x73, 0x6d, 0x81, 0xc6, 0xc9, 0xc4, 0xed, 0x7b, 0xef, 0xf5, 0xbd, 0xf4, 0xbd, 0xa3,
	0xf5, 0x31, 0xf2, 0xd1, 0x10, 0x03, 0x66, 0x79, 0xf8, 0xc4, 0x78, 0x08, 0xa1, 0xc3, 0xcc, 0x88,
	0xa3, 0x40, 0xf5, 0x74, 0x25, 0x3d, 0x3c, 0x62, 0x12, 0xba, 0x20, 0x7c, 0x0c, 0x4d, 0xc9, 0x39,
	0x43, 0xf0, 0xb3, 0x4b, 0xaa, 0x8d, 0xe3, 0x4d, 0x44, 0x02, 0xdc, 0xf5, 0x21, 0xcc, 0x02, 0x1a,
	0x35, 0x0f, 0x3d, 0x4c, 0x4f, 0x4b, 0x5e, 0x19, 0xdb, 0x7a, 0x23, 0xb4, 0xde, 0xcb, 0x3f, 0xec,
	0x33, 0x71, 0x1b, 0xb9, 0x20, 0xd8, 0x0d, 0xc7, 0x08, 0x63, 0x08, 0xd4, 0x1a, 0x2d, 0x0b, 0x5f,
	0x04, 0x4c, 0x23, 0x06, 0x69, 0xef, 0xd9, 0x19, 0x50, 0x0d, 0x5a, 0x75, 0x59, 0xec, 0x70, 0x3f,
	0x92, 0x3f, 0xa1, 0x6d, 0xa5, 0x5a, 0x91, 0x52, 0x81, 0x1e, 0x86, 0x6c, 0x5c, 0xc8, 0xd5, 0xb6,
	0x0d, 0xd2, 0xae, 0x9e, 0x77, 0xcc, 0xbf, 0xb5, 0x30, 0x0b, 0xd6, 0x6e, 0x69, 0xf6, 0xd9, 0x54,
	0xec, 0x5f, 0x81, 0x97, 0xbb, 0xaf, 0xd3, 0xa6, 0xf2, 0x3d, 0x6d, 0x92, 0xd6, 0x3b, 0xa1, 0x27,
	0xbd, 0xf5, 0x5c, 0x77, 0x79, 0xc4, 0x35, 0x8b, 0x63, 0xf0, 0xfe, 0x5f, 0xe5, 0x88, 0x56, 0xc0,
	0x49, 0x45, 0x59, 0xe1, 0xc0, 0xce, 0x91, 0xe4, 0x47, 0xe8, 0x26, 0x01, 0xd3, 0x4a, 0x06, 0x69,
	0xef, 0xdb, 0x39, 0x92, 0x89, 0x02, 0xb8, 0xc7, 0xc4, 0x95, 0x6c, 0xa4, 0x95, 0x53, 0x53, 0x91,
	0x52, 0x35, 0xba, 0x13, 0xc1, 0x24, 0x40, 0x70, 0xb5, 0x4a, 0x6a, 0x5d, 0xc1, 0x4d, 0xa7, 0x6e,
	0x7f, 0xb6, 0xd0, 0xc9, 0x7c, 0xa1, 0x93, 0xaf, 0x85, 0x4e, 0x5e, 0x96, 0xba, 0x32, 0x5f, 0xea,
	0xca, 0xc7, 0x52, 0x57, 0xee, 0x2f, 0x3c, 0x5f, 0x0c, 0x93, 0x81, 0xe9, 0xe0, 0xc8, 0x5a, 0xcd,
	0x75, 0xb6, 0x19, 0xd3, 0x5a, 0x8f, 0x69, 0x3d, 0xaf, 0x75, 0x4b, 0x4c, 0x22, 0x16, 0x0f, 0x2a,
	0xe9, 0x93, 0x77, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x76, 0x11, 0xd3, 0x39, 0x66, 0x02, 0x00,
	0x00,
}

func (this *GuardianSetUpdateProposal) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*GuardianSetUpdateProposal)
	if !ok {
		that2, ok := that.(GuardianSetUpdateProposal)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Title != that1.Title {
		return false
	}
	if this.Description != that1.Description {
		return false
	}
	if !this.NewGuardianSet.Equal(&that1.NewGuardianSet) {
		return false
	}
	return true
}
func (this *GovernanceWormholeMessageProposal) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*GovernanceWormholeMessageProposal)
	if !ok {
		that2, ok := that.(GovernanceWormholeMessageProposal)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Title != that1.Title {
		return false
	}
	if this.Description != that1.Description {
		return false
	}
	if this.Action != that1.Action {
		return false
	}
	if !bytes.Equal(this.Module, that1.Module) {
		return false
	}
	if this.TargetChain != that1.TargetChain {
		return false
	}
	if !bytes.Equal(this.Payload, that1.Payload) {
		return false
	}
	return true
}
func (m *GuardianSetUpdateProposal) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GuardianSetUpdateProposal) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GuardianSetUpdateProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.NewGuardianSet.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintGovernance(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Description) > 0 {
		i -= len(m.Description)
		copy(dAtA[i:], m.Description)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Title) > 0 {
		i -= len(m.Title)
		copy(dAtA[i:], m.Title)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *GovernanceWormholeMessageProposal) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GovernanceWormholeMessageProposal) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GovernanceWormholeMessageProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Payload) > 0 {
		i -= len(m.Payload)
		copy(dAtA[i:], m.Payload)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Payload)))
		i--
		dAtA[i] = 0x32
	}
	if m.TargetChain != 0 {
		i = encodeVarintGovernance(dAtA, i, uint64(m.TargetChain))
		i--
		dAtA[i] = 0x28
	}
	if len(m.Module) > 0 {
		i -= len(m.Module)
		copy(dAtA[i:], m.Module)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Module)))
		i--
		dAtA[i] = 0x22
	}
	if m.Action != 0 {
		i = encodeVarintGovernance(dAtA, i, uint64(m.Action))
		i--
		dAtA[i] = 0x18
	}
	if len(m.Description) > 0 {
		i -= len(m.Description)
		copy(dAtA[i:], m.Description)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Title) > 0 {
		i -= len(m.Title)
		copy(dAtA[i:], m.Title)
		i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintGovernance(dAtA []byte, offset int, v uint64) int {
	offset -= sovGovernance(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *GuardianSetUpdateProposal) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Title)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	l = len(m.Description)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	l = m.NewGuardianSet.Size()
	n += 1 + l + sovGovernance(uint64(l))
	return n
}

func (m *GovernanceWormholeMessageProposal) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Title)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	l = len(m.Description)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	if m.Action != 0 {
		n += 1 + sovGovernance(uint64(m.Action))
	}
	l = len(m.Module)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	if m.TargetChain != 0 {
		n += 1 + sovGovernance(uint64(m.TargetChain))
	}
	l = len(m.Payload)
	if l > 0 {
		n += 1 + l + sovGovernance(uint64(l))
	}
	return n
}

func sovGovernance(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozGovernance(x uint64) (n int) {
	return sovGovernance(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GuardianSetUpdateProposal) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowGovernance
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GuardianSetUpdateProposal: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GuardianSetUpdateProposal: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Title = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Description = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NewGuardianSet", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.NewGuardianSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipGovernance(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGovernance
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GovernanceWormholeMessageProposal) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowGovernance
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GovernanceWormholeMessageProposal: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GovernanceWormholeMessageProposal: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Title = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Description = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
			}
			m.Action = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Action |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Module = append(m.Module[:0], dAtA[iNdEx:postIndex]...)
			if m.Module == nil {
				m.Module = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TargetChain", wireType)
			}
			m.TargetChain = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TargetChain |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthGovernance
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthGovernance
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
			if m.Payload == nil {
				m.Payload = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipGovernance(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGovernance
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipGovernance(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowGovernance
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowGovernance
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthGovernance
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupGovernance
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthGovernance
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthGovernance        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGovernance          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGovernance = fmt.Errorf("proto: unexpected end of group")
)
