github.com/onosproject/onos-api/go@v0.10.32/onos/config/v2/value.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: onos/config/v2/value.proto
     3  
     4  package v2
     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_8823d92a68f01dab, []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.v2.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_8823d92a68f01dab, []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,omitempty" 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_8823d92a68f01dab, []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_8823d92a68f01dab, []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.v2.ValueType", ValueType_name, ValueType_value)
   282  	proto.RegisterType((*TypedValue)(nil), "onos.config.v2.TypedValue")
   283  	proto.RegisterType((*PathValues)(nil), "onos.config.v2.PathValues")
   284  	proto.RegisterMapType((map[string]*PathValue)(nil), "onos.config.v2.PathValues.ValuesEntry")
   285  	proto.RegisterType((*PathValue)(nil), "onos.config.v2.PathValue")
   286  }
   287  
   288  func init() { proto.RegisterFile("onos/config/v2/value.proto", fileDescriptor_8823d92a68f01dab) }
   289  
   290  var fileDescriptor_8823d92a68f01dab = []byte{
   291  	// 552 bytes of a gzipped FileDescriptorProto
   292  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x93, 0x41, 0x6e, 0x9b, 0x5c,
   293  	0x10, 0xc7, 0xfd, 0x0c, 0xd8, 0x66, 0x9c, 0x38, 0x2f, 0x93, 0x7c, 0x5f, 0xa9, 0x17, 0x80, 0xb2,
   294  	0x88, 0x68, 0x55, 0x19, 0xc9, 0xd9, 0x54, 0x5d, 0x54, 0x32, 0x0d, 0xa9, 0x90, 0x48, 0x1c, 0x11,
   295  	0x52, 0x29, 0xab, 0x28, 0xa9, 0xa9, 0x63, 0x35, 0x31, 0x28, 0x50, 0xab, 0x5c, 0xa2, 0xea, 0x19,
   296  	0x7a, 0x81, 0x5e, 0x23, 0x4b, 0x2f, 0xbb, 0x42, 0x95, 0xbd, 0xf3, 0x11, 0xba, 0xaa, 0xde, 0xc3,
   297  	0x26, 0x38, 0xdd, 0xcd, 0xfc, 0x66, 0xf8, 0xff, 0x67, 0xde, 0x08, 0x68, 0x87, 0xe3, 0x30, 0x36,
   298  	0x3f, 0x86, 0xe3, 0x4f, 0xa3, 0xa1, 0x39, 0xe9, 0x9a, 0x93, 0xab, 0xdb, 0x2f, 0x41, 0x27, 0xba,
   299  	0x0f, 0x93, 0x10, 0x5b, 0xac, 0xd6, 0xc9, 0x6b, 0x9d, 0x49, 0xb7, 0xbd, 0x3b, 0x0c, 0x87, 0x21,
   300  	0x2f, 0x99, 0x2c, 0xca, 0xbb, 0xf6, 0x7e, 0x12, 0x00, 0x3f, 0x8d, 0x82, 0xc1, 0x07, 0xf6, 0x29,
   301  	0xbe, 0x00, 0xe9, 0x3a, 0x4d, 0x82, 0x58, 0x21, 0x3a, 0x31, 0x36, 0xac, 0x9d, 0x45, 0xa6, 0x6d,
   302  	0x59, 0x0c, 0xbc, 0x0a, 0xef, 0x46, 0x49, 0x70, 0x17, 0x25, 0xa9, 0x27, 0x71, 0x80, 0x3d, 0x10,
   303  	0x93, 0x34, 0x0a, 0x94, 0xaa, 0x4e, 0x8c, 0x56, 0xf7, 0x79, 0x67, 0xdd, 0xae, 0xc3, 0xf5, 0x98,
   304  	0xb2, 0x85, 0x8b, 0x4c, 0x6b, 0xb1, 0xa8, 0xa4, 0x21, 0xb2, 0x1c, 0x0f, 0x40, 0x66, 0x12, 0x97,
   305  	0x61, 0x94, 0xc4, 0x8a, 0xa0, 0x0b, 0x86, 0x64, 0xfd, 0xbf, 0xc8, 0x34, 0x64, 0xc5, 0x7e, 0x94,
   306  	0x94, 0x4d, 0x1b, 0x2b, 0xb6, 0xf7, 0x83, 0x00, 0x9c, 0x5e, 0x25, 0x37, 0xdc, 0x20, 0xc6, 0xb7,
   307  	0x50, 0xe3, 0x5b, 0xc7, 0x8a, 0xa8, 0x0b, 0x46, 0xb3, 0xbb, 0xff, 0x74, 0x90, 0xc7, 0xde, 0x7c,
   308  	0xa6, 0xd8, 0x1e, 0x27, 0xf7, 0xa9, 0xb7, 0xfc, 0xaa, 0xed, 0x43, 0xb3, 0x84, 0x91, 0x82, 0xf0,
   309  	0x39, 0x48, 0xf9, 0xfa, 0xb2, 0xc7, 0x42, 0x34, 0x41, 0xe2, 0xad, 0x7c, 0xd1, 0xe6, 0xbf, 0x8b,
   310  	0x16, 0xfa, 0x5e, 0xde, 0xf7, 0xa6, 0xfa, 0x9a, 0xec, 0x4d, 0x09, 0xc8, 0x45, 0x01, 0xf7, 0x41,
   311  	0x8c, 0xae, 0x92, 0x9b, 0x5c, 0x35, 0x7f, 0x0f, 0x56, 0x2c, 0xbf, 0x07, 0xcb, 0xd1, 0x59, 0xb7,
   312  	0x6a, 0x3f, 0xb5, 0x7a, 0x3c, 0x94, 0xf5, 0xec, 0x21, 0xd3, 0x2a, 0xec, 0x3a, 0x3c, 0x2d, 0x5f,
   313  	0x27, 0xb7, 0x34, 0xa1, 0x3e, 0x08, 0x6e, 0x83, 0x24, 0x18, 0x28, 0x82, 0x4e, 0x8c, 0x86, 0xf5,
   314  	0xdf, 0x22, 0xd3, 0xb6, 0x0f, 0x73, 0x54, 0x6a, 0x5f, 0x75, 0xa1, 0x06, 0xd2, 0x68, 0x3c, 0x08,
   315  	0xbe, 0x2a, 0xa2, 0x4e, 0x0c, 0xd1, 0x92, 0xff, 0x64, 0x9a, 0xe4, 0x30, 0xe0, 0xe5, 0xfc, 0xe5,
   316  	0xb7, 0x2a, 0xc8, 0xc5, 0x51, 0x51, 0x06, 0xc9, 0x3e, 0x3e, 0xf5, 0x2f, 0x68, 0x05, 0x01, 0x6a,
   317  	0x67, 0xbe, 0xe7, 0x9c, 0xbc, 0xa7, 0x04, 0xeb, 0x20, 0x38, 0x27, 0x3e, 0xad, 0x62, 0x03, 0xc4,
   318  	0x73, 0x16, 0x09, 0x2c, 0xb2, 0xfa, 0x7d, 0x97, 0x8a, 0xd8, 0x84, 0xfa, 0xa1, 0xfd, 0xce, 0x39,
   319  	0xee, 0xb9, 0x54, 0x62, 0x02, 0x47, 0x6e, 0xbf, 0xe7, 0xd3, 0x1a, 0x0b, 0xad, 0x0b, 0xdf, 0x3e,
   320  	0xa3, 0x75, 0xdc, 0x81, 0x2d, 0xd7, 0xee, 0x1d, 0xb9, 0xce, 0x99, 0x7f, 0xb9, 0x14, 0x6d, 0x20,
   321  	0x85, 0x8d, 0x02, 0x32, 0x4d, 0x19, 0xb7, 0x61, 0xb3, 0x20, 0xdc, 0x06, 0xd6, 0x10, 0xf7, 0x6b,
   322  	0xe2, 0x2e, 0xd0, 0x02, 0xad, 0x8c, 0x37, 0x10, 0xa1, 0x55, 0xd0, 0x7c, 0x82, 0xcd, 0x35, 0x96,
   323  	0x8f, 0xd2, 0x62, 0x6b, 0x1d, 0xf6, 0xcf, 0x2d, 0xd7, 0xa6, 0x5b, 0x6b, 0x63, 0x2d, 0x21, 0xb5,
   324  	0x94, 0x87, 0x99, 0x4a, 0xa6, 0x33, 0x95, 0xfc, 0x9e, 0xa9, 0xe4, 0xfb, 0x5c, 0xad, 0x4c, 0xe7,
   325  	0x6a, 0xe5, 0xd7, 0x5c, 0xad, 0x5c, 0xd7, 0xf8, 0xbf, 0x75, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff,
   326  	0xf0, 0x81, 0xe1, 0x12, 0x9f, 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  			if v != nil {
   408  				{
   409  					size, err := v.MarshalToSizedBuffer(dAtA[:i])
   410  					if err != nil {
   411  						return 0, err
   412  					}
   413  					i -= size
   414  					i = encodeVarintValue(dAtA, i, uint64(size))
   415  				}
   416  				i--
   417  				dAtA[i] = 0x12
   418  			}
   419  			i -= len(k)
   420  			copy(dAtA[i:], k)
   421  			i = encodeVarintValue(dAtA, i, uint64(len(k)))
   422  			i--
   423  			dAtA[i] = 0xa
   424  			i = encodeVarintValue(dAtA, i, uint64(baseI-i))
   425  			i--
   426  			dAtA[i] = 0x22
   427  		}
   428  	}
   429  	return len(dAtA) - i, nil
   430  }
   431  
   432  func (m *PathValue) Marshal() (dAtA []byte, err error) {
   433  	size := m.Size()
   434  	dAtA = make([]byte, size)
   435  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   436  	if err != nil {
   437  		return nil, err
   438  	}
   439  	return dAtA[:n], nil
   440  }
   441  
   442  func (m *PathValue) MarshalTo(dAtA []byte) (int, error) {
   443  	size := m.Size()
   444  	return m.MarshalToSizedBuffer(dAtA[:size])
   445  }
   446  
   447  func (m *PathValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   448  	i := len(dAtA)
   449  	_ = i
   450  	var l int
   451  	_ = l
   452  	if m.Index != 0 {
   453  		i = encodeVarintValue(dAtA, i, uint64(m.Index))
   454  		i--
   455  		dAtA[i] = 0x20
   456  	}
   457  	if m.Deleted {
   458  		i--
   459  		if m.Deleted {
   460  			dAtA[i] = 1
   461  		} else {
   462  			dAtA[i] = 0
   463  		}
   464  		i--
   465  		dAtA[i] = 0x18
   466  	}
   467  	{
   468  		size, err := m.Value.MarshalToSizedBuffer(dAtA[:i])
   469  		if err != nil {
   470  			return 0, err
   471  		}
   472  		i -= size
   473  		i = encodeVarintValue(dAtA, i, uint64(size))
   474  	}
   475  	i--
   476  	dAtA[i] = 0x12
   477  	if len(m.Path) > 0 {
   478  		i -= len(m.Path)
   479  		copy(dAtA[i:], m.Path)
   480  		i = encodeVarintValue(dAtA, i, uint64(len(m.Path)))
   481  		i--
   482  		dAtA[i] = 0xa
   483  	}
   484  	return len(dAtA) - i, nil
   485  }
   486  
   487  func encodeVarintValue(dAtA []byte, offset int, v uint64) int {
   488  	offset -= sovValue(v)
   489  	base := offset
   490  	for v >= 1<<7 {
   491  		dAtA[offset] = uint8(v&0x7f | 0x80)
   492  		v >>= 7
   493  		offset++
   494  	}
   495  	dAtA[offset] = uint8(v)
   496  	return base
   497  }
   498  func (m *TypedValue) Size() (n int) {
   499  	if m == nil {
   500  		return 0
   501  	}
   502  	var l int
   503  	_ = l
   504  	l = len(m.Bytes)
   505  	if l > 0 {
   506  		n += 1 + l + sovValue(uint64(l))
   507  	}
   508  	if m.Type != 0 {
   509  		n += 1 + sovValue(uint64(m.Type))
   510  	}
   511  	if len(m.TypeOpts) > 0 {
   512  		l = 0
   513  		for _, e := range m.TypeOpts {
   514  			l += sovValue(uint64(e))
   515  		}
   516  		n += 1 + sovValue(uint64(l)) + l
   517  	}
   518  	return n
   519  }
   520  
   521  func (m *PathValues) Size() (n int) {
   522  	if m == nil {
   523  		return 0
   524  	}
   525  	var l int
   526  	_ = l
   527  	if len(m.Values) > 0 {
   528  		for k, v := range m.Values {
   529  			_ = k
   530  			_ = v
   531  			l = 0
   532  			if v != nil {
   533  				l = v.Size()
   534  				l += 1 + sovValue(uint64(l))
   535  			}
   536  			mapEntrySize := 1 + len(k) + sovValue(uint64(len(k))) + l
   537  			n += mapEntrySize + 1 + sovValue(uint64(mapEntrySize))
   538  		}
   539  	}
   540  	return n
   541  }
   542  
   543  func (m *PathValue) Size() (n int) {
   544  	if m == nil {
   545  		return 0
   546  	}
   547  	var l int
   548  	_ = l
   549  	l = len(m.Path)
   550  	if l > 0 {
   551  		n += 1 + l + sovValue(uint64(l))
   552  	}
   553  	l = m.Value.Size()
   554  	n += 1 + l + sovValue(uint64(l))
   555  	if m.Deleted {
   556  		n += 2
   557  	}
   558  	if m.Index != 0 {
   559  		n += 1 + sovValue(uint64(m.Index))
   560  	}
   561  	return n
   562  }
   563  
   564  func sovValue(x uint64) (n int) {
   565  	return (math_bits.Len64(x|1) + 6) / 7
   566  }
   567  func sozValue(x uint64) (n int) {
   568  	return sovValue(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   569  }
   570  func (m *TypedValue) Unmarshal(dAtA []byte) error {
   571  	l := len(dAtA)
   572  	iNdEx := 0
   573  	for iNdEx < l {
   574  		preIndex := iNdEx
   575  		var wire uint64
   576  		for shift := uint(0); ; shift += 7 {
   577  			if shift >= 64 {
   578  				return ErrIntOverflowValue
   579  			}
   580  			if iNdEx >= l {
   581  				return io.ErrUnexpectedEOF
   582  			}
   583  			b := dAtA[iNdEx]
   584  			iNdEx++
   585  			wire |= uint64(b&0x7F) << shift
   586  			if b < 0x80 {
   587  				break
   588  			}
   589  		}
   590  		fieldNum := int32(wire >> 3)
   591  		wireType := int(wire & 0x7)
   592  		if wireType == 4 {
   593  			return fmt.Errorf("proto: TypedValue: wiretype end group for non-group")
   594  		}
   595  		if fieldNum <= 0 {
   596  			return fmt.Errorf("proto: TypedValue: illegal tag %d (wire type %d)", fieldNum, wire)
   597  		}
   598  		switch fieldNum {
   599  		case 1:
   600  			if wireType != 2 {
   601  				return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
   602  			}
   603  			var byteLen int
   604  			for shift := uint(0); ; shift += 7 {
   605  				if shift >= 64 {
   606  					return ErrIntOverflowValue
   607  				}
   608  				if iNdEx >= l {
   609  					return io.ErrUnexpectedEOF
   610  				}
   611  				b := dAtA[iNdEx]
   612  				iNdEx++
   613  				byteLen |= int(b&0x7F) << shift
   614  				if b < 0x80 {
   615  					break
   616  				}
   617  			}
   618  			if byteLen < 0 {
   619  				return ErrInvalidLengthValue
   620  			}
   621  			postIndex := iNdEx + byteLen
   622  			if postIndex < 0 {
   623  				return ErrInvalidLengthValue
   624  			}
   625  			if postIndex > l {
   626  				return io.ErrUnexpectedEOF
   627  			}
   628  			m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...)
   629  			if m.Bytes == nil {
   630  				m.Bytes = []byte{}
   631  			}
   632  			iNdEx = postIndex
   633  		case 2:
   634  			if wireType != 0 {
   635  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
   636  			}
   637  			m.Type = 0
   638  			for shift := uint(0); ; shift += 7 {
   639  				if shift >= 64 {
   640  					return ErrIntOverflowValue
   641  				}
   642  				if iNdEx >= l {
   643  					return io.ErrUnexpectedEOF
   644  				}
   645  				b := dAtA[iNdEx]
   646  				iNdEx++
   647  				m.Type |= ValueType(b&0x7F) << shift
   648  				if b < 0x80 {
   649  					break
   650  				}
   651  			}
   652  		case 3:
   653  			if wireType == 0 {
   654  				var v int32
   655  				for shift := uint(0); ; shift += 7 {
   656  					if shift >= 64 {
   657  						return ErrIntOverflowValue
   658  					}
   659  					if iNdEx >= l {
   660  						return io.ErrUnexpectedEOF
   661  					}
   662  					b := dAtA[iNdEx]
   663  					iNdEx++
   664  					v |= int32(b&0x7F) << shift
   665  					if b < 0x80 {
   666  						break
   667  					}
   668  				}
   669  				m.TypeOpts = append(m.TypeOpts, v)
   670  			} else if wireType == 2 {
   671  				var packedLen int
   672  				for shift := uint(0); ; shift += 7 {
   673  					if shift >= 64 {
   674  						return ErrIntOverflowValue
   675  					}
   676  					if iNdEx >= l {
   677  						return io.ErrUnexpectedEOF
   678  					}
   679  					b := dAtA[iNdEx]
   680  					iNdEx++
   681  					packedLen |= int(b&0x7F) << shift
   682  					if b < 0x80 {
   683  						break
   684  					}
   685  				}
   686  				if packedLen < 0 {
   687  					return ErrInvalidLengthValue
   688  				}
   689  				postIndex := iNdEx + packedLen
   690  				if postIndex < 0 {
   691  					return ErrInvalidLengthValue
   692  				}
   693  				if postIndex > l {
   694  					return io.ErrUnexpectedEOF
   695  				}
   696  				var elementCount int
   697  				var count int
   698  				for _, integer := range dAtA[iNdEx:postIndex] {
   699  					if integer < 128 {
   700  						count++
   701  					}
   702  				}
   703  				elementCount = count
   704  				if elementCount != 0 && len(m.TypeOpts) == 0 {
   705  					m.TypeOpts = make([]int32, 0, elementCount)
   706  				}
   707  				for iNdEx < postIndex {
   708  					var v int32
   709  					for shift := uint(0); ; shift += 7 {
   710  						if shift >= 64 {
   711  							return ErrIntOverflowValue
   712  						}
   713  						if iNdEx >= l {
   714  							return io.ErrUnexpectedEOF
   715  						}
   716  						b := dAtA[iNdEx]
   717  						iNdEx++
   718  						v |= int32(b&0x7F) << shift
   719  						if b < 0x80 {
   720  							break
   721  						}
   722  					}
   723  					m.TypeOpts = append(m.TypeOpts, v)
   724  				}
   725  			} else {
   726  				return fmt.Errorf("proto: wrong wireType = %d for field TypeOpts", wireType)
   727  			}
   728  		default:
   729  			iNdEx = preIndex
   730  			skippy, err := skipValue(dAtA[iNdEx:])
   731  			if err != nil {
   732  				return err
   733  			}
   734  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   735  				return ErrInvalidLengthValue
   736  			}
   737  			if (iNdEx + skippy) > l {
   738  				return io.ErrUnexpectedEOF
   739  			}
   740  			iNdEx += skippy
   741  		}
   742  	}
   743  
   744  	if iNdEx > l {
   745  		return io.ErrUnexpectedEOF
   746  	}
   747  	return nil
   748  }
   749  func (m *PathValues) Unmarshal(dAtA []byte) error {
   750  	l := len(dAtA)
   751  	iNdEx := 0
   752  	for iNdEx < l {
   753  		preIndex := iNdEx
   754  		var wire uint64
   755  		for shift := uint(0); ; shift += 7 {
   756  			if shift >= 64 {
   757  				return ErrIntOverflowValue
   758  			}
   759  			if iNdEx >= l {
   760  				return io.ErrUnexpectedEOF
   761  			}
   762  			b := dAtA[iNdEx]
   763  			iNdEx++
   764  			wire |= uint64(b&0x7F) << shift
   765  			if b < 0x80 {
   766  				break
   767  			}
   768  		}
   769  		fieldNum := int32(wire >> 3)
   770  		wireType := int(wire & 0x7)
   771  		if wireType == 4 {
   772  			return fmt.Errorf("proto: PathValues: wiretype end group for non-group")
   773  		}
   774  		if fieldNum <= 0 {
   775  			return fmt.Errorf("proto: PathValues: illegal tag %d (wire type %d)", fieldNum, wire)
   776  		}
   777  		switch fieldNum {
   778  		case 4:
   779  			if wireType != 2 {
   780  				return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
   781  			}
   782  			var msglen int
   783  			for shift := uint(0); ; shift += 7 {
   784  				if shift >= 64 {
   785  					return ErrIntOverflowValue
   786  				}
   787  				if iNdEx >= l {
   788  					return io.ErrUnexpectedEOF
   789  				}
   790  				b := dAtA[iNdEx]
   791  				iNdEx++
   792  				msglen |= int(b&0x7F) << shift
   793  				if b < 0x80 {
   794  					break
   795  				}
   796  			}
   797  			if msglen < 0 {
   798  				return ErrInvalidLengthValue
   799  			}
   800  			postIndex := iNdEx + msglen
   801  			if postIndex < 0 {
   802  				return ErrInvalidLengthValue
   803  			}
   804  			if postIndex > l {
   805  				return io.ErrUnexpectedEOF
   806  			}
   807  			if m.Values == nil {
   808  				m.Values = make(map[string]*PathValue)
   809  			}
   810  			var mapkey string
   811  			var mapvalue *PathValue
   812  			for iNdEx < postIndex {
   813  				entryPreIndex := iNdEx
   814  				var wire uint64
   815  				for shift := uint(0); ; shift += 7 {
   816  					if shift >= 64 {
   817  						return ErrIntOverflowValue
   818  					}
   819  					if iNdEx >= l {
   820  						return io.ErrUnexpectedEOF
   821  					}
   822  					b := dAtA[iNdEx]
   823  					iNdEx++
   824  					wire |= uint64(b&0x7F) << shift
   825  					if b < 0x80 {
   826  						break
   827  					}
   828  				}
   829  				fieldNum := int32(wire >> 3)
   830  				if fieldNum == 1 {
   831  					var stringLenmapkey uint64
   832  					for shift := uint(0); ; shift += 7 {
   833  						if shift >= 64 {
   834  							return ErrIntOverflowValue
   835  						}
   836  						if iNdEx >= l {
   837  							return io.ErrUnexpectedEOF
   838  						}
   839  						b := dAtA[iNdEx]
   840  						iNdEx++
   841  						stringLenmapkey |= uint64(b&0x7F) << shift
   842  						if b < 0x80 {
   843  							break
   844  						}
   845  					}
   846  					intStringLenmapkey := int(stringLenmapkey)
   847  					if intStringLenmapkey < 0 {
   848  						return ErrInvalidLengthValue
   849  					}
   850  					postStringIndexmapkey := iNdEx + intStringLenmapkey
   851  					if postStringIndexmapkey < 0 {
   852  						return ErrInvalidLengthValue
   853  					}
   854  					if postStringIndexmapkey > l {
   855  						return io.ErrUnexpectedEOF
   856  					}
   857  					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
   858  					iNdEx = postStringIndexmapkey
   859  				} else if fieldNum == 2 {
   860  					var mapmsglen int
   861  					for shift := uint(0); ; shift += 7 {
   862  						if shift >= 64 {
   863  							return ErrIntOverflowValue
   864  						}
   865  						if iNdEx >= l {
   866  							return io.ErrUnexpectedEOF
   867  						}
   868  						b := dAtA[iNdEx]
   869  						iNdEx++
   870  						mapmsglen |= int(b&0x7F) << shift
   871  						if b < 0x80 {
   872  							break
   873  						}
   874  					}
   875  					if mapmsglen < 0 {
   876  						return ErrInvalidLengthValue
   877  					}
   878  					postmsgIndex := iNdEx + mapmsglen
   879  					if postmsgIndex < 0 {
   880  						return ErrInvalidLengthValue
   881  					}
   882  					if postmsgIndex > l {
   883  						return io.ErrUnexpectedEOF
   884  					}
   885  					mapvalue = &PathValue{}
   886  					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
   887  						return err
   888  					}
   889  					iNdEx = postmsgIndex
   890  				} else {
   891  					iNdEx = entryPreIndex
   892  					skippy, err := skipValue(dAtA[iNdEx:])
   893  					if err != nil {
   894  						return err
   895  					}
   896  					if (skippy < 0) || (iNdEx+skippy) < 0 {
   897  						return ErrInvalidLengthValue
   898  					}
   899  					if (iNdEx + skippy) > postIndex {
   900  						return io.ErrUnexpectedEOF
   901  					}
   902  					iNdEx += skippy
   903  				}
   904  			}
   905  			m.Values[mapkey] = mapvalue
   906  			iNdEx = postIndex
   907  		default:
   908  			iNdEx = preIndex
   909  			skippy, err := skipValue(dAtA[iNdEx:])
   910  			if err != nil {
   911  				return err
   912  			}
   913  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   914  				return ErrInvalidLengthValue
   915  			}
   916  			if (iNdEx + skippy) > l {
   917  				return io.ErrUnexpectedEOF
   918  			}
   919  			iNdEx += skippy
   920  		}
   921  	}
   922  
   923  	if iNdEx > l {
   924  		return io.ErrUnexpectedEOF
   925  	}
   926  	return nil
   927  }
   928  func (m *PathValue) Unmarshal(dAtA []byte) error {
   929  	l := len(dAtA)
   930  	iNdEx := 0
   931  	for iNdEx < l {
   932  		preIndex := iNdEx
   933  		var wire uint64
   934  		for shift := uint(0); ; shift += 7 {
   935  			if shift >= 64 {
   936  				return ErrIntOverflowValue
   937  			}
   938  			if iNdEx >= l {
   939  				return io.ErrUnexpectedEOF
   940  			}
   941  			b := dAtA[iNdEx]
   942  			iNdEx++
   943  			wire |= uint64(b&0x7F) << shift
   944  			if b < 0x80 {
   945  				break
   946  			}
   947  		}
   948  		fieldNum := int32(wire >> 3)
   949  		wireType := int(wire & 0x7)
   950  		if wireType == 4 {
   951  			return fmt.Errorf("proto: PathValue: wiretype end group for non-group")
   952  		}
   953  		if fieldNum <= 0 {
   954  			return fmt.Errorf("proto: PathValue: illegal tag %d (wire type %d)", fieldNum, wire)
   955  		}
   956  		switch fieldNum {
   957  		case 1:
   958  			if wireType != 2 {
   959  				return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
   960  			}
   961  			var stringLen uint64
   962  			for shift := uint(0); ; shift += 7 {
   963  				if shift >= 64 {
   964  					return ErrIntOverflowValue
   965  				}
   966  				if iNdEx >= l {
   967  					return io.ErrUnexpectedEOF
   968  				}
   969  				b := dAtA[iNdEx]
   970  				iNdEx++
   971  				stringLen |= uint64(b&0x7F) << shift
   972  				if b < 0x80 {
   973  					break
   974  				}
   975  			}
   976  			intStringLen := int(stringLen)
   977  			if intStringLen < 0 {
   978  				return ErrInvalidLengthValue
   979  			}
   980  			postIndex := iNdEx + intStringLen
   981  			if postIndex < 0 {
   982  				return ErrInvalidLengthValue
   983  			}
   984  			if postIndex > l {
   985  				return io.ErrUnexpectedEOF
   986  			}
   987  			m.Path = string(dAtA[iNdEx:postIndex])
   988  			iNdEx = postIndex
   989  		case 2:
   990  			if wireType != 2 {
   991  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   992  			}
   993  			var msglen int
   994  			for shift := uint(0); ; shift += 7 {
   995  				if shift >= 64 {
   996  					return ErrIntOverflowValue
   997  				}
   998  				if iNdEx >= l {
   999  					return io.ErrUnexpectedEOF
  1000  				}
  1001  				b := dAtA[iNdEx]
  1002  				iNdEx++
  1003  				msglen |= int(b&0x7F) << shift
  1004  				if b < 0x80 {
  1005  					break
  1006  				}
  1007  			}
  1008  			if msglen < 0 {
  1009  				return ErrInvalidLengthValue
  1010  			}
  1011  			postIndex := iNdEx + msglen
  1012  			if postIndex < 0 {
  1013  				return ErrInvalidLengthValue
  1014  			}
  1015  			if postIndex > l {
  1016  				return io.ErrUnexpectedEOF
  1017  			}
  1018  			if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1019  				return err
  1020  			}
  1021  			iNdEx = postIndex
  1022  		case 3:
  1023  			if wireType != 0 {
  1024  				return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1025  			}
  1026  			var v int
  1027  			for shift := uint(0); ; shift += 7 {
  1028  				if shift >= 64 {
  1029  					return ErrIntOverflowValue
  1030  				}
  1031  				if iNdEx >= l {
  1032  					return io.ErrUnexpectedEOF
  1033  				}
  1034  				b := dAtA[iNdEx]
  1035  				iNdEx++
  1036  				v |= int(b&0x7F) << shift
  1037  				if b < 0x80 {
  1038  					break
  1039  				}
  1040  			}
  1041  			m.Deleted = bool(v != 0)
  1042  		case 4:
  1043  			if wireType != 0 {
  1044  				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  1045  			}
  1046  			m.Index = 0
  1047  			for shift := uint(0); ; shift += 7 {
  1048  				if shift >= 64 {
  1049  					return ErrIntOverflowValue
  1050  				}
  1051  				if iNdEx >= l {
  1052  					return io.ErrUnexpectedEOF
  1053  				}
  1054  				b := dAtA[iNdEx]
  1055  				iNdEx++
  1056  				m.Index |= Index(b&0x7F) << shift
  1057  				if b < 0x80 {
  1058  					break
  1059  				}
  1060  			}
  1061  		default:
  1062  			iNdEx = preIndex
  1063  			skippy, err := skipValue(dAtA[iNdEx:])
  1064  			if err != nil {
  1065  				return err
  1066  			}
  1067  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1068  				return ErrInvalidLengthValue
  1069  			}
  1070  			if (iNdEx + skippy) > l {
  1071  				return io.ErrUnexpectedEOF
  1072  			}
  1073  			iNdEx += skippy
  1074  		}
  1075  	}
  1076  
  1077  	if iNdEx > l {
  1078  		return io.ErrUnexpectedEOF
  1079  	}
  1080  	return nil
  1081  }
  1082  func skipValue(dAtA []byte) (n int, err error) {
  1083  	l := len(dAtA)
  1084  	iNdEx := 0
  1085  	depth := 0
  1086  	for iNdEx < l {
  1087  		var wire uint64
  1088  		for shift := uint(0); ; shift += 7 {
  1089  			if shift >= 64 {
  1090  				return 0, ErrIntOverflowValue
  1091  			}
  1092  			if iNdEx >= l {
  1093  				return 0, io.ErrUnexpectedEOF
  1094  			}
  1095  			b := dAtA[iNdEx]
  1096  			iNdEx++
  1097  			wire |= (uint64(b) & 0x7F) << shift
  1098  			if b < 0x80 {
  1099  				break
  1100  			}
  1101  		}
  1102  		wireType := int(wire & 0x7)
  1103  		switch wireType {
  1104  		case 0:
  1105  			for shift := uint(0); ; shift += 7 {
  1106  				if shift >= 64 {
  1107  					return 0, ErrIntOverflowValue
  1108  				}
  1109  				if iNdEx >= l {
  1110  					return 0, io.ErrUnexpectedEOF
  1111  				}
  1112  				iNdEx++
  1113  				if dAtA[iNdEx-1] < 0x80 {
  1114  					break
  1115  				}
  1116  			}
  1117  		case 1:
  1118  			iNdEx += 8
  1119  		case 2:
  1120  			var length int
  1121  			for shift := uint(0); ; shift += 7 {
  1122  				if shift >= 64 {
  1123  					return 0, ErrIntOverflowValue
  1124  				}
  1125  				if iNdEx >= l {
  1126  					return 0, io.ErrUnexpectedEOF
  1127  				}
  1128  				b := dAtA[iNdEx]
  1129  				iNdEx++
  1130  				length |= (int(b) & 0x7F) << shift
  1131  				if b < 0x80 {
  1132  					break
  1133  				}
  1134  			}
  1135  			if length < 0 {
  1136  				return 0, ErrInvalidLengthValue
  1137  			}
  1138  			iNdEx += length
  1139  		case 3:
  1140  			depth++
  1141  		case 4:
  1142  			if depth == 0 {
  1143  				return 0, ErrUnexpectedEndOfGroupValue
  1144  			}
  1145  			depth--
  1146  		case 5:
  1147  			iNdEx += 4
  1148  		default:
  1149  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1150  		}
  1151  		if iNdEx < 0 {
  1152  			return 0, ErrInvalidLengthValue
  1153  		}
  1154  		if depth == 0 {
  1155  			return iNdEx, nil
  1156  		}
  1157  	}
  1158  	return 0, io.ErrUnexpectedEOF
  1159  }
  1160  
  1161  var (
  1162  	ErrInvalidLengthValue        = fmt.Errorf("proto: negative length found during unmarshaling")
  1163  	ErrIntOverflowValue          = fmt.Errorf("proto: integer overflow")
  1164  	ErrUnexpectedEndOfGroupValue = fmt.Errorf("proto: unexpected end of group")
  1165  )