package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/cosmos/cosmos-sdk/types"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
)
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
const _ = proto.GoGoProtoPackageIsVersion3
type Params struct {
MaxSlots uint32 `protobuf:"varint,1,opt,name=max_slots,json=maxSlots,proto3" json:"max_slots,omitempty"`
MaxGas uint32 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
FeeTtl uint32 `protobuf:"varint,3,opt,name=fee_ttl,json=feeTtl,proto3" json:"fee_ttl,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_a414790454046b0b, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
var xxx_messageInfo_Params proto.InternalMessageInfo
func (m *Params) GetMaxSlots() uint32 {
if m != nil {
return m.MaxSlots
}
return 0
}
func (m *Params) GetMaxGas() uint32 {
if m != nil {
return m.MaxGas
}
return 0
}
func (m *Params) GetFeeTtl() uint32 {
if m != nil {
return m.FeeTtl
}
return 0
}
type Thought struct {
Program string `protobuf:"bytes,1,opt,name=program,proto3" json:"program,omitempty"`
Trigger Trigger `protobuf:"bytes,2,opt,name=trigger,proto3" json:"trigger"`
Load Load `protobuf:"bytes,3,opt,name=load,proto3" json:"load"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Particle string `protobuf:"bytes,5,opt,name=particle,proto3" json:"particle,omitempty"`
}
func (m *Thought) Reset() { *m = Thought{} }
func (m *Thought) String() string { return proto.CompactTextString(m) }
func (*Thought) ProtoMessage() {}
func (*Thought) Descriptor() ([]byte, []int) {
return fileDescriptor_a414790454046b0b, []int{1}
}
func (m *Thought) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Thought) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Thought.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 *Thought) XXX_Merge(src proto.Message) {
xxx_messageInfo_Thought.Merge(m, src)
}
func (m *Thought) XXX_Size() int {
return m.Size()
}
func (m *Thought) XXX_DiscardUnknown() {
xxx_messageInfo_Thought.DiscardUnknown(m)
}
var xxx_messageInfo_Thought proto.InternalMessageInfo
type Trigger struct {
Period uint64 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"`
Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"`
}
func (m *Trigger) Reset() { *m = Trigger{} }
func (m *Trigger) String() string { return proto.CompactTextString(m) }
func (*Trigger) ProtoMessage() {}
func (*Trigger) Descriptor() ([]byte, []int) {
return fileDescriptor_a414790454046b0b, []int{2}
}
func (m *Trigger) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Trigger.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 *Trigger) XXX_Merge(src proto.Message) {
xxx_messageInfo_Trigger.Merge(m, src)
}
func (m *Trigger) XXX_Size() int {
return m.Size()
}
func (m *Trigger) XXX_DiscardUnknown() {
xxx_messageInfo_Trigger.DiscardUnknown(m)
}
var xxx_messageInfo_Trigger proto.InternalMessageInfo
type Load struct {
Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
GasPrice github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,casttype=github.com/cosmos/cosmos-sdk/types.Coin" json:"gas_price"`
}
func (m *Load) Reset() { *m = Load{} }
func (m *Load) String() string { return proto.CompactTextString(m) }
func (*Load) ProtoMessage() {}
func (*Load) Descriptor() ([]byte, []int) {
return fileDescriptor_a414790454046b0b, []int{3}
}
func (m *Load) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Load) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Load.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 *Load) XXX_Merge(src proto.Message) {
xxx_messageInfo_Load.Merge(m, src)
}
func (m *Load) XXX_Size() int {
return m.Size()
}
func (m *Load) XXX_DiscardUnknown() {
xxx_messageInfo_Load.DiscardUnknown(m)
}
var xxx_messageInfo_Load proto.InternalMessageInfo
type ThoughtStats struct {
Program string `protobuf:"bytes,1,opt,name=program,proto3" json:"program,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Calls uint64 `protobuf:"varint,3,opt,name=calls,proto3" json:"calls,omitempty"`
Fees uint64 `protobuf:"varint,4,opt,name=fees,proto3" json:"fees,omitempty"`
Gas uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"`
LastBlock uint64 `protobuf:"varint,6,opt,name=last_block,json=lastBlock,proto3" json:"last_block,omitempty"`
}
func (m *ThoughtStats) Reset() { *m = ThoughtStats{} }
func (m *ThoughtStats) String() string { return proto.CompactTextString(m) }
func (*ThoughtStats) ProtoMessage() {}
func (*ThoughtStats) Descriptor() ([]byte, []int) {
return fileDescriptor_a414790454046b0b, []int{4}
}
func (m *ThoughtStats) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ThoughtStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ThoughtStats.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 *ThoughtStats) XXX_Merge(src proto.Message) {
xxx_messageInfo_ThoughtStats.Merge(m, src)
}
func (m *ThoughtStats) XXX_Size() int {
return m.Size()
}
func (m *ThoughtStats) XXX_DiscardUnknown() {
xxx_messageInfo_ThoughtStats.DiscardUnknown(m)
}
var xxx_messageInfo_ThoughtStats proto.InternalMessageInfo
func init() {
proto.RegisterType((*Params)(nil), "cyber.dmn.v1beta1.Params")
proto.RegisterType((*Thought)(nil), "cyber.dmn.v1beta1.Thought")
proto.RegisterType((*Trigger)(nil), "cyber.dmn.v1beta1.Trigger")
proto.RegisterType((*Load)(nil), "cyber.dmn.v1beta1.Load")
proto.RegisterType((*ThoughtStats)(nil), "cyber.dmn.v1beta1.ThoughtStats")
}
func init() { proto.RegisterFile("cyber/dmn/v1beta1/types.proto", fileDescriptor_a414790454046b0b) }
var fileDescriptor_a414790454046b0b = []byte{
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xbd, 0x8e, 0xd3, 0x40,
0x10, 0xb6, 0xef, 0x9c, 0xbf, 0x3d, 0x90, 0x60, 0x15, 0x71, 0x26, 0xe8, 0x1c, 0x94, 0x06, 0x9a,
0xd8, 0xca, 0xd1, 0xa5, 0x23, 0x14, 0xd7, 0x50, 0x9c, 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5, 0x47, 0x57, 0x9a, 0x68, 0xf5,
0x1f, 0xa3, 0x76, 0xca, 0x1d, 0x1d, 0x28, 0xd7, 0x45, 0x8d, 0x94, 0x14, 0x85, 0x02, 0x07, 0xbc,
0xd8, 0x02, 0x93, 0x39, 0xa7, 0x54, 0x81, 0xc6, 0x5e, 0x0c, 0x31, 0x7e, 0x82, 0x8e, 0xcd, 0x05,
0x6a, 0xc0, 0x91, 0x09, 0xf1, 0x19, 0x42, 0x05, 0x51, 0x7a, 0x66, 0x15, 0x6b, 0x02, 0xd1, 0x31,
0x27, 0x93, 0x3f, 0x55, 0x9b, 0x5c, 0xdc, 0x6e, 0x02, 0xf7, 0x6e, 0x13, 0xb8, 0x3f, 0x37, 0x81,
0xfb, 0x75, 0x1b, 0x38, 0x77, 0xdb, 0xc0, 0xf9, 0xb1, 0x0d, 0x9c, 0x0f, 0xc3, 0xc3, 0xd5, 0x8d,
0xf7, 0xa9, 0x28, 0x99, 0xa4, 0x4a, 0x45, 0x4c, 0x0c, 0xed, 0x23, 0x5a, 0xc1, 0x33, 0x02, 0x15,
0x92, 0x26, 0x5c, 0xfb, 0x37, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xd9, 0xbc, 0x48, 0x60,
0x03, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Params)
if !ok {
that2, ok := that.(Params)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.MaxSlots != that1.MaxSlots {
return false
}
if this.MaxGas != that1.MaxGas {
return false
}
if this.FeeTtl != that1.FeeTtl {
return false
}
return true
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.FeeTtl != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.FeeTtl))
i--
dAtA[i] = 0x18
}
if m.MaxGas != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas))
i--
dAtA[i] = 0x10
}
if m.MaxSlots != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.MaxSlots))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Thought) 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 *Thought) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Thought) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Particle) > 0 {
i -= len(m.Particle)
copy(dAtA[i:], m.Particle)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Particle)))
i--
dAtA[i] = 0x2a
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x22
}
{
size, err := m.Load.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
{
size, err := m.Trigger.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
if len(m.Program) > 0 {
i -= len(m.Program)
copy(dAtA[i:], m.Program)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Program)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Trigger) 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 *Trigger) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Trigger) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Block != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Block))
i--
dAtA[i] = 0x10
}
if m.Period != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Period))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Load) 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 *Load) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Load) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.GasPrice.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
if len(m.Input) > 0 {
i -= len(m.Input)
copy(dAtA[i:], m.Input)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Input)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ThoughtStats) 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 *ThoughtStats) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ThoughtStats) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.LastBlock != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.LastBlock))
i--
dAtA[i] = 0x30
}
if m.Gas != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Gas))
i--
dAtA[i] = 0x28
}
if m.Fees != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Fees))
i--
dAtA[i] = 0x20
}
if m.Calls != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.Calls))
i--
dAtA[i] = 0x18
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x12
}
if len(m.Program) > 0 {
i -= len(m.Program)
copy(dAtA[i:], m.Program)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Program)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
offset -= sovTypes(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Params) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.MaxSlots != 0 {
n += 1 + sovTypes(uint64(m.MaxSlots))
}
if m.MaxGas != 0 {
n += 1 + sovTypes(uint64(m.MaxGas))
}
if m.FeeTtl != 0 {
n += 1 + sovTypes(uint64(m.FeeTtl))
}
return n
}
func (m *Thought) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Program)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = m.Trigger.Size()
n += 1 + l + sovTypes(uint64(l))
l = m.Load.Size()
n += 1 + l + sovTypes(uint64(l))
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Particle)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
return n
}
func (m *Trigger) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Period != 0 {
n += 1 + sovTypes(uint64(m.Period))
}
if m.Block != 0 {
n += 1 + sovTypes(uint64(m.Block))
}
return n
}
func (m *Load) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Input)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = m.GasPrice.Size()
n += 1 + l + sovTypes(uint64(l))
return n
}
func (m *ThoughtStats) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Program)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if m.Calls != 0 {
n += 1 + sovTypes(uint64(m.Calls))
}
if m.Fees != 0 {
n += 1 + sovTypes(uint64(m.Fees))
}
if m.Gas != 0 {
n += 1 + sovTypes(uint64(m.Gas))
}
if m.LastBlock != 0 {
n += 1 + sovTypes(uint64(m.LastBlock))
}
return n
}
func sovTypes(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowTypes
}
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: Params: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxSlots", wireType)
}
m.MaxSlots = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxSlots |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
}
m.MaxGas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxGas |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field FeeTtl", wireType)
}
m.FeeTtl = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.FeeTtl |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Thought) 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 ErrIntOverflowTypes
}
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: Thought: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Thought: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Program", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Program = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Trigger", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Trigger.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Load", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Load.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Particle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Particle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Trigger) 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 ErrIntOverflowTypes
}
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: Trigger: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Trigger: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType)
}
m.Period = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Period |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
}
m.Block = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Block |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Load) 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 ErrIntOverflowTypes
}
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: Load: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Load: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Input = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ThoughtStats) 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 ErrIntOverflowTypes
}
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: ThoughtStats: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ThoughtStats: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Program", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Program = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
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 ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType)
}
m.Calls = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Calls |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType)
}
m.Fees = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Fees |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Gas", wireType)
}
m.Gas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Gas |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LastBlock", wireType)
}
m.LastBlock = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LastBlock |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrInvalidLengthTypes
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTypes
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTypes
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)