github.com/onosproject/onos-api/go@v0.10.32/onos/config/v3/value.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/config/v3/value.proto 3 4 package v3 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // ValueType is the type for a value 27 type ValueType int32 28 29 const ( 30 ValueType_EMPTY ValueType = 0 31 ValueType_STRING ValueType = 1 32 ValueType_INT ValueType = 2 33 ValueType_UINT ValueType = 3 34 ValueType_BOOL ValueType = 4 35 ValueType_DECIMAL ValueType = 5 36 ValueType_FLOAT ValueType = 6 37 ValueType_BYTES ValueType = 7 38 ValueType_LEAFLIST_STRING ValueType = 8 39 ValueType_LEAFLIST_INT ValueType = 9 40 ValueType_LEAFLIST_UINT ValueType = 10 41 ValueType_LEAFLIST_BOOL ValueType = 11 42 ValueType_LEAFLIST_DECIMAL ValueType = 12 43 ValueType_LEAFLIST_FLOAT ValueType = 13 44 ValueType_LEAFLIST_BYTES ValueType = 14 45 ValueType_DOUBLE ValueType = 15 46 ValueType_LEAFLIST_DOUBLE ValueType = 16 47 ) 48 49 var ValueType_name = map[int32]string{ 50 0: "EMPTY", 51 1: "STRING", 52 2: "INT", 53 3: "UINT", 54 4: "BOOL", 55 5: "DECIMAL", 56 6: "FLOAT", 57 7: "BYTES", 58 8: "LEAFLIST_STRING", 59 9: "LEAFLIST_INT", 60 10: "LEAFLIST_UINT", 61 11: "LEAFLIST_BOOL", 62 12: "LEAFLIST_DECIMAL", 63 13: "LEAFLIST_FLOAT", 64 14: "LEAFLIST_BYTES", 65 15: "DOUBLE", 66 16: "LEAFLIST_DOUBLE", 67 } 68 69 var ValueType_value = map[string]int32{ 70 "EMPTY": 0, 71 "STRING": 1, 72 "INT": 2, 73 "UINT": 3, 74 "BOOL": 4, 75 "DECIMAL": 5, 76 "FLOAT": 6, 77 "BYTES": 7, 78 "LEAFLIST_STRING": 8, 79 "LEAFLIST_INT": 9, 80 "LEAFLIST_UINT": 10, 81 "LEAFLIST_BOOL": 11, 82 "LEAFLIST_DECIMAL": 12, 83 "LEAFLIST_FLOAT": 13, 84 "LEAFLIST_BYTES": 14, 85 "DOUBLE": 15, 86 "LEAFLIST_DOUBLE": 16, 87 } 88 89 func (x ValueType) String() string { 90 return proto.EnumName(ValueType_name, int32(x)) 91 } 92 93 func (ValueType) EnumDescriptor() ([]byte, []int) { 94 return fileDescriptor_01f711a645f5c9b0, []int{0} 95 } 96 97 // TypedValue is a value represented as a byte array 98 type TypedValue struct { 99 // 'bytes' is the bytes array 100 Bytes []byte `protobuf:"bytes,1,opt,name=bytes,json=Bytes,proto3" json:"Bytes,omitempty"` 101 // 'type' is the value type 102 Type ValueType `protobuf:"varint,2,opt,name=type,json=Type,proto3,enum=onos.config.v3.ValueType" json:"Type,omitempty"` 103 // 'type_opts' is a set of type options 104 TypeOpts []int32 `protobuf:"varint,3,rep,packed,name=type_opts,json=TypeOpts,proto3" json:"TypeOpts,omitempty"` 105 } 106 107 func (m *TypedValue) Reset() { *m = TypedValue{} } 108 func (m *TypedValue) String() string { return proto.CompactTextString(m) } 109 func (*TypedValue) ProtoMessage() {} 110 func (*TypedValue) Descriptor() ([]byte, []int) { 111 return fileDescriptor_01f711a645f5c9b0, []int{0} 112 } 113 func (m *TypedValue) XXX_Unmarshal(b []byte) error { 114 return m.Unmarshal(b) 115 } 116 func (m *TypedValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 117 if deterministic { 118 return xxx_messageInfo_TypedValue.Marshal(b, m, deterministic) 119 } else { 120 b = b[:cap(b)] 121 n, err := m.MarshalToSizedBuffer(b) 122 if err != nil { 123 return nil, err 124 } 125 return b[:n], nil 126 } 127 } 128 func (m *TypedValue) XXX_Merge(src proto.Message) { 129 xxx_messageInfo_TypedValue.Merge(m, src) 130 } 131 func (m *TypedValue) XXX_Size() int { 132 return m.Size() 133 } 134 func (m *TypedValue) XXX_DiscardUnknown() { 135 xxx_messageInfo_TypedValue.DiscardUnknown(m) 136 } 137 138 var xxx_messageInfo_TypedValue proto.InternalMessageInfo 139 140 func (m *TypedValue) GetBytes() []byte { 141 if m != nil { 142 return m.Bytes 143 } 144 return nil 145 } 146 147 func (m *TypedValue) GetType() ValueType { 148 if m != nil { 149 return m.Type 150 } 151 return ValueType_EMPTY 152 } 153 154 func (m *TypedValue) GetTypeOpts() []int32 { 155 if m != nil { 156 return m.TypeOpts 157 } 158 return nil 159 } 160 161 // PathValues is a set of path/value pairs 162 type PathValues struct { 163 // 'values' is a set of change values to apply 164 Values map[string]PathValue `protobuf:"bytes,4,rep,name=values,proto3" json:"values" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 165 } 166 167 func (m *PathValues) Reset() { *m = PathValues{} } 168 func (m *PathValues) String() string { return proto.CompactTextString(m) } 169 func (*PathValues) ProtoMessage() {} 170 func (*PathValues) Descriptor() ([]byte, []int) { 171 return fileDescriptor_01f711a645f5c9b0, []int{1} 172 } 173 func (m *PathValues) XXX_Unmarshal(b []byte) error { 174 return m.Unmarshal(b) 175 } 176 func (m *PathValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 177 if deterministic { 178 return xxx_messageInfo_PathValues.Marshal(b, m, deterministic) 179 } else { 180 b = b[:cap(b)] 181 n, err := m.MarshalToSizedBuffer(b) 182 if err != nil { 183 return nil, err 184 } 185 return b[:n], nil 186 } 187 } 188 func (m *PathValues) XXX_Merge(src proto.Message) { 189 xxx_messageInfo_PathValues.Merge(m, src) 190 } 191 func (m *PathValues) XXX_Size() int { 192 return m.Size() 193 } 194 func (m *PathValues) XXX_DiscardUnknown() { 195 xxx_messageInfo_PathValues.DiscardUnknown(m) 196 } 197 198 var xxx_messageInfo_PathValues proto.InternalMessageInfo 199 200 func (m *PathValues) GetValues() map[string]PathValue { 201 if m != nil { 202 return m.Values 203 } 204 return nil 205 } 206 207 // PathValue is the state of a path/value in the configuration tree 208 type PathValue struct { 209 // 'path' is the path to change 210 Path string `protobuf:"bytes,1,opt,name=path,json=Path,proto3" json:"Path,omitempty"` 211 // 'value' is the change value 212 Value TypedValue `protobuf:"bytes,2,opt,name=value,json=Value,proto3" json:"Value,omitempty"` 213 // 'deleted' indicates whether this is a delete 214 Deleted bool `protobuf:"varint,3,opt,name=deleted,proto3" json:"Deleted,omitempty"` 215 // index transaction index 216 Index Index `protobuf:"varint,4,opt,name=index,proto3,casttype=Index" json:"index,omitempty"` 217 } 218 219 func (m *PathValue) Reset() { *m = PathValue{} } 220 func (m *PathValue) String() string { return proto.CompactTextString(m) } 221 func (*PathValue) ProtoMessage() {} 222 func (*PathValue) Descriptor() ([]byte, []int) { 223 return fileDescriptor_01f711a645f5c9b0, []int{2} 224 } 225 func (m *PathValue) XXX_Unmarshal(b []byte) error { 226 return m.Unmarshal(b) 227 } 228 func (m *PathValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 229 if deterministic { 230 return xxx_messageInfo_PathValue.Marshal(b, m, deterministic) 231 } else { 232 b = b[:cap(b)] 233 n, err := m.MarshalToSizedBuffer(b) 234 if err != nil { 235 return nil, err 236 } 237 return b[:n], nil 238 } 239 } 240 func (m *PathValue) XXX_Merge(src proto.Message) { 241 xxx_messageInfo_PathValue.Merge(m, src) 242 } 243 func (m *PathValue) XXX_Size() int { 244 return m.Size() 245 } 246 func (m *PathValue) XXX_DiscardUnknown() { 247 xxx_messageInfo_PathValue.DiscardUnknown(m) 248 } 249 250 var xxx_messageInfo_PathValue proto.InternalMessageInfo 251 252 func (m *PathValue) GetPath() string { 253 if m != nil { 254 return m.Path 255 } 256 return "" 257 } 258 259 func (m *PathValue) GetValue() TypedValue { 260 if m != nil { 261 return m.Value 262 } 263 return TypedValue{} 264 } 265 266 func (m *PathValue) GetDeleted() bool { 267 if m != nil { 268 return m.Deleted 269 } 270 return false 271 } 272 273 func (m *PathValue) GetIndex() Index { 274 if m != nil { 275 return m.Index 276 } 277 return 0 278 } 279 280 func init() { 281 proto.RegisterEnum("onos.config.v3.ValueType", ValueType_name, ValueType_value) 282 proto.RegisterType((*TypedValue)(nil), "onos.config.v3.TypedValue") 283 proto.RegisterType((*PathValues)(nil), "onos.config.v3.PathValues") 284 proto.RegisterMapType((map[string]PathValue)(nil), "onos.config.v3.PathValues.ValuesEntry") 285 proto.RegisterType((*PathValue)(nil), "onos.config.v3.PathValue") 286 } 287 288 func init() { proto.RegisterFile("onos/config/v3/value.proto", fileDescriptor_01f711a645f5c9b0) } 289 290 var fileDescriptor_01f711a645f5c9b0 = []byte{ 291 // 553 bytes of a gzipped FileDescriptorProto 292 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x93, 0xc1, 0x6e, 0xda, 0x40, 293 0x10, 0x86, 0x59, 0x6c, 0x03, 0x1e, 0x12, 0xb2, 0xd9, 0xa4, 0xad, 0xcb, 0xc1, 0xb6, 0x38, 0x44, 294 0x6e, 0x55, 0x61, 0x29, 0x5c, 0xaa, 0xde, 0xd8, 0xe2, 0x54, 0x96, 0x9c, 0x10, 0x19, 0xa7, 0x52, 295 0x4e, 0x11, 0x29, 0x2e, 0x41, 0x4d, 0xb0, 0x15, 0xbb, 0xa8, 0x7e, 0x89, 0xaa, 0x8f, 0xd1, 0x5b, 296 0x5f, 0x23, 0x47, 0x8e, 0x3d, 0x59, 0x15, 0xdc, 0x78, 0x84, 0x9e, 0xaa, 0x5d, 0x83, 0x63, 0xd2, 297 0xdb, 0xec, 0xf7, 0x8f, 0xff, 0x7f, 0x66, 0x57, 0x86, 0x66, 0x30, 0x0d, 0x22, 0xf3, 0x53, 0x30, 298 0xfd, 0x3c, 0x19, 0x9b, 0xb3, 0x8e, 0x39, 0x1b, 0xde, 0x7e, 0xf5, 0xdb, 0xe1, 0x7d, 0x10, 0x07, 299 0xa4, 0xc1, 0xb4, 0x76, 0xa6, 0xb5, 0x67, 0x9d, 0xe6, 0xe1, 0x38, 0x18, 0x07, 0x5c, 0x32, 0x59, 300 0x95, 0x75, 0xb5, 0x7e, 0x21, 0x00, 0x2f, 0x09, 0xfd, 0xd1, 0x47, 0xf6, 0x29, 0x79, 0x05, 0xd2, 301 0x75, 0x12, 0xfb, 0x91, 0x82, 0x74, 0x64, 0xec, 0xd0, 0x83, 0x55, 0xaa, 0xed, 0x51, 0x06, 0xde, 302 0x04, 0x77, 0x93, 0xd8, 0xbf, 0x0b, 0xe3, 0xc4, 0x95, 0x38, 0x20, 0x5d, 0x10, 0xe3, 0x24, 0xf4, 303 0x95, 0xb2, 0x8e, 0x8c, 0xc6, 0xf1, 0xcb, 0xf6, 0x76, 0x5c, 0x9b, 0xfb, 0x31, 0x67, 0x4a, 0x56, 304 0xa9, 0xd6, 0x60, 0x55, 0xc1, 0x43, 0x64, 0x67, 0xd2, 0x01, 0x99, 0x59, 0x5c, 0x05, 0x61, 0x1c, 305 0x29, 0x82, 0x2e, 0x18, 0x12, 0x7d, 0xbe, 0x4a, 0x35, 0xc2, 0xc4, 0x7e, 0x18, 0x17, 0x43, 0x6b, 306 0x1b, 0xd6, 0xfa, 0x89, 0x00, 0xce, 0x87, 0xf1, 0x0d, 0x0f, 0x88, 0x48, 0x0f, 0x2a, 0x7c, 0xeb, 307 0x48, 0x11, 0x75, 0xc1, 0xa8, 0x1f, 0x1f, 0x3d, 0x1d, 0xe4, 0xb1, 0x37, 0x9b, 0x29, 0xb2, 0xa6, 308 0xf1, 0x7d, 0x42, 0xc5, 0x87, 0x54, 0x2b, 0xb9, 0xeb, 0x6f, 0x9b, 0x1e, 0xd4, 0x0b, 0x22, 0xc1, 309 0x20, 0x7c, 0xf1, 0x13, 0x7e, 0x09, 0xb2, 0xcb, 0x4a, 0x62, 0x82, 0xc4, 0x5b, 0xf9, 0xba, 0xf5, 310 0xff, 0xd7, 0xcd, 0x53, 0xdc, 0xac, 0xef, 0x5d, 0xf9, 0x2d, 0x6a, 0xcd, 0x11, 0xc8, 0xb9, 0x40, 311 0x8e, 0x40, 0x0c, 0x87, 0xf1, 0x4d, 0xe6, 0x9a, 0xdd, 0x0a, 0x13, 0x8b, 0xb7, 0xc2, 0xce, 0xc4, 312 0xde, 0x8e, 0x6a, 0x3e, 0x8d, 0x7a, 0x7c, 0x2e, 0xfa, 0x82, 0x2d, 0xc1, 0xde, 0x88, 0x1f, 0x8b, 313 0x6f, 0x94, 0x45, 0x9a, 0x50, 0x1d, 0xf9, 0xb7, 0x7e, 0xec, 0x8f, 0x14, 0x41, 0x47, 0x46, 0x8d, 314 0x3e, 0x5b, 0xa5, 0xda, 0x7e, 0x2f, 0x43, 0x85, 0xf6, 0x4d, 0x17, 0xd1, 0x40, 0x9a, 0x4c, 0x47, 315 0xfe, 0x37, 0x45, 0xd4, 0x91, 0x21, 0x52, 0xf9, 0x6f, 0xaa, 0x49, 0x36, 0x03, 0x6e, 0xc6, 0x5f, 316 0x7f, 0x2f, 0x83, 0x9c, 0x3f, 0x2d, 0x91, 0x41, 0xb2, 0x4e, 0xcf, 0xbd, 0x4b, 0x5c, 0x22, 0x00, 317 0x95, 0x81, 0xe7, 0xda, 0x67, 0x1f, 0x30, 0x22, 0x55, 0x10, 0xec, 0x33, 0x0f, 0x97, 0x49, 0x0d, 318 0xc4, 0x0b, 0x56, 0x09, 0xac, 0xa2, 0xfd, 0xbe, 0x83, 0x45, 0x52, 0x87, 0x6a, 0xcf, 0x7a, 0x6f, 319 0x9f, 0x76, 0x1d, 0x2c, 0x31, 0x83, 0x13, 0xa7, 0xdf, 0xf5, 0x70, 0x85, 0x95, 0xf4, 0xd2, 0xb3, 320 0x06, 0xb8, 0x4a, 0x0e, 0x60, 0xcf, 0xb1, 0xba, 0x27, 0x8e, 0x3d, 0xf0, 0xae, 0xd6, 0xa6, 0x35, 321 0x82, 0x61, 0x27, 0x87, 0xcc, 0x53, 0x26, 0xfb, 0xb0, 0x9b, 0x13, 0x1e, 0x03, 0x5b, 0x88, 0xe7, 322 0xd5, 0xc9, 0x21, 0xe0, 0x1c, 0x6d, 0x82, 0x77, 0x08, 0x81, 0x46, 0x4e, 0xb3, 0x09, 0x76, 0xb7, 323 0x58, 0x36, 0x4a, 0x83, 0xad, 0xd5, 0xeb, 0x5f, 0x50, 0xc7, 0xc2, 0x7b, 0x5b, 0x63, 0xad, 0x21, 324 0xa6, 0xca, 0xc3, 0x42, 0x45, 0xf3, 0x85, 0x8a, 0xfe, 0x2c, 0x54, 0xf4, 0x63, 0xa9, 0x96, 0xe6, 325 0x4b, 0xb5, 0xf4, 0x7b, 0xa9, 0x96, 0xae, 0x2b, 0xfc, 0x0f, 0xeb, 0xfc, 0x0b, 0x00, 0x00, 0xff, 326 0xff, 0xcc, 0x12, 0x59, 0xed, 0xa5, 0x03, 0x00, 0x00, 327 } 328 329 func (m *TypedValue) Marshal() (dAtA []byte, err error) { 330 size := m.Size() 331 dAtA = make([]byte, size) 332 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 333 if err != nil { 334 return nil, err 335 } 336 return dAtA[:n], nil 337 } 338 339 func (m *TypedValue) MarshalTo(dAtA []byte) (int, error) { 340 size := m.Size() 341 return m.MarshalToSizedBuffer(dAtA[:size]) 342 } 343 344 func (m *TypedValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { 345 i := len(dAtA) 346 _ = i 347 var l int 348 _ = l 349 if len(m.TypeOpts) > 0 { 350 dAtA2 := make([]byte, len(m.TypeOpts)*10) 351 var j1 int 352 for _, num1 := range m.TypeOpts { 353 num := uint64(num1) 354 for num >= 1<<7 { 355 dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) 356 num >>= 7 357 j1++ 358 } 359 dAtA2[j1] = uint8(num) 360 j1++ 361 } 362 i -= j1 363 copy(dAtA[i:], dAtA2[:j1]) 364 i = encodeVarintValue(dAtA, i, uint64(j1)) 365 i-- 366 dAtA[i] = 0x1a 367 } 368 if m.Type != 0 { 369 i = encodeVarintValue(dAtA, i, uint64(m.Type)) 370 i-- 371 dAtA[i] = 0x10 372 } 373 if len(m.Bytes) > 0 { 374 i -= len(m.Bytes) 375 copy(dAtA[i:], m.Bytes) 376 i = encodeVarintValue(dAtA, i, uint64(len(m.Bytes))) 377 i-- 378 dAtA[i] = 0xa 379 } 380 return len(dAtA) - i, nil 381 } 382 383 func (m *PathValues) Marshal() (dAtA []byte, err error) { 384 size := m.Size() 385 dAtA = make([]byte, size) 386 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 387 if err != nil { 388 return nil, err 389 } 390 return dAtA[:n], nil 391 } 392 393 func (m *PathValues) MarshalTo(dAtA []byte) (int, error) { 394 size := m.Size() 395 return m.MarshalToSizedBuffer(dAtA[:size]) 396 } 397 398 func (m *PathValues) MarshalToSizedBuffer(dAtA []byte) (int, error) { 399 i := len(dAtA) 400 _ = i 401 var l int 402 _ = l 403 if len(m.Values) > 0 { 404 for k := range m.Values { 405 v := m.Values[k] 406 baseI := i 407 { 408 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 409 if err != nil { 410 return 0, err 411 } 412 i -= size 413 i = encodeVarintValue(dAtA, i, uint64(size)) 414 } 415 i-- 416 dAtA[i] = 0x12 417 i -= len(k) 418 copy(dAtA[i:], k) 419 i = encodeVarintValue(dAtA, i, uint64(len(k))) 420 i-- 421 dAtA[i] = 0xa 422 i = encodeVarintValue(dAtA, i, uint64(baseI-i)) 423 i-- 424 dAtA[i] = 0x22 425 } 426 } 427 return len(dAtA) - i, nil 428 } 429 430 func (m *PathValue) Marshal() (dAtA []byte, err error) { 431 size := m.Size() 432 dAtA = make([]byte, size) 433 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 434 if err != nil { 435 return nil, err 436 } 437 return dAtA[:n], nil 438 } 439 440 func (m *PathValue) MarshalTo(dAtA []byte) (int, error) { 441 size := m.Size() 442 return m.MarshalToSizedBuffer(dAtA[:size]) 443 } 444 445 func (m *PathValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { 446 i := len(dAtA) 447 _ = i 448 var l int 449 _ = l 450 if m.Index != 0 { 451 i = encodeVarintValue(dAtA, i, uint64(m.Index)) 452 i-- 453 dAtA[i] = 0x20 454 } 455 if m.Deleted { 456 i-- 457 if m.Deleted { 458 dAtA[i] = 1 459 } else { 460 dAtA[i] = 0 461 } 462 i-- 463 dAtA[i] = 0x18 464 } 465 { 466 size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) 467 if err != nil { 468 return 0, err 469 } 470 i -= size 471 i = encodeVarintValue(dAtA, i, uint64(size)) 472 } 473 i-- 474 dAtA[i] = 0x12 475 if len(m.Path) > 0 { 476 i -= len(m.Path) 477 copy(dAtA[i:], m.Path) 478 i = encodeVarintValue(dAtA, i, uint64(len(m.Path))) 479 i-- 480 dAtA[i] = 0xa 481 } 482 return len(dAtA) - i, nil 483 } 484 485 func encodeVarintValue(dAtA []byte, offset int, v uint64) int { 486 offset -= sovValue(v) 487 base := offset 488 for v >= 1<<7 { 489 dAtA[offset] = uint8(v&0x7f | 0x80) 490 v >>= 7 491 offset++ 492 } 493 dAtA[offset] = uint8(v) 494 return base 495 } 496 func (m *TypedValue) Size() (n int) { 497 if m == nil { 498 return 0 499 } 500 var l int 501 _ = l 502 l = len(m.Bytes) 503 if l > 0 { 504 n += 1 + l + sovValue(uint64(l)) 505 } 506 if m.Type != 0 { 507 n += 1 + sovValue(uint64(m.Type)) 508 } 509 if len(m.TypeOpts) > 0 { 510 l = 0 511 for _, e := range m.TypeOpts { 512 l += sovValue(uint64(e)) 513 } 514 n += 1 + sovValue(uint64(l)) + l 515 } 516 return n 517 } 518 519 func (m *PathValues) Size() (n int) { 520 if m == nil { 521 return 0 522 } 523 var l int 524 _ = l 525 if len(m.Values) > 0 { 526 for k, v := range m.Values { 527 _ = k 528 _ = v 529 l = v.Size() 530 mapEntrySize := 1 + len(k) + sovValue(uint64(len(k))) + 1 + l + sovValue(uint64(l)) 531 n += mapEntrySize + 1 + sovValue(uint64(mapEntrySize)) 532 } 533 } 534 return n 535 } 536 537 func (m *PathValue) Size() (n int) { 538 if m == nil { 539 return 0 540 } 541 var l int 542 _ = l 543 l = len(m.Path) 544 if l > 0 { 545 n += 1 + l + sovValue(uint64(l)) 546 } 547 l = m.Value.Size() 548 n += 1 + l + sovValue(uint64(l)) 549 if m.Deleted { 550 n += 2 551 } 552 if m.Index != 0 { 553 n += 1 + sovValue(uint64(m.Index)) 554 } 555 return n 556 } 557 558 func sovValue(x uint64) (n int) { 559 return (math_bits.Len64(x|1) + 6) / 7 560 } 561 func sozValue(x uint64) (n int) { 562 return sovValue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 563 } 564 func (m *TypedValue) Unmarshal(dAtA []byte) error { 565 l := len(dAtA) 566 iNdEx := 0 567 for iNdEx < l { 568 preIndex := iNdEx 569 var wire uint64 570 for shift := uint(0); ; shift += 7 { 571 if shift >= 64 { 572 return ErrIntOverflowValue 573 } 574 if iNdEx >= l { 575 return io.ErrUnexpectedEOF 576 } 577 b := dAtA[iNdEx] 578 iNdEx++ 579 wire |= uint64(b&0x7F) << shift 580 if b < 0x80 { 581 break 582 } 583 } 584 fieldNum := int32(wire >> 3) 585 wireType := int(wire & 0x7) 586 if wireType == 4 { 587 return fmt.Errorf("proto: TypedValue: wiretype end group for non-group") 588 } 589 if fieldNum <= 0 { 590 return fmt.Errorf("proto: TypedValue: illegal tag %d (wire type %d)", fieldNum, wire) 591 } 592 switch fieldNum { 593 case 1: 594 if wireType != 2 { 595 return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) 596 } 597 var byteLen int 598 for shift := uint(0); ; shift += 7 { 599 if shift >= 64 { 600 return ErrIntOverflowValue 601 } 602 if iNdEx >= l { 603 return io.ErrUnexpectedEOF 604 } 605 b := dAtA[iNdEx] 606 iNdEx++ 607 byteLen |= int(b&0x7F) << shift 608 if b < 0x80 { 609 break 610 } 611 } 612 if byteLen < 0 { 613 return ErrInvalidLengthValue 614 } 615 postIndex := iNdEx + byteLen 616 if postIndex < 0 { 617 return ErrInvalidLengthValue 618 } 619 if postIndex > l { 620 return io.ErrUnexpectedEOF 621 } 622 m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) 623 if m.Bytes == nil { 624 m.Bytes = []byte{} 625 } 626 iNdEx = postIndex 627 case 2: 628 if wireType != 0 { 629 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 630 } 631 m.Type = 0 632 for shift := uint(0); ; shift += 7 { 633 if shift >= 64 { 634 return ErrIntOverflowValue 635 } 636 if iNdEx >= l { 637 return io.ErrUnexpectedEOF 638 } 639 b := dAtA[iNdEx] 640 iNdEx++ 641 m.Type |= ValueType(b&0x7F) << shift 642 if b < 0x80 { 643 break 644 } 645 } 646 case 3: 647 if wireType == 0 { 648 var v int32 649 for shift := uint(0); ; shift += 7 { 650 if shift >= 64 { 651 return ErrIntOverflowValue 652 } 653 if iNdEx >= l { 654 return io.ErrUnexpectedEOF 655 } 656 b := dAtA[iNdEx] 657 iNdEx++ 658 v |= int32(b&0x7F) << shift 659 if b < 0x80 { 660 break 661 } 662 } 663 m.TypeOpts = append(m.TypeOpts, v) 664 } else if wireType == 2 { 665 var packedLen int 666 for shift := uint(0); ; shift += 7 { 667 if shift >= 64 { 668 return ErrIntOverflowValue 669 } 670 if iNdEx >= l { 671 return io.ErrUnexpectedEOF 672 } 673 b := dAtA[iNdEx] 674 iNdEx++ 675 packedLen |= int(b&0x7F) << shift 676 if b < 0x80 { 677 break 678 } 679 } 680 if packedLen < 0 { 681 return ErrInvalidLengthValue 682 } 683 postIndex := iNdEx + packedLen 684 if postIndex < 0 { 685 return ErrInvalidLengthValue 686 } 687 if postIndex > l { 688 return io.ErrUnexpectedEOF 689 } 690 var elementCount int 691 var count int 692 for _, integer := range dAtA[iNdEx:postIndex] { 693 if integer < 128 { 694 count++ 695 } 696 } 697 elementCount = count 698 if elementCount != 0 && len(m.TypeOpts) == 0 { 699 m.TypeOpts = make([]int32, 0, elementCount) 700 } 701 for iNdEx < postIndex { 702 var v int32 703 for shift := uint(0); ; shift += 7 { 704 if shift >= 64 { 705 return ErrIntOverflowValue 706 } 707 if iNdEx >= l { 708 return io.ErrUnexpectedEOF 709 } 710 b := dAtA[iNdEx] 711 iNdEx++ 712 v |= int32(b&0x7F) << shift 713 if b < 0x80 { 714 break 715 } 716 } 717 m.TypeOpts = append(m.TypeOpts, v) 718 } 719 } else { 720 return fmt.Errorf("proto: wrong wireType = %d for field TypeOpts", wireType) 721 } 722 default: 723 iNdEx = preIndex 724 skippy, err := skipValue(dAtA[iNdEx:]) 725 if err != nil { 726 return err 727 } 728 if (skippy < 0) || (iNdEx+skippy) < 0 { 729 return ErrInvalidLengthValue 730 } 731 if (iNdEx + skippy) > l { 732 return io.ErrUnexpectedEOF 733 } 734 iNdEx += skippy 735 } 736 } 737 738 if iNdEx > l { 739 return io.ErrUnexpectedEOF 740 } 741 return nil 742 } 743 func (m *PathValues) Unmarshal(dAtA []byte) error { 744 l := len(dAtA) 745 iNdEx := 0 746 for iNdEx < l { 747 preIndex := iNdEx 748 var wire uint64 749 for shift := uint(0); ; shift += 7 { 750 if shift >= 64 { 751 return ErrIntOverflowValue 752 } 753 if iNdEx >= l { 754 return io.ErrUnexpectedEOF 755 } 756 b := dAtA[iNdEx] 757 iNdEx++ 758 wire |= uint64(b&0x7F) << shift 759 if b < 0x80 { 760 break 761 } 762 } 763 fieldNum := int32(wire >> 3) 764 wireType := int(wire & 0x7) 765 if wireType == 4 { 766 return fmt.Errorf("proto: PathValues: wiretype end group for non-group") 767 } 768 if fieldNum <= 0 { 769 return fmt.Errorf("proto: PathValues: illegal tag %d (wire type %d)", fieldNum, wire) 770 } 771 switch fieldNum { 772 case 4: 773 if wireType != 2 { 774 return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) 775 } 776 var msglen int 777 for shift := uint(0); ; shift += 7 { 778 if shift >= 64 { 779 return ErrIntOverflowValue 780 } 781 if iNdEx >= l { 782 return io.ErrUnexpectedEOF 783 } 784 b := dAtA[iNdEx] 785 iNdEx++ 786 msglen |= int(b&0x7F) << shift 787 if b < 0x80 { 788 break 789 } 790 } 791 if msglen < 0 { 792 return ErrInvalidLengthValue 793 } 794 postIndex := iNdEx + msglen 795 if postIndex < 0 { 796 return ErrInvalidLengthValue 797 } 798 if postIndex > l { 799 return io.ErrUnexpectedEOF 800 } 801 if m.Values == nil { 802 m.Values = make(map[string]PathValue) 803 } 804 var mapkey string 805 mapvalue := &PathValue{} 806 for iNdEx < postIndex { 807 entryPreIndex := iNdEx 808 var wire uint64 809 for shift := uint(0); ; shift += 7 { 810 if shift >= 64 { 811 return ErrIntOverflowValue 812 } 813 if iNdEx >= l { 814 return io.ErrUnexpectedEOF 815 } 816 b := dAtA[iNdEx] 817 iNdEx++ 818 wire |= uint64(b&0x7F) << shift 819 if b < 0x80 { 820 break 821 } 822 } 823 fieldNum := int32(wire >> 3) 824 if fieldNum == 1 { 825 var stringLenmapkey uint64 826 for shift := uint(0); ; shift += 7 { 827 if shift >= 64 { 828 return ErrIntOverflowValue 829 } 830 if iNdEx >= l { 831 return io.ErrUnexpectedEOF 832 } 833 b := dAtA[iNdEx] 834 iNdEx++ 835 stringLenmapkey |= uint64(b&0x7F) << shift 836 if b < 0x80 { 837 break 838 } 839 } 840 intStringLenmapkey := int(stringLenmapkey) 841 if intStringLenmapkey < 0 { 842 return ErrInvalidLengthValue 843 } 844 postStringIndexmapkey := iNdEx + intStringLenmapkey 845 if postStringIndexmapkey < 0 { 846 return ErrInvalidLengthValue 847 } 848 if postStringIndexmapkey > l { 849 return io.ErrUnexpectedEOF 850 } 851 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 852 iNdEx = postStringIndexmapkey 853 } else if fieldNum == 2 { 854 var mapmsglen int 855 for shift := uint(0); ; shift += 7 { 856 if shift >= 64 { 857 return ErrIntOverflowValue 858 } 859 if iNdEx >= l { 860 return io.ErrUnexpectedEOF 861 } 862 b := dAtA[iNdEx] 863 iNdEx++ 864 mapmsglen |= int(b&0x7F) << shift 865 if b < 0x80 { 866 break 867 } 868 } 869 if mapmsglen < 0 { 870 return ErrInvalidLengthValue 871 } 872 postmsgIndex := iNdEx + mapmsglen 873 if postmsgIndex < 0 { 874 return ErrInvalidLengthValue 875 } 876 if postmsgIndex > l { 877 return io.ErrUnexpectedEOF 878 } 879 mapvalue = &PathValue{} 880 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 881 return err 882 } 883 iNdEx = postmsgIndex 884 } else { 885 iNdEx = entryPreIndex 886 skippy, err := skipValue(dAtA[iNdEx:]) 887 if err != nil { 888 return err 889 } 890 if (skippy < 0) || (iNdEx+skippy) < 0 { 891 return ErrInvalidLengthValue 892 } 893 if (iNdEx + skippy) > postIndex { 894 return io.ErrUnexpectedEOF 895 } 896 iNdEx += skippy 897 } 898 } 899 m.Values[mapkey] = *mapvalue 900 iNdEx = postIndex 901 default: 902 iNdEx = preIndex 903 skippy, err := skipValue(dAtA[iNdEx:]) 904 if err != nil { 905 return err 906 } 907 if (skippy < 0) || (iNdEx+skippy) < 0 { 908 return ErrInvalidLengthValue 909 } 910 if (iNdEx + skippy) > l { 911 return io.ErrUnexpectedEOF 912 } 913 iNdEx += skippy 914 } 915 } 916 917 if iNdEx > l { 918 return io.ErrUnexpectedEOF 919 } 920 return nil 921 } 922 func (m *PathValue) Unmarshal(dAtA []byte) error { 923 l := len(dAtA) 924 iNdEx := 0 925 for iNdEx < l { 926 preIndex := iNdEx 927 var wire uint64 928 for shift := uint(0); ; shift += 7 { 929 if shift >= 64 { 930 return ErrIntOverflowValue 931 } 932 if iNdEx >= l { 933 return io.ErrUnexpectedEOF 934 } 935 b := dAtA[iNdEx] 936 iNdEx++ 937 wire |= uint64(b&0x7F) << shift 938 if b < 0x80 { 939 break 940 } 941 } 942 fieldNum := int32(wire >> 3) 943 wireType := int(wire & 0x7) 944 if wireType == 4 { 945 return fmt.Errorf("proto: PathValue: wiretype end group for non-group") 946 } 947 if fieldNum <= 0 { 948 return fmt.Errorf("proto: PathValue: illegal tag %d (wire type %d)", fieldNum, wire) 949 } 950 switch fieldNum { 951 case 1: 952 if wireType != 2 { 953 return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) 954 } 955 var stringLen uint64 956 for shift := uint(0); ; shift += 7 { 957 if shift >= 64 { 958 return ErrIntOverflowValue 959 } 960 if iNdEx >= l { 961 return io.ErrUnexpectedEOF 962 } 963 b := dAtA[iNdEx] 964 iNdEx++ 965 stringLen |= uint64(b&0x7F) << shift 966 if b < 0x80 { 967 break 968 } 969 } 970 intStringLen := int(stringLen) 971 if intStringLen < 0 { 972 return ErrInvalidLengthValue 973 } 974 postIndex := iNdEx + intStringLen 975 if postIndex < 0 { 976 return ErrInvalidLengthValue 977 } 978 if postIndex > l { 979 return io.ErrUnexpectedEOF 980 } 981 m.Path = string(dAtA[iNdEx:postIndex]) 982 iNdEx = postIndex 983 case 2: 984 if wireType != 2 { 985 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 986 } 987 var msglen int 988 for shift := uint(0); ; shift += 7 { 989 if shift >= 64 { 990 return ErrIntOverflowValue 991 } 992 if iNdEx >= l { 993 return io.ErrUnexpectedEOF 994 } 995 b := dAtA[iNdEx] 996 iNdEx++ 997 msglen |= int(b&0x7F) << shift 998 if b < 0x80 { 999 break 1000 } 1001 } 1002 if msglen < 0 { 1003 return ErrInvalidLengthValue 1004 } 1005 postIndex := iNdEx + msglen 1006 if postIndex < 0 { 1007 return ErrInvalidLengthValue 1008 } 1009 if postIndex > l { 1010 return io.ErrUnexpectedEOF 1011 } 1012 if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1013 return err 1014 } 1015 iNdEx = postIndex 1016 case 3: 1017 if wireType != 0 { 1018 return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) 1019 } 1020 var v int 1021 for shift := uint(0); ; shift += 7 { 1022 if shift >= 64 { 1023 return ErrIntOverflowValue 1024 } 1025 if iNdEx >= l { 1026 return io.ErrUnexpectedEOF 1027 } 1028 b := dAtA[iNdEx] 1029 iNdEx++ 1030 v |= int(b&0x7F) << shift 1031 if b < 0x80 { 1032 break 1033 } 1034 } 1035 m.Deleted = bool(v != 0) 1036 case 4: 1037 if wireType != 0 { 1038 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 1039 } 1040 m.Index = 0 1041 for shift := uint(0); ; shift += 7 { 1042 if shift >= 64 { 1043 return ErrIntOverflowValue 1044 } 1045 if iNdEx >= l { 1046 return io.ErrUnexpectedEOF 1047 } 1048 b := dAtA[iNdEx] 1049 iNdEx++ 1050 m.Index |= Index(b&0x7F) << shift 1051 if b < 0x80 { 1052 break 1053 } 1054 } 1055 default: 1056 iNdEx = preIndex 1057 skippy, err := skipValue(dAtA[iNdEx:]) 1058 if err != nil { 1059 return err 1060 } 1061 if (skippy < 0) || (iNdEx+skippy) < 0 { 1062 return ErrInvalidLengthValue 1063 } 1064 if (iNdEx + skippy) > l { 1065 return io.ErrUnexpectedEOF 1066 } 1067 iNdEx += skippy 1068 } 1069 } 1070 1071 if iNdEx > l { 1072 return io.ErrUnexpectedEOF 1073 } 1074 return nil 1075 } 1076 func skipValue(dAtA []byte) (n int, err error) { 1077 l := len(dAtA) 1078 iNdEx := 0 1079 depth := 0 1080 for iNdEx < l { 1081 var wire uint64 1082 for shift := uint(0); ; shift += 7 { 1083 if shift >= 64 { 1084 return 0, ErrIntOverflowValue 1085 } 1086 if iNdEx >= l { 1087 return 0, io.ErrUnexpectedEOF 1088 } 1089 b := dAtA[iNdEx] 1090 iNdEx++ 1091 wire |= (uint64(b) & 0x7F) << shift 1092 if b < 0x80 { 1093 break 1094 } 1095 } 1096 wireType := int(wire & 0x7) 1097 switch wireType { 1098 case 0: 1099 for shift := uint(0); ; shift += 7 { 1100 if shift >= 64 { 1101 return 0, ErrIntOverflowValue 1102 } 1103 if iNdEx >= l { 1104 return 0, io.ErrUnexpectedEOF 1105 } 1106 iNdEx++ 1107 if dAtA[iNdEx-1] < 0x80 { 1108 break 1109 } 1110 } 1111 case 1: 1112 iNdEx += 8 1113 case 2: 1114 var length int 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return 0, ErrIntOverflowValue 1118 } 1119 if iNdEx >= l { 1120 return 0, io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 length |= (int(b) & 0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 if length < 0 { 1130 return 0, ErrInvalidLengthValue 1131 } 1132 iNdEx += length 1133 case 3: 1134 depth++ 1135 case 4: 1136 if depth == 0 { 1137 return 0, ErrUnexpectedEndOfGroupValue 1138 } 1139 depth-- 1140 case 5: 1141 iNdEx += 4 1142 default: 1143 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1144 } 1145 if iNdEx < 0 { 1146 return 0, ErrInvalidLengthValue 1147 } 1148 if depth == 0 { 1149 return iNdEx, nil 1150 } 1151 } 1152 return 0, io.ErrUnexpectedEOF 1153 } 1154 1155 var ( 1156 ErrInvalidLengthValue = fmt.Errorf("proto: negative length found during unmarshaling") 1157 ErrIntOverflowValue = fmt.Errorf("proto: integer overflow") 1158 ErrUnexpectedEndOfGroupValue = fmt.Errorf("proto: unexpected end of group") 1159 )