github.com/ethersphere/bee/v2@v2.2.0/pkg/pricing/pb/pricing.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: pricing.proto 3 4 package pb 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type AnnouncePaymentThreshold struct { 26 PaymentThreshold []byte `protobuf:"bytes,1,opt,name=PaymentThreshold,proto3" json:"PaymentThreshold,omitempty"` 27 } 28 29 func (m *AnnouncePaymentThreshold) Reset() { *m = AnnouncePaymentThreshold{} } 30 func (m *AnnouncePaymentThreshold) String() string { return proto.CompactTextString(m) } 31 func (*AnnouncePaymentThreshold) ProtoMessage() {} 32 func (*AnnouncePaymentThreshold) Descriptor() ([]byte, []int) { 33 return fileDescriptor_ec4cc93d045d43d0, []int{0} 34 } 35 func (m *AnnouncePaymentThreshold) XXX_Unmarshal(b []byte) error { 36 return m.Unmarshal(b) 37 } 38 func (m *AnnouncePaymentThreshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 39 if deterministic { 40 return xxx_messageInfo_AnnouncePaymentThreshold.Marshal(b, m, deterministic) 41 } else { 42 b = b[:cap(b)] 43 n, err := m.MarshalToSizedBuffer(b) 44 if err != nil { 45 return nil, err 46 } 47 return b[:n], nil 48 } 49 } 50 func (m *AnnouncePaymentThreshold) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_AnnouncePaymentThreshold.Merge(m, src) 52 } 53 func (m *AnnouncePaymentThreshold) XXX_Size() int { 54 return m.Size() 55 } 56 func (m *AnnouncePaymentThreshold) XXX_DiscardUnknown() { 57 xxx_messageInfo_AnnouncePaymentThreshold.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_AnnouncePaymentThreshold proto.InternalMessageInfo 61 62 func (m *AnnouncePaymentThreshold) GetPaymentThreshold() []byte { 63 if m != nil { 64 return m.PaymentThreshold 65 } 66 return nil 67 } 68 69 func init() { 70 proto.RegisterType((*AnnouncePaymentThreshold)(nil), "pricing.AnnouncePaymentThreshold") 71 } 72 73 func init() { proto.RegisterFile("pricing.proto", fileDescriptor_ec4cc93d045d43d0) } 74 75 var fileDescriptor_ec4cc93d045d43d0 = []byte{ 76 // 122 bytes of a gzipped FileDescriptorProto 77 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x28, 0xca, 0x4c, 78 0xce, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0xdc, 0xb8, 79 0x24, 0x1c, 0xf3, 0xf2, 0xf2, 0x4b, 0xf3, 0x92, 0x53, 0x03, 0x12, 0x2b, 0x73, 0x53, 0xf3, 0x4a, 80 0x42, 0x32, 0x8a, 0x52, 0x8b, 0x33, 0xf2, 0x73, 0x52, 0x84, 0xb4, 0xb8, 0x04, 0xd0, 0xc5, 0x24, 81 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0x30, 0xc4, 0x9d, 0x64, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 82 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 83 0xf1, 0x58, 0x8e, 0x21, 0x8a, 0xa9, 0x20, 0x29, 0x89, 0x0d, 0x6c, 0xab, 0x31, 0x20, 0x00, 0x00, 84 0xff, 0xff, 0x50, 0xca, 0x0e, 0x0a, 0x86, 0x00, 0x00, 0x00, 85 } 86 87 func (m *AnnouncePaymentThreshold) Marshal() (dAtA []byte, err error) { 88 size := m.Size() 89 dAtA = make([]byte, size) 90 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 91 if err != nil { 92 return nil, err 93 } 94 return dAtA[:n], nil 95 } 96 97 func (m *AnnouncePaymentThreshold) MarshalTo(dAtA []byte) (int, error) { 98 size := m.Size() 99 return m.MarshalToSizedBuffer(dAtA[:size]) 100 } 101 102 func (m *AnnouncePaymentThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { 103 i := len(dAtA) 104 _ = i 105 var l int 106 _ = l 107 if len(m.PaymentThreshold) > 0 { 108 i -= len(m.PaymentThreshold) 109 copy(dAtA[i:], m.PaymentThreshold) 110 i = encodeVarintPricing(dAtA, i, uint64(len(m.PaymentThreshold))) 111 i-- 112 dAtA[i] = 0xa 113 } 114 return len(dAtA) - i, nil 115 } 116 117 func encodeVarintPricing(dAtA []byte, offset int, v uint64) int { 118 offset -= sovPricing(v) 119 base := offset 120 for v >= 1<<7 { 121 dAtA[offset] = uint8(v&0x7f | 0x80) 122 v >>= 7 123 offset++ 124 } 125 dAtA[offset] = uint8(v) 126 return base 127 } 128 func (m *AnnouncePaymentThreshold) Size() (n int) { 129 if m == nil { 130 return 0 131 } 132 var l int 133 _ = l 134 l = len(m.PaymentThreshold) 135 if l > 0 { 136 n += 1 + l + sovPricing(uint64(l)) 137 } 138 return n 139 } 140 141 func sovPricing(x uint64) (n int) { 142 return (math_bits.Len64(x|1) + 6) / 7 143 } 144 func sozPricing(x uint64) (n int) { 145 return sovPricing(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 146 } 147 func (m *AnnouncePaymentThreshold) Unmarshal(dAtA []byte) error { 148 l := len(dAtA) 149 iNdEx := 0 150 for iNdEx < l { 151 preIndex := iNdEx 152 var wire uint64 153 for shift := uint(0); ; shift += 7 { 154 if shift >= 64 { 155 return ErrIntOverflowPricing 156 } 157 if iNdEx >= l { 158 return io.ErrUnexpectedEOF 159 } 160 b := dAtA[iNdEx] 161 iNdEx++ 162 wire |= uint64(b&0x7F) << shift 163 if b < 0x80 { 164 break 165 } 166 } 167 fieldNum := int32(wire >> 3) 168 wireType := int(wire & 0x7) 169 if wireType == 4 { 170 return fmt.Errorf("proto: AnnouncePaymentThreshold: wiretype end group for non-group") 171 } 172 if fieldNum <= 0 { 173 return fmt.Errorf("proto: AnnouncePaymentThreshold: illegal tag %d (wire type %d)", fieldNum, wire) 174 } 175 switch fieldNum { 176 case 1: 177 if wireType != 2 { 178 return fmt.Errorf("proto: wrong wireType = %d for field PaymentThreshold", wireType) 179 } 180 var byteLen int 181 for shift := uint(0); ; shift += 7 { 182 if shift >= 64 { 183 return ErrIntOverflowPricing 184 } 185 if iNdEx >= l { 186 return io.ErrUnexpectedEOF 187 } 188 b := dAtA[iNdEx] 189 iNdEx++ 190 byteLen |= int(b&0x7F) << shift 191 if b < 0x80 { 192 break 193 } 194 } 195 if byteLen < 0 { 196 return ErrInvalidLengthPricing 197 } 198 postIndex := iNdEx + byteLen 199 if postIndex < 0 { 200 return ErrInvalidLengthPricing 201 } 202 if postIndex > l { 203 return io.ErrUnexpectedEOF 204 } 205 m.PaymentThreshold = append(m.PaymentThreshold[:0], dAtA[iNdEx:postIndex]...) 206 if m.PaymentThreshold == nil { 207 m.PaymentThreshold = []byte{} 208 } 209 iNdEx = postIndex 210 default: 211 iNdEx = preIndex 212 skippy, err := skipPricing(dAtA[iNdEx:]) 213 if err != nil { 214 return err 215 } 216 if skippy < 0 { 217 return ErrInvalidLengthPricing 218 } 219 if (iNdEx + skippy) < 0 { 220 return ErrInvalidLengthPricing 221 } 222 if (iNdEx + skippy) > l { 223 return io.ErrUnexpectedEOF 224 } 225 iNdEx += skippy 226 } 227 } 228 229 if iNdEx > l { 230 return io.ErrUnexpectedEOF 231 } 232 return nil 233 } 234 func skipPricing(dAtA []byte) (n int, err error) { 235 l := len(dAtA) 236 iNdEx := 0 237 depth := 0 238 for iNdEx < l { 239 var wire uint64 240 for shift := uint(0); ; shift += 7 { 241 if shift >= 64 { 242 return 0, ErrIntOverflowPricing 243 } 244 if iNdEx >= l { 245 return 0, io.ErrUnexpectedEOF 246 } 247 b := dAtA[iNdEx] 248 iNdEx++ 249 wire |= (uint64(b) & 0x7F) << shift 250 if b < 0x80 { 251 break 252 } 253 } 254 wireType := int(wire & 0x7) 255 switch wireType { 256 case 0: 257 for shift := uint(0); ; shift += 7 { 258 if shift >= 64 { 259 return 0, ErrIntOverflowPricing 260 } 261 if iNdEx >= l { 262 return 0, io.ErrUnexpectedEOF 263 } 264 iNdEx++ 265 if dAtA[iNdEx-1] < 0x80 { 266 break 267 } 268 } 269 case 1: 270 iNdEx += 8 271 case 2: 272 var length int 273 for shift := uint(0); ; shift += 7 { 274 if shift >= 64 { 275 return 0, ErrIntOverflowPricing 276 } 277 if iNdEx >= l { 278 return 0, io.ErrUnexpectedEOF 279 } 280 b := dAtA[iNdEx] 281 iNdEx++ 282 length |= (int(b) & 0x7F) << shift 283 if b < 0x80 { 284 break 285 } 286 } 287 if length < 0 { 288 return 0, ErrInvalidLengthPricing 289 } 290 iNdEx += length 291 case 3: 292 depth++ 293 case 4: 294 if depth == 0 { 295 return 0, ErrUnexpectedEndOfGroupPricing 296 } 297 depth-- 298 case 5: 299 iNdEx += 4 300 default: 301 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 302 } 303 if iNdEx < 0 { 304 return 0, ErrInvalidLengthPricing 305 } 306 if depth == 0 { 307 return iNdEx, nil 308 } 309 } 310 return 0, io.ErrUnexpectedEOF 311 } 312 313 var ( 314 ErrInvalidLengthPricing = fmt.Errorf("proto: negative length found during unmarshaling") 315 ErrIntOverflowPricing = fmt.Errorf("proto: integer overflow") 316 ErrUnexpectedEndOfGroupPricing = fmt.Errorf("proto: unexpected end of group") 317 )