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