github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/acm/balance/balance.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: balance.proto 3 4 package balance 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 golang_proto "github.com/golang/protobuf/proto" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = golang_proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 type Balance struct { 30 Type Type `protobuf:"varint,1,opt,name=Type,proto3,casttype=Type" json:"Type,omitempty"` 31 Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` 32 XXX_unrecognized []byte `json:"-"` 33 } 34 35 func (m *Balance) Reset() { *m = Balance{} } 36 func (*Balance) ProtoMessage() {} 37 func (*Balance) Descriptor() ([]byte, []int) { 38 return fileDescriptor_ee25a00b628521b1, []int{0} 39 } 40 func (m *Balance) XXX_Unmarshal(b []byte) error { 41 return m.Unmarshal(b) 42 } 43 func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 b = b[:cap(b)] 45 n, err := m.MarshalToSizedBuffer(b) 46 if err != nil { 47 return nil, err 48 } 49 return b[:n], nil 50 } 51 func (m *Balance) XXX_Merge(src proto.Message) { 52 xxx_messageInfo_Balance.Merge(m, src) 53 } 54 func (m *Balance) XXX_Size() int { 55 return m.Size() 56 } 57 func (m *Balance) XXX_DiscardUnknown() { 58 xxx_messageInfo_Balance.DiscardUnknown(m) 59 } 60 61 var xxx_messageInfo_Balance proto.InternalMessageInfo 62 63 func (m *Balance) GetType() Type { 64 if m != nil { 65 return m.Type 66 } 67 return 0 68 } 69 70 func (m *Balance) GetAmount() uint64 { 71 if m != nil { 72 return m.Amount 73 } 74 return 0 75 } 76 77 func (*Balance) XXX_MessageName() string { 78 return "balance.Balance" 79 } 80 func init() { 81 proto.RegisterType((*Balance)(nil), "balance.Balance") 82 golang_proto.RegisterType((*Balance)(nil), "balance.Balance") 83 } 84 85 func init() { proto.RegisterFile("balance.proto", fileDescriptor_ee25a00b628521b1) } 86 func init() { golang_proto.RegisterFile("balance.proto", fileDescriptor_ee25a00b628521b1) } 87 88 var fileDescriptor_ee25a00b628521b1 = []byte{ 89 // 190 bytes of a gzipped FileDescriptorProto 90 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x4a, 0xcc, 0x49, 91 0xcc, 0x4b, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x44, 0xd2, 92 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0xc9, 0x97, 0x8b, 0xdd, 0x09, 0xa2, 93 0x40, 0x48, 0x86, 0x8b, 0x25, 0xa4, 0xb2, 0x20, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd7, 0x89, 94 0xe3, 0xd7, 0x3d, 0x79, 0x30, 0x3f, 0x08, 0x4c, 0x0a, 0x89, 0x71, 0xb1, 0x39, 0xe6, 0xe6, 0x97, 95 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xb0, 0x04, 0x41, 0x79, 0x56, 0x3c, 0x33, 0x16, 0xc8, 96 0x33, 0x4c, 0x58, 0x24, 0xcf, 0x30, 0x63, 0x91, 0x3c, 0x83, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 97 0x17, 0x1e, 0xc9, 0x31, 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, 98 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x46, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 99 0xe7, 0xea, 0x67, 0x54, 0x16, 0xa4, 0x16, 0xe5, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x27, 0x95, 100 0x16, 0x15, 0xe5, 0x97, 0xeb, 0x27, 0x26, 0xe7, 0xea, 0x43, 0x5d, 0x9a, 0xc4, 0x06, 0x76, 0x9a, 101 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x53, 0xf0, 0x13, 0xca, 0x00, 0x00, 0x00, 102 } 103 104 func (m *Balance) Marshal() (dAtA []byte, err error) { 105 size := m.Size() 106 dAtA = make([]byte, size) 107 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 108 if err != nil { 109 return nil, err 110 } 111 return dAtA[:n], nil 112 } 113 114 func (m *Balance) MarshalTo(dAtA []byte) (int, error) { 115 size := m.Size() 116 return m.MarshalToSizedBuffer(dAtA[:size]) 117 } 118 119 func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 120 i := len(dAtA) 121 _ = i 122 var l int 123 _ = l 124 if m.XXX_unrecognized != nil { 125 i -= len(m.XXX_unrecognized) 126 copy(dAtA[i:], m.XXX_unrecognized) 127 } 128 if m.Amount != 0 { 129 i = encodeVarintBalance(dAtA, i, uint64(m.Amount)) 130 i-- 131 dAtA[i] = 0x10 132 } 133 if m.Type != 0 { 134 i = encodeVarintBalance(dAtA, i, uint64(m.Type)) 135 i-- 136 dAtA[i] = 0x8 137 } 138 return len(dAtA) - i, nil 139 } 140 141 func encodeVarintBalance(dAtA []byte, offset int, v uint64) int { 142 offset -= sovBalance(v) 143 base := offset 144 for v >= 1<<7 { 145 dAtA[offset] = uint8(v&0x7f | 0x80) 146 v >>= 7 147 offset++ 148 } 149 dAtA[offset] = uint8(v) 150 return base 151 } 152 func (m *Balance) Size() (n int) { 153 if m == nil { 154 return 0 155 } 156 var l int 157 _ = l 158 if m.Type != 0 { 159 n += 1 + sovBalance(uint64(m.Type)) 160 } 161 if m.Amount != 0 { 162 n += 1 + sovBalance(uint64(m.Amount)) 163 } 164 if m.XXX_unrecognized != nil { 165 n += len(m.XXX_unrecognized) 166 } 167 return n 168 } 169 170 func sovBalance(x uint64) (n int) { 171 return (math_bits.Len64(x|1) + 6) / 7 172 } 173 func sozBalance(x uint64) (n int) { 174 return sovBalance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 175 } 176 func (m *Balance) Unmarshal(dAtA []byte) error { 177 l := len(dAtA) 178 iNdEx := 0 179 for iNdEx < l { 180 preIndex := iNdEx 181 var wire uint64 182 for shift := uint(0); ; shift += 7 { 183 if shift >= 64 { 184 return ErrIntOverflowBalance 185 } 186 if iNdEx >= l { 187 return io.ErrUnexpectedEOF 188 } 189 b := dAtA[iNdEx] 190 iNdEx++ 191 wire |= uint64(b&0x7F) << shift 192 if b < 0x80 { 193 break 194 } 195 } 196 fieldNum := int32(wire >> 3) 197 wireType := int(wire & 0x7) 198 if wireType == 4 { 199 return fmt.Errorf("proto: Balance: wiretype end group for non-group") 200 } 201 if fieldNum <= 0 { 202 return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) 203 } 204 switch fieldNum { 205 case 1: 206 if wireType != 0 { 207 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 208 } 209 m.Type = 0 210 for shift := uint(0); ; shift += 7 { 211 if shift >= 64 { 212 return ErrIntOverflowBalance 213 } 214 if iNdEx >= l { 215 return io.ErrUnexpectedEOF 216 } 217 b := dAtA[iNdEx] 218 iNdEx++ 219 m.Type |= Type(b&0x7F) << shift 220 if b < 0x80 { 221 break 222 } 223 } 224 case 2: 225 if wireType != 0 { 226 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 227 } 228 m.Amount = 0 229 for shift := uint(0); ; shift += 7 { 230 if shift >= 64 { 231 return ErrIntOverflowBalance 232 } 233 if iNdEx >= l { 234 return io.ErrUnexpectedEOF 235 } 236 b := dAtA[iNdEx] 237 iNdEx++ 238 m.Amount |= uint64(b&0x7F) << shift 239 if b < 0x80 { 240 break 241 } 242 } 243 default: 244 iNdEx = preIndex 245 skippy, err := skipBalance(dAtA[iNdEx:]) 246 if err != nil { 247 return err 248 } 249 if (skippy < 0) || (iNdEx+skippy) < 0 { 250 return ErrInvalidLengthBalance 251 } 252 if (iNdEx + skippy) > l { 253 return io.ErrUnexpectedEOF 254 } 255 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 256 iNdEx += skippy 257 } 258 } 259 260 if iNdEx > l { 261 return io.ErrUnexpectedEOF 262 } 263 return nil 264 } 265 func skipBalance(dAtA []byte) (n int, err error) { 266 l := len(dAtA) 267 iNdEx := 0 268 depth := 0 269 for iNdEx < l { 270 var wire uint64 271 for shift := uint(0); ; shift += 7 { 272 if shift >= 64 { 273 return 0, ErrIntOverflowBalance 274 } 275 if iNdEx >= l { 276 return 0, io.ErrUnexpectedEOF 277 } 278 b := dAtA[iNdEx] 279 iNdEx++ 280 wire |= (uint64(b) & 0x7F) << shift 281 if b < 0x80 { 282 break 283 } 284 } 285 wireType := int(wire & 0x7) 286 switch wireType { 287 case 0: 288 for shift := uint(0); ; shift += 7 { 289 if shift >= 64 { 290 return 0, ErrIntOverflowBalance 291 } 292 if iNdEx >= l { 293 return 0, io.ErrUnexpectedEOF 294 } 295 iNdEx++ 296 if dAtA[iNdEx-1] < 0x80 { 297 break 298 } 299 } 300 case 1: 301 iNdEx += 8 302 case 2: 303 var length int 304 for shift := uint(0); ; shift += 7 { 305 if shift >= 64 { 306 return 0, ErrIntOverflowBalance 307 } 308 if iNdEx >= l { 309 return 0, io.ErrUnexpectedEOF 310 } 311 b := dAtA[iNdEx] 312 iNdEx++ 313 length |= (int(b) & 0x7F) << shift 314 if b < 0x80 { 315 break 316 } 317 } 318 if length < 0 { 319 return 0, ErrInvalidLengthBalance 320 } 321 iNdEx += length 322 case 3: 323 depth++ 324 case 4: 325 if depth == 0 { 326 return 0, ErrUnexpectedEndOfGroupBalance 327 } 328 depth-- 329 case 5: 330 iNdEx += 4 331 default: 332 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 333 } 334 if iNdEx < 0 { 335 return 0, ErrInvalidLengthBalance 336 } 337 if depth == 0 { 338 return iNdEx, nil 339 } 340 } 341 return 0, io.ErrUnexpectedEOF 342 } 343 344 var ( 345 ErrInvalidLengthBalance = fmt.Errorf("proto: negative length found during unmarshaling") 346 ErrIntOverflowBalance = fmt.Errorf("proto: integer overflow") 347 ErrUnexpectedEndOfGroupBalance = fmt.Errorf("proto: unexpected end of group") 348 )