github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/util/protoutil/clone.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: util/protoutil/clone.proto
     3  
     4  package protoutil
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  
    10  import github_com_cockroachdb_cockroach_pkg_util_uuid "github.com/cockroachdb/cockroach/pkg/util/uuid"
    11  
    12  import io "io"
    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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    24  
    25  type RecursiveAndUncloneable struct {
    26  	R    *RecursiveAndUncloneable                            `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"`
    27  	Uuid github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,2,opt,name=uuid,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"uuid"`
    28  }
    29  
    30  func (m *RecursiveAndUncloneable) Reset()         { *m = RecursiveAndUncloneable{} }
    31  func (m *RecursiveAndUncloneable) String() string { return proto.CompactTextString(m) }
    32  func (*RecursiveAndUncloneable) ProtoMessage()    {}
    33  func (*RecursiveAndUncloneable) Descriptor() ([]byte, []int) {
    34  	return fileDescriptor_clone_96c900215ff8e4e9, []int{0}
    35  }
    36  func (m *RecursiveAndUncloneable) XXX_Unmarshal(b []byte) error {
    37  	return m.Unmarshal(b)
    38  }
    39  func (m *RecursiveAndUncloneable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    40  	b = b[:cap(b)]
    41  	n, err := m.MarshalTo(b)
    42  	if err != nil {
    43  		return nil, err
    44  	}
    45  	return b[:n], nil
    46  }
    47  func (dst *RecursiveAndUncloneable) XXX_Merge(src proto.Message) {
    48  	xxx_messageInfo_RecursiveAndUncloneable.Merge(dst, src)
    49  }
    50  func (m *RecursiveAndUncloneable) XXX_Size() int {
    51  	return m.Size()
    52  }
    53  func (m *RecursiveAndUncloneable) XXX_DiscardUnknown() {
    54  	xxx_messageInfo_RecursiveAndUncloneable.DiscardUnknown(m)
    55  }
    56  
    57  var xxx_messageInfo_RecursiveAndUncloneable proto.InternalMessageInfo
    58  
    59  func init() {
    60  	proto.RegisterType((*RecursiveAndUncloneable)(nil), "cockroach.util.protoutil.RecursiveAndUncloneable")
    61  }
    62  func (m *RecursiveAndUncloneable) Marshal() (dAtA []byte, err error) {
    63  	size := m.Size()
    64  	dAtA = make([]byte, size)
    65  	n, err := m.MarshalTo(dAtA)
    66  	if err != nil {
    67  		return nil, err
    68  	}
    69  	return dAtA[:n], nil
    70  }
    71  
    72  func (m *RecursiveAndUncloneable) MarshalTo(dAtA []byte) (int, error) {
    73  	var i int
    74  	_ = i
    75  	var l int
    76  	_ = l
    77  	if m.R != nil {
    78  		dAtA[i] = 0xa
    79  		i++
    80  		i = encodeVarintClone(dAtA, i, uint64(m.R.Size()))
    81  		n1, err := m.R.MarshalTo(dAtA[i:])
    82  		if err != nil {
    83  			return 0, err
    84  		}
    85  		i += n1
    86  	}
    87  	dAtA[i] = 0x12
    88  	i++
    89  	i = encodeVarintClone(dAtA, i, uint64(m.Uuid.Size()))
    90  	n2, err := m.Uuid.MarshalTo(dAtA[i:])
    91  	if err != nil {
    92  		return 0, err
    93  	}
    94  	i += n2
    95  	return i, nil
    96  }
    97  
    98  func encodeVarintClone(dAtA []byte, offset int, v uint64) int {
    99  	for v >= 1<<7 {
   100  		dAtA[offset] = uint8(v&0x7f | 0x80)
   101  		v >>= 7
   102  		offset++
   103  	}
   104  	dAtA[offset] = uint8(v)
   105  	return offset + 1
   106  }
   107  func (m *RecursiveAndUncloneable) Size() (n int) {
   108  	if m == nil {
   109  		return 0
   110  	}
   111  	var l int
   112  	_ = l
   113  	if m.R != nil {
   114  		l = m.R.Size()
   115  		n += 1 + l + sovClone(uint64(l))
   116  	}
   117  	l = m.Uuid.Size()
   118  	n += 1 + l + sovClone(uint64(l))
   119  	return n
   120  }
   121  
   122  func sovClone(x uint64) (n int) {
   123  	for {
   124  		n++
   125  		x >>= 7
   126  		if x == 0 {
   127  			break
   128  		}
   129  	}
   130  	return n
   131  }
   132  func sozClone(x uint64) (n int) {
   133  	return sovClone(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   134  }
   135  func (m *RecursiveAndUncloneable) Unmarshal(dAtA []byte) error {
   136  	l := len(dAtA)
   137  	iNdEx := 0
   138  	for iNdEx < l {
   139  		preIndex := iNdEx
   140  		var wire uint64
   141  		for shift := uint(0); ; shift += 7 {
   142  			if shift >= 64 {
   143  				return ErrIntOverflowClone
   144  			}
   145  			if iNdEx >= l {
   146  				return io.ErrUnexpectedEOF
   147  			}
   148  			b := dAtA[iNdEx]
   149  			iNdEx++
   150  			wire |= (uint64(b) & 0x7F) << shift
   151  			if b < 0x80 {
   152  				break
   153  			}
   154  		}
   155  		fieldNum := int32(wire >> 3)
   156  		wireType := int(wire & 0x7)
   157  		if wireType == 4 {
   158  			return fmt.Errorf("proto: RecursiveAndUncloneable: wiretype end group for non-group")
   159  		}
   160  		if fieldNum <= 0 {
   161  			return fmt.Errorf("proto: RecursiveAndUncloneable: illegal tag %d (wire type %d)", fieldNum, wire)
   162  		}
   163  		switch fieldNum {
   164  		case 1:
   165  			if wireType != 2 {
   166  				return fmt.Errorf("proto: wrong wireType = %d for field R", wireType)
   167  			}
   168  			var msglen int
   169  			for shift := uint(0); ; shift += 7 {
   170  				if shift >= 64 {
   171  					return ErrIntOverflowClone
   172  				}
   173  				if iNdEx >= l {
   174  					return io.ErrUnexpectedEOF
   175  				}
   176  				b := dAtA[iNdEx]
   177  				iNdEx++
   178  				msglen |= (int(b) & 0x7F) << shift
   179  				if b < 0x80 {
   180  					break
   181  				}
   182  			}
   183  			if msglen < 0 {
   184  				return ErrInvalidLengthClone
   185  			}
   186  			postIndex := iNdEx + msglen
   187  			if postIndex > l {
   188  				return io.ErrUnexpectedEOF
   189  			}
   190  			if m.R == nil {
   191  				m.R = &RecursiveAndUncloneable{}
   192  			}
   193  			if err := m.R.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   194  				return err
   195  			}
   196  			iNdEx = postIndex
   197  		case 2:
   198  			if wireType != 2 {
   199  				return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
   200  			}
   201  			var byteLen int
   202  			for shift := uint(0); ; shift += 7 {
   203  				if shift >= 64 {
   204  					return ErrIntOverflowClone
   205  				}
   206  				if iNdEx >= l {
   207  					return io.ErrUnexpectedEOF
   208  				}
   209  				b := dAtA[iNdEx]
   210  				iNdEx++
   211  				byteLen |= (int(b) & 0x7F) << shift
   212  				if b < 0x80 {
   213  					break
   214  				}
   215  			}
   216  			if byteLen < 0 {
   217  				return ErrInvalidLengthClone
   218  			}
   219  			postIndex := iNdEx + byteLen
   220  			if postIndex > l {
   221  				return io.ErrUnexpectedEOF
   222  			}
   223  			if err := m.Uuid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   224  				return err
   225  			}
   226  			iNdEx = postIndex
   227  		default:
   228  			iNdEx = preIndex
   229  			skippy, err := skipClone(dAtA[iNdEx:])
   230  			if err != nil {
   231  				return err
   232  			}
   233  			if skippy < 0 {
   234  				return ErrInvalidLengthClone
   235  			}
   236  			if (iNdEx + skippy) > l {
   237  				return io.ErrUnexpectedEOF
   238  			}
   239  			iNdEx += skippy
   240  		}
   241  	}
   242  
   243  	if iNdEx > l {
   244  		return io.ErrUnexpectedEOF
   245  	}
   246  	return nil
   247  }
   248  func skipClone(dAtA []byte) (n int, err error) {
   249  	l := len(dAtA)
   250  	iNdEx := 0
   251  	for iNdEx < l {
   252  		var wire uint64
   253  		for shift := uint(0); ; shift += 7 {
   254  			if shift >= 64 {
   255  				return 0, ErrIntOverflowClone
   256  			}
   257  			if iNdEx >= l {
   258  				return 0, io.ErrUnexpectedEOF
   259  			}
   260  			b := dAtA[iNdEx]
   261  			iNdEx++
   262  			wire |= (uint64(b) & 0x7F) << shift
   263  			if b < 0x80 {
   264  				break
   265  			}
   266  		}
   267  		wireType := int(wire & 0x7)
   268  		switch wireType {
   269  		case 0:
   270  			for shift := uint(0); ; shift += 7 {
   271  				if shift >= 64 {
   272  					return 0, ErrIntOverflowClone
   273  				}
   274  				if iNdEx >= l {
   275  					return 0, io.ErrUnexpectedEOF
   276  				}
   277  				iNdEx++
   278  				if dAtA[iNdEx-1] < 0x80 {
   279  					break
   280  				}
   281  			}
   282  			return iNdEx, nil
   283  		case 1:
   284  			iNdEx += 8
   285  			return iNdEx, nil
   286  		case 2:
   287  			var length int
   288  			for shift := uint(0); ; shift += 7 {
   289  				if shift >= 64 {
   290  					return 0, ErrIntOverflowClone
   291  				}
   292  				if iNdEx >= l {
   293  					return 0, io.ErrUnexpectedEOF
   294  				}
   295  				b := dAtA[iNdEx]
   296  				iNdEx++
   297  				length |= (int(b) & 0x7F) << shift
   298  				if b < 0x80 {
   299  					break
   300  				}
   301  			}
   302  			iNdEx += length
   303  			if length < 0 {
   304  				return 0, ErrInvalidLengthClone
   305  			}
   306  			return iNdEx, nil
   307  		case 3:
   308  			for {
   309  				var innerWire uint64
   310  				var start int = iNdEx
   311  				for shift := uint(0); ; shift += 7 {
   312  					if shift >= 64 {
   313  						return 0, ErrIntOverflowClone
   314  					}
   315  					if iNdEx >= l {
   316  						return 0, io.ErrUnexpectedEOF
   317  					}
   318  					b := dAtA[iNdEx]
   319  					iNdEx++
   320  					innerWire |= (uint64(b) & 0x7F) << shift
   321  					if b < 0x80 {
   322  						break
   323  					}
   324  				}
   325  				innerWireType := int(innerWire & 0x7)
   326  				if innerWireType == 4 {
   327  					break
   328  				}
   329  				next, err := skipClone(dAtA[start:])
   330  				if err != nil {
   331  					return 0, err
   332  				}
   333  				iNdEx = start + next
   334  			}
   335  			return iNdEx, nil
   336  		case 4:
   337  			return iNdEx, nil
   338  		case 5:
   339  			iNdEx += 4
   340  			return iNdEx, nil
   341  		default:
   342  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   343  		}
   344  	}
   345  	panic("unreachable")
   346  }
   347  
   348  var (
   349  	ErrInvalidLengthClone = fmt.Errorf("proto: negative length found during unmarshaling")
   350  	ErrIntOverflowClone   = fmt.Errorf("proto: integer overflow")
   351  )
   352  
   353  func init() { proto.RegisterFile("util/protoutil/clone.proto", fileDescriptor_clone_96c900215ff8e4e9) }
   354  
   355  var fileDescriptor_clone_96c900215ff8e4e9 = []byte{
   356  	// 226 bytes of a gzipped FileDescriptorProto
   357  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x2d, 0xc9, 0xcc,
   358  	0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x07, 0xb3, 0x92, 0x73, 0xf2, 0xf3, 0x52, 0xf5, 0xc0, 0x7c,
   359  	0x21, 0x89, 0xe4, 0xfc, 0xe4, 0xec, 0xa2, 0xfc, 0xc4, 0xe4, 0x0c, 0x3d, 0x90, 0x9c, 0x1e, 0x5c,
   360  	0x95, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xab, 0x0f, 0x62, 0x41, 0x64, 0x94, 0x56, 0x33,
   361  	0x72, 0x89, 0x07, 0xa5, 0x26, 0x97, 0x16, 0x15, 0x67, 0x96, 0xa5, 0x3a, 0xe6, 0xa5, 0x84, 0xe6,
   362  	0x81, 0x4d, 0x4b, 0x4c, 0xca, 0x49, 0x15, 0xb2, 0xe7, 0x62, 0x2c, 0x92, 0x60, 0x54, 0x60, 0xd4,
   363  	0xe0, 0x36, 0x32, 0xd4, 0xc3, 0x65, 0xae, 0x1e, 0x0e, 0xdd, 0x41, 0x8c, 0x45, 0x42, 0xfe, 0x5c,
   364  	0x2c, 0xa5, 0xa5, 0x99, 0x29, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x4e, 0xd6, 0x27, 0xee, 0xc9,
   365  	0x33, 0xdc, 0xba, 0x27, 0x6f, 0x9c, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab,
   366  	0x0f, 0x37, 0x35, 0x25, 0x09, 0xc1, 0xd6, 0x2f, 0xc8, 0x4e, 0xd7, 0x07, 0xfb, 0x0c, 0xa4, 0x5b,
   367  	0x2f, 0x34, 0xd4, 0xd3, 0x25, 0x08, 0x6c, 0x90, 0x93, 0xf6, 0x89, 0x87, 0x72, 0x0c, 0x27, 0x1e,
   368  	0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13,
   369  	0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x27, 0xdc, 0x61,
   370  	0x49, 0x6c, 0x60, 0xa6, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x54, 0x1c, 0xcf, 0x2f, 0x01,
   371  	0x00, 0x00,
   372  }