github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ccl/utilccl/licenseccl/license.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ccl/utilccl/licenseccl/license.proto 3 4 package licenseccl 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 License_Type int32 26 27 const ( 28 License_NonCommercial License_Type = 0 29 License_Enterprise License_Type = 1 30 License_Evaluation License_Type = 2 31 ) 32 33 var License_Type_name = map[int32]string{ 34 0: "NonCommercial", 35 1: "Enterprise", 36 2: "Evaluation", 37 } 38 var License_Type_value = map[string]int32{ 39 "NonCommercial": 0, 40 "Enterprise": 1, 41 "Evaluation": 2, 42 } 43 44 func (x License_Type) String() string { 45 return proto.EnumName(License_Type_name, int32(x)) 46 } 47 func (License_Type) EnumDescriptor() ([]byte, []int) { 48 return fileDescriptor_license_9dc270caeb56da02, []int{0, 0} 49 } 50 51 type License struct { 52 ClusterID []github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"cluster_id"` 53 ValidUntilUnixSec int64 `protobuf:"varint,2,opt,name=valid_until_unix_sec,json=validUntilUnixSec,proto3" json:"valid_until_unix_sec,omitempty"` 54 Type License_Type `protobuf:"varint,3,opt,name=type,proto3,enum=cockroach.ccl.utilccl.licenseccl.License_Type" json:"type,omitempty"` 55 OrganizationName string `protobuf:"bytes,4,opt,name=organization_name,json=organizationName,proto3" json:"organization_name,omitempty"` 56 } 57 58 func (m *License) Reset() { *m = License{} } 59 func (m *License) String() string { return proto.CompactTextString(m) } 60 func (*License) ProtoMessage() {} 61 func (*License) Descriptor() ([]byte, []int) { 62 return fileDescriptor_license_9dc270caeb56da02, []int{0} 63 } 64 func (m *License) XXX_Unmarshal(b []byte) error { 65 return m.Unmarshal(b) 66 } 67 func (m *License) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 68 b = b[:cap(b)] 69 n, err := m.MarshalTo(b) 70 if err != nil { 71 return nil, err 72 } 73 return b[:n], nil 74 } 75 func (dst *License) XXX_Merge(src proto.Message) { 76 xxx_messageInfo_License.Merge(dst, src) 77 } 78 func (m *License) XXX_Size() int { 79 return m.Size() 80 } 81 func (m *License) XXX_DiscardUnknown() { 82 xxx_messageInfo_License.DiscardUnknown(m) 83 } 84 85 var xxx_messageInfo_License proto.InternalMessageInfo 86 87 func init() { 88 proto.RegisterType((*License)(nil), "cockroach.ccl.utilccl.licenseccl.License") 89 proto.RegisterEnum("cockroach.ccl.utilccl.licenseccl.License_Type", License_Type_name, License_Type_value) 90 } 91 func (m *License) Marshal() (dAtA []byte, err error) { 92 size := m.Size() 93 dAtA = make([]byte, size) 94 n, err := m.MarshalTo(dAtA) 95 if err != nil { 96 return nil, err 97 } 98 return dAtA[:n], nil 99 } 100 101 func (m *License) MarshalTo(dAtA []byte) (int, error) { 102 var i int 103 _ = i 104 var l int 105 _ = l 106 if len(m.ClusterID) > 0 { 107 for _, msg := range m.ClusterID { 108 dAtA[i] = 0xa 109 i++ 110 i = encodeVarintLicense(dAtA, i, uint64(msg.Size())) 111 n, err := msg.MarshalTo(dAtA[i:]) 112 if err != nil { 113 return 0, err 114 } 115 i += n 116 } 117 } 118 if m.ValidUntilUnixSec != 0 { 119 dAtA[i] = 0x10 120 i++ 121 i = encodeVarintLicense(dAtA, i, uint64(m.ValidUntilUnixSec)) 122 } 123 if m.Type != 0 { 124 dAtA[i] = 0x18 125 i++ 126 i = encodeVarintLicense(dAtA, i, uint64(m.Type)) 127 } 128 if len(m.OrganizationName) > 0 { 129 dAtA[i] = 0x22 130 i++ 131 i = encodeVarintLicense(dAtA, i, uint64(len(m.OrganizationName))) 132 i += copy(dAtA[i:], m.OrganizationName) 133 } 134 return i, nil 135 } 136 137 func encodeVarintLicense(dAtA []byte, offset int, v uint64) int { 138 for v >= 1<<7 { 139 dAtA[offset] = uint8(v&0x7f | 0x80) 140 v >>= 7 141 offset++ 142 } 143 dAtA[offset] = uint8(v) 144 return offset + 1 145 } 146 func (m *License) Size() (n int) { 147 if m == nil { 148 return 0 149 } 150 var l int 151 _ = l 152 if len(m.ClusterID) > 0 { 153 for _, e := range m.ClusterID { 154 l = e.Size() 155 n += 1 + l + sovLicense(uint64(l)) 156 } 157 } 158 if m.ValidUntilUnixSec != 0 { 159 n += 1 + sovLicense(uint64(m.ValidUntilUnixSec)) 160 } 161 if m.Type != 0 { 162 n += 1 + sovLicense(uint64(m.Type)) 163 } 164 l = len(m.OrganizationName) 165 if l > 0 { 166 n += 1 + l + sovLicense(uint64(l)) 167 } 168 return n 169 } 170 171 func sovLicense(x uint64) (n int) { 172 for { 173 n++ 174 x >>= 7 175 if x == 0 { 176 break 177 } 178 } 179 return n 180 } 181 func sozLicense(x uint64) (n int) { 182 return sovLicense(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 183 } 184 func (m *License) Unmarshal(dAtA []byte) error { 185 l := len(dAtA) 186 iNdEx := 0 187 for iNdEx < l { 188 preIndex := iNdEx 189 var wire uint64 190 for shift := uint(0); ; shift += 7 { 191 if shift >= 64 { 192 return ErrIntOverflowLicense 193 } 194 if iNdEx >= l { 195 return io.ErrUnexpectedEOF 196 } 197 b := dAtA[iNdEx] 198 iNdEx++ 199 wire |= (uint64(b) & 0x7F) << shift 200 if b < 0x80 { 201 break 202 } 203 } 204 fieldNum := int32(wire >> 3) 205 wireType := int(wire & 0x7) 206 if wireType == 4 { 207 return fmt.Errorf("proto: License: wiretype end group for non-group") 208 } 209 if fieldNum <= 0 { 210 return fmt.Errorf("proto: License: illegal tag %d (wire type %d)", fieldNum, wire) 211 } 212 switch fieldNum { 213 case 1: 214 if wireType != 2 { 215 return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType) 216 } 217 var byteLen int 218 for shift := uint(0); ; shift += 7 { 219 if shift >= 64 { 220 return ErrIntOverflowLicense 221 } 222 if iNdEx >= l { 223 return io.ErrUnexpectedEOF 224 } 225 b := dAtA[iNdEx] 226 iNdEx++ 227 byteLen |= (int(b) & 0x7F) << shift 228 if b < 0x80 { 229 break 230 } 231 } 232 if byteLen < 0 { 233 return ErrInvalidLengthLicense 234 } 235 postIndex := iNdEx + byteLen 236 if postIndex > l { 237 return io.ErrUnexpectedEOF 238 } 239 var v github_com_cockroachdb_cockroach_pkg_util_uuid.UUID 240 m.ClusterID = append(m.ClusterID, v) 241 if err := m.ClusterID[len(m.ClusterID)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 242 return err 243 } 244 iNdEx = postIndex 245 case 2: 246 if wireType != 0 { 247 return fmt.Errorf("proto: wrong wireType = %d for field ValidUntilUnixSec", wireType) 248 } 249 m.ValidUntilUnixSec = 0 250 for shift := uint(0); ; shift += 7 { 251 if shift >= 64 { 252 return ErrIntOverflowLicense 253 } 254 if iNdEx >= l { 255 return io.ErrUnexpectedEOF 256 } 257 b := dAtA[iNdEx] 258 iNdEx++ 259 m.ValidUntilUnixSec |= (int64(b) & 0x7F) << shift 260 if b < 0x80 { 261 break 262 } 263 } 264 case 3: 265 if wireType != 0 { 266 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 267 } 268 m.Type = 0 269 for shift := uint(0); ; shift += 7 { 270 if shift >= 64 { 271 return ErrIntOverflowLicense 272 } 273 if iNdEx >= l { 274 return io.ErrUnexpectedEOF 275 } 276 b := dAtA[iNdEx] 277 iNdEx++ 278 m.Type |= (License_Type(b) & 0x7F) << shift 279 if b < 0x80 { 280 break 281 } 282 } 283 case 4: 284 if wireType != 2 { 285 return fmt.Errorf("proto: wrong wireType = %d for field OrganizationName", wireType) 286 } 287 var stringLen uint64 288 for shift := uint(0); ; shift += 7 { 289 if shift >= 64 { 290 return ErrIntOverflowLicense 291 } 292 if iNdEx >= l { 293 return io.ErrUnexpectedEOF 294 } 295 b := dAtA[iNdEx] 296 iNdEx++ 297 stringLen |= (uint64(b) & 0x7F) << shift 298 if b < 0x80 { 299 break 300 } 301 } 302 intStringLen := int(stringLen) 303 if intStringLen < 0 { 304 return ErrInvalidLengthLicense 305 } 306 postIndex := iNdEx + intStringLen 307 if postIndex > l { 308 return io.ErrUnexpectedEOF 309 } 310 m.OrganizationName = string(dAtA[iNdEx:postIndex]) 311 iNdEx = postIndex 312 default: 313 iNdEx = preIndex 314 skippy, err := skipLicense(dAtA[iNdEx:]) 315 if err != nil { 316 return err 317 } 318 if skippy < 0 { 319 return ErrInvalidLengthLicense 320 } 321 if (iNdEx + skippy) > l { 322 return io.ErrUnexpectedEOF 323 } 324 iNdEx += skippy 325 } 326 } 327 328 if iNdEx > l { 329 return io.ErrUnexpectedEOF 330 } 331 return nil 332 } 333 func skipLicense(dAtA []byte) (n int, err error) { 334 l := len(dAtA) 335 iNdEx := 0 336 for iNdEx < l { 337 var wire uint64 338 for shift := uint(0); ; shift += 7 { 339 if shift >= 64 { 340 return 0, ErrIntOverflowLicense 341 } 342 if iNdEx >= l { 343 return 0, io.ErrUnexpectedEOF 344 } 345 b := dAtA[iNdEx] 346 iNdEx++ 347 wire |= (uint64(b) & 0x7F) << shift 348 if b < 0x80 { 349 break 350 } 351 } 352 wireType := int(wire & 0x7) 353 switch wireType { 354 case 0: 355 for shift := uint(0); ; shift += 7 { 356 if shift >= 64 { 357 return 0, ErrIntOverflowLicense 358 } 359 if iNdEx >= l { 360 return 0, io.ErrUnexpectedEOF 361 } 362 iNdEx++ 363 if dAtA[iNdEx-1] < 0x80 { 364 break 365 } 366 } 367 return iNdEx, nil 368 case 1: 369 iNdEx += 8 370 return iNdEx, nil 371 case 2: 372 var length int 373 for shift := uint(0); ; shift += 7 { 374 if shift >= 64 { 375 return 0, ErrIntOverflowLicense 376 } 377 if iNdEx >= l { 378 return 0, io.ErrUnexpectedEOF 379 } 380 b := dAtA[iNdEx] 381 iNdEx++ 382 length |= (int(b) & 0x7F) << shift 383 if b < 0x80 { 384 break 385 } 386 } 387 iNdEx += length 388 if length < 0 { 389 return 0, ErrInvalidLengthLicense 390 } 391 return iNdEx, nil 392 case 3: 393 for { 394 var innerWire uint64 395 var start int = iNdEx 396 for shift := uint(0); ; shift += 7 { 397 if shift >= 64 { 398 return 0, ErrIntOverflowLicense 399 } 400 if iNdEx >= l { 401 return 0, io.ErrUnexpectedEOF 402 } 403 b := dAtA[iNdEx] 404 iNdEx++ 405 innerWire |= (uint64(b) & 0x7F) << shift 406 if b < 0x80 { 407 break 408 } 409 } 410 innerWireType := int(innerWire & 0x7) 411 if innerWireType == 4 { 412 break 413 } 414 next, err := skipLicense(dAtA[start:]) 415 if err != nil { 416 return 0, err 417 } 418 iNdEx = start + next 419 } 420 return iNdEx, nil 421 case 4: 422 return iNdEx, nil 423 case 5: 424 iNdEx += 4 425 return iNdEx, nil 426 default: 427 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 428 } 429 } 430 panic("unreachable") 431 } 432 433 var ( 434 ErrInvalidLengthLicense = fmt.Errorf("proto: negative length found during unmarshaling") 435 ErrIntOverflowLicense = fmt.Errorf("proto: integer overflow") 436 ) 437 438 func init() { 439 proto.RegisterFile("ccl/utilccl/licenseccl/license.proto", fileDescriptor_license_9dc270caeb56da02) 440 } 441 442 var fileDescriptor_license_9dc270caeb56da02 = []byte{ 443 // 362 bytes of a gzipped FileDescriptorProto 444 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x31, 0x8f, 0xda, 0x30, 445 0x1c, 0xc5, 0x63, 0x40, 0xad, 0xb0, 0x5a, 0x14, 0x22, 0x86, 0xa8, 0x83, 0x89, 0x50, 0x87, 0x48, 446 0xad, 0x1c, 0xa9, 0x4c, 0x5d, 0x81, 0x4a, 0x45, 0xaa, 0x18, 0xd2, 0x66, 0xe9, 0x12, 0x19, 0xc7, 447 0x0a, 0x16, 0x8e, 0x1d, 0x25, 0x36, 0x82, 0x7e, 0x8a, 0x7e, 0x2c, 0xb6, 0x63, 0x44, 0x37, 0xa0, 448 0xbb, 0xf0, 0x45, 0x4e, 0x09, 0xe8, 0x60, 0xbb, 0xc9, 0xcf, 0x7a, 0xef, 0xf7, 0xf7, 0xff, 0xc9, 449 0xf0, 0x33, 0xa5, 0x22, 0x30, 0x9a, 0x8b, 0xfa, 0x14, 0x9c, 0x32, 0x59, 0xb2, 0x3b, 0x89, 0xf3, 450 0x42, 0x69, 0xe5, 0x78, 0x54, 0xd1, 0x75, 0xa1, 0x08, 0x5d, 0x61, 0x4a, 0x05, 0xbe, 0xe6, 0xf1, 451 0x2d, 0xff, 0x69, 0x90, 0xaa, 0x54, 0x35, 0xe1, 0xa0, 0x56, 0x17, 0x6e, 0xf4, 0xd0, 0x82, 0xef, 452 0x7f, 0x5d, 0x42, 0x4e, 0x0a, 0x21, 0x15, 0xa6, 0xd4, 0xac, 0x88, 0x79, 0xe2, 0x02, 0xaf, 0xed, 453 0x7f, 0x98, 0xfc, 0xdc, 0x9f, 0x86, 0xd6, 0xe3, 0x69, 0x38, 0x4e, 0xb9, 0x5e, 0x99, 0x25, 0xa6, 454 0x2a, 0x0b, 0x5e, 0x9f, 0x4a, 0x96, 0x37, 0x1d, 0xe4, 0xeb, 0xb4, 0x59, 0x33, 0x30, 0x86, 0x27, 455 0x38, 0x8a, 0xe6, 0xb3, 0xea, 0x34, 0xec, 0x4e, 0x2f, 0x03, 0xe7, 0xb3, 0xb0, 0x7b, 0x9d, 0x3d, 456 0x4f, 0x9c, 0x00, 0x0e, 0x36, 0x44, 0xf0, 0x24, 0x36, 0x52, 0x73, 0x11, 0x1b, 0xc9, 0xb7, 0x71, 457 0xc9, 0xa8, 0xdb, 0xf2, 0x80, 0xdf, 0x0e, 0xfb, 0x8d, 0x17, 0xd5, 0x56, 0x24, 0xf9, 0xf6, 0x37, 458 0xa3, 0xce, 0x04, 0x76, 0xf4, 0x2e, 0x67, 0x6e, 0xdb, 0x03, 0x7e, 0xef, 0x1b, 0xc6, 0x6f, 0x95, 459 0xc5, 0xd7, 0x4a, 0xf8, 0xcf, 0x2e, 0x67, 0x61, 0xc3, 0x3a, 0x5f, 0x60, 0x5f, 0x15, 0x29, 0x91, 460 0xfc, 0x1f, 0xd1, 0x5c, 0xc9, 0x58, 0x92, 0x8c, 0xb9, 0x1d, 0x0f, 0xf8, 0xdd, 0xd0, 0xbe, 0x37, 461 0x16, 0x24, 0x63, 0xa3, 0xef, 0xb0, 0x53, 0xa3, 0x4e, 0x1f, 0x7e, 0x5c, 0x28, 0x39, 0x55, 0x59, 462 0xc6, 0x0a, 0xca, 0x89, 0xb0, 0x2d, 0xa7, 0x07, 0xe1, 0x0f, 0xa9, 0x59, 0x91, 0x17, 0xbc, 0x64, 463 0x36, 0x68, 0xee, 0x1b, 0x22, 0x4c, 0x03, 0xdb, 0xad, 0xc9, 0xd7, 0xfd, 0x33, 0xb2, 0xf6, 0x15, 464 0x02, 0x87, 0x0a, 0x81, 0x63, 0x85, 0xc0, 0x53, 0x85, 0xc0, 0xff, 0x33, 0xb2, 0x0e, 0x67, 0x64, 465 0x1d, 0xcf, 0xc8, 0xfa, 0x0b, 0x6f, 0x8b, 0x2e, 0xdf, 0x35, 0xdf, 0x30, 0x7e, 0x09, 0x00, 0x00, 466 0xff, 0xff, 0x36, 0x56, 0x7c, 0xf6, 0xe6, 0x01, 0x00, 0x00, 467 }