kafka-grpc 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,6 +125,20 @@ end
125
125
  ACKS_ALL = 3
126
126
  end
127
127
 
128
+ module ConfigResourceType
129
+ CONFIG_RESOURCE_UNKNOWN = 0
130
+ CONFIG_RESOURCE_TOPIC = 2
131
+ CONFIG_RESOURCE_BROKER = 4
132
+ CONFIG_RESOURCE_BROKER_LOGGER = 8
133
+ CONFIG_RESOURCE_CLIENT_METRICS = 16
134
+ CONFIG_RESOURCE_GROUP = 32
135
+ end
136
+
137
+ module ConfigOp
138
+ CONFIG_OP_SET = 0
139
+ CONFIG_OP_DELETE = 1
140
+ end
141
+
128
142
  class Header
129
143
  attr_accessor :key, :value, :unknown_fields
130
144
 
@@ -1298,9 +1312,9 @@ end
1298
1312
  end
1299
1313
 
1300
1314
  class GroupSubscribeRequest
1301
- attr_accessor :group_id, :topics, :group_instance_id, :session_timeout_ms, :max_poll_records, :auto_offset_reset, :read_committed, :unknown_fields
1315
+ attr_accessor :group_id, :topics, :group_instance_id, :session_timeout_ms, :max_poll_records, :auto_offset_reset, :read_committed, :group_protocol, :unknown_fields
1302
1316
 
1303
- def initialize(group_id: "", topics: [], group_instance_id: "", session_timeout_ms: 0, max_poll_records: 0, auto_offset_reset: "", read_committed: false)
1317
+ def initialize(group_id: "", topics: [], group_instance_id: "", session_timeout_ms: 0, max_poll_records: 0, auto_offset_reset: "", read_committed: false, group_protocol: "")
1304
1318
  @group_id = group_id
1305
1319
  @topics = topics
1306
1320
  @group_instance_id = group_instance_id
@@ -1308,6 +1322,7 @@ end
1308
1322
  @max_poll_records = max_poll_records
1309
1323
  @auto_offset_reset = auto_offset_reset
1310
1324
  @read_committed = read_committed
1325
+ @group_protocol = group_protocol
1311
1326
  @unknown_fields = "".b
1312
1327
  end
1313
1328
 
@@ -1329,6 +1344,7 @@ end
1329
1344
  w.tag(7, 0)
1330
1345
  w.varint((@read_committed ? 1 : 0))
1331
1346
  end
1347
+ w.string_field(8, @group_protocol)
1332
1348
  w.raw(@unknown_fields)
1333
1349
  w.to_bytes
1334
1350
  end
@@ -1342,6 +1358,7 @@ end
1342
1358
  @max_poll_records = 0
1343
1359
  @auto_offset_reset = ""
1344
1360
  @read_committed = false
1361
+ @group_protocol = ""
1345
1362
  r = Reader.new(data)
1346
1363
  loop do
1347
1364
  item = r.field
@@ -1363,6 +1380,8 @@ end
1363
1380
  @auto_offset_reset = bytes_value.dup.force_encoding(Encoding::UTF_8)
1364
1381
  when 7
1365
1382
  @read_committed = (varint_value != 0)
1383
+ when 8
1384
+ @group_protocol = bytes_value.dup.force_encoding(Encoding::UTF_8)
1366
1385
  else
1367
1386
  @unknown_fields = @unknown_fields + raw_value
1368
1387
  end
@@ -1371,7 +1390,7 @@ end
1371
1390
  end
1372
1391
 
1373
1392
  def ==(other)
1374
- other.is_a?(GroupSubscribeRequest) && @group_id == other.group_id && @topics == other.topics && @group_instance_id == other.group_instance_id && @session_timeout_ms == other.session_timeout_ms && @max_poll_records == other.max_poll_records && @auto_offset_reset == other.auto_offset_reset && @read_committed == other.read_committed
1393
+ other.is_a?(GroupSubscribeRequest) && @group_id == other.group_id && @topics == other.topics && @group_instance_id == other.group_instance_id && @session_timeout_ms == other.session_timeout_ms && @max_poll_records == other.max_poll_records && @auto_offset_reset == other.auto_offset_reset && @read_committed == other.read_committed && @group_protocol == other.group_protocol
1375
1394
  end
1376
1395
  end
1377
1396
 
@@ -2234,4 +2253,2343 @@ end
2234
2253
  end
2235
2254
  end
2236
2255
 
2256
+ class ConfigEntry
2257
+ attr_accessor :name, :value, :unknown_fields
2258
+
2259
+ def initialize(name: "", value: "")
2260
+ @name = name
2261
+ @value = value
2262
+ @unknown_fields = "".b
2263
+ end
2264
+
2265
+ def marshal_dc
2266
+ w = Writer.new
2267
+ w.string_field(1, @name)
2268
+ w.string_field(2, @value)
2269
+ w.raw(@unknown_fields)
2270
+ w.to_bytes
2271
+ end
2272
+
2273
+ def unmarshal_dc(data)
2274
+ @unknown_fields = "".b
2275
+ @name = ""
2276
+ @value = ""
2277
+ r = Reader.new(data)
2278
+ loop do
2279
+ item = r.field
2280
+ break if item.nil?
2281
+
2282
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2283
+ case num
2284
+ when 1
2285
+ @name = bytes_value.dup.force_encoding(Encoding::UTF_8)
2286
+ when 2
2287
+ @value = bytes_value.dup.force_encoding(Encoding::UTF_8)
2288
+ else
2289
+ @unknown_fields = @unknown_fields + raw_value
2290
+ end
2291
+ end
2292
+ self
2293
+ end
2294
+
2295
+ def ==(other)
2296
+ other.is_a?(ConfigEntry) && @name == other.name && @value == other.value
2297
+ end
2298
+ end
2299
+
2300
+ class AlterConfigEntry
2301
+ attr_accessor :name, :value, :op, :unknown_fields
2302
+
2303
+ def initialize(name: "", value: "", op: 0)
2304
+ @name = name
2305
+ @value = value
2306
+ @op = op
2307
+ @unknown_fields = "".b
2308
+ end
2309
+
2310
+ def marshal_dc
2311
+ w = Writer.new
2312
+ w.string_field(1, @name)
2313
+ w.string_field(2, @value)
2314
+ if @op != 0
2315
+ w.tag(3, 0)
2316
+ w.varint(@op)
2317
+ end
2318
+ w.raw(@unknown_fields)
2319
+ w.to_bytes
2320
+ end
2321
+
2322
+ def unmarshal_dc(data)
2323
+ @unknown_fields = "".b
2324
+ @name = ""
2325
+ @value = ""
2326
+ @op = 0
2327
+ r = Reader.new(data)
2328
+ loop do
2329
+ item = r.field
2330
+ break if item.nil?
2331
+
2332
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2333
+ case num
2334
+ when 1
2335
+ @name = bytes_value.dup.force_encoding(Encoding::UTF_8)
2336
+ when 2
2337
+ @value = bytes_value.dup.force_encoding(Encoding::UTF_8)
2338
+ when 3
2339
+ @op = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2340
+ else
2341
+ @unknown_fields = @unknown_fields + raw_value
2342
+ end
2343
+ end
2344
+ self
2345
+ end
2346
+
2347
+ def ==(other)
2348
+ other.is_a?(AlterConfigEntry) && @name == other.name && @value == other.value && @op == other.op
2349
+ end
2350
+ end
2351
+
2352
+ class DescribeConfigsRequest
2353
+ attr_accessor :resource_type, :resource_name, :config_keys, :include_synonyms, :unknown_fields
2354
+
2355
+ def initialize(resource_type: 0, resource_name: "", config_keys: [], include_synonyms: false)
2356
+ @resource_type = resource_type
2357
+ @resource_name = resource_name
2358
+ @config_keys = config_keys
2359
+ @include_synonyms = include_synonyms
2360
+ @unknown_fields = "".b
2361
+ end
2362
+
2363
+ def marshal_dc
2364
+ w = Writer.new
2365
+ if @resource_type != 0
2366
+ w.tag(1, 0)
2367
+ w.varint(@resource_type)
2368
+ end
2369
+ w.string_field(2, @resource_name)
2370
+ @config_keys.each { |x| w.bytes_field(3, x) }
2371
+ if @include_synonyms
2372
+ w.tag(4, 0)
2373
+ w.varint((@include_synonyms ? 1 : 0))
2374
+ end
2375
+ w.raw(@unknown_fields)
2376
+ w.to_bytes
2377
+ end
2378
+
2379
+ def unmarshal_dc(data)
2380
+ @unknown_fields = "".b
2381
+ @resource_type = 0
2382
+ @resource_name = ""
2383
+ @config_keys = []
2384
+ @include_synonyms = false
2385
+ r = Reader.new(data)
2386
+ loop do
2387
+ item = r.field
2388
+ break if item.nil?
2389
+
2390
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2391
+ case num
2392
+ when 1
2393
+ @resource_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2394
+ when 2
2395
+ @resource_name = bytes_value.dup.force_encoding(Encoding::UTF_8)
2396
+ when 3
2397
+ @config_keys << bytes_value.dup.force_encoding(Encoding::UTF_8)
2398
+ when 4
2399
+ @include_synonyms = (varint_value != 0)
2400
+ else
2401
+ @unknown_fields = @unknown_fields + raw_value
2402
+ end
2403
+ end
2404
+ self
2405
+ end
2406
+
2407
+ def ==(other)
2408
+ other.is_a?(DescribeConfigsRequest) && @resource_type == other.resource_type && @resource_name == other.resource_name && @config_keys == other.config_keys && @include_synonyms == other.include_synonyms
2409
+ end
2410
+ end
2411
+
2412
+ class ConfigValue
2413
+ attr_accessor :name, :value, :read_only, :source, :is_sensitive, :unknown_fields
2414
+
2415
+ def initialize(name: "", value: "", read_only: false, source: 0, is_sensitive: false)
2416
+ @name = name
2417
+ @value = value
2418
+ @read_only = read_only
2419
+ @source = source
2420
+ @is_sensitive = is_sensitive
2421
+ @unknown_fields = "".b
2422
+ end
2423
+
2424
+ def marshal_dc
2425
+ w = Writer.new
2426
+ w.string_field(1, @name)
2427
+ w.string_field(2, @value)
2428
+ if @read_only
2429
+ w.tag(3, 0)
2430
+ w.varint((@read_only ? 1 : 0))
2431
+ end
2432
+ if @source != 0
2433
+ w.tag(4, 0)
2434
+ w.varint(@source)
2435
+ end
2436
+ if @is_sensitive
2437
+ w.tag(5, 0)
2438
+ w.varint((@is_sensitive ? 1 : 0))
2439
+ end
2440
+ w.raw(@unknown_fields)
2441
+ w.to_bytes
2442
+ end
2443
+
2444
+ def unmarshal_dc(data)
2445
+ @unknown_fields = "".b
2446
+ @name = ""
2447
+ @value = ""
2448
+ @read_only = false
2449
+ @source = 0
2450
+ @is_sensitive = false
2451
+ r = Reader.new(data)
2452
+ loop do
2453
+ item = r.field
2454
+ break if item.nil?
2455
+
2456
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2457
+ case num
2458
+ when 1
2459
+ @name = bytes_value.dup.force_encoding(Encoding::UTF_8)
2460
+ when 2
2461
+ @value = bytes_value.dup.force_encoding(Encoding::UTF_8)
2462
+ when 3
2463
+ @read_only = (varint_value != 0)
2464
+ when 4
2465
+ @source = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2466
+ when 5
2467
+ @is_sensitive = (varint_value != 0)
2468
+ else
2469
+ @unknown_fields = @unknown_fields + raw_value
2470
+ end
2471
+ end
2472
+ self
2473
+ end
2474
+
2475
+ def ==(other)
2476
+ other.is_a?(ConfigValue) && @name == other.name && @value == other.value && @read_only == other.read_only && @source == other.source && @is_sensitive == other.is_sensitive
2477
+ end
2478
+ end
2479
+
2480
+ class DescribeConfigsResponse
2481
+ attr_accessor :error_code, :values, :unknown_fields
2482
+
2483
+ def initialize(error_code: 0, values: [])
2484
+ @error_code = error_code
2485
+ @values = values
2486
+ @unknown_fields = "".b
2487
+ end
2488
+
2489
+ def marshal_dc
2490
+ w = Writer.new
2491
+ if @error_code != 0
2492
+ w.tag(1, 0)
2493
+ w.varint(@error_code)
2494
+ end
2495
+ @values.each { |x| w.bytes_field(2, x.marshal_dc) }
2496
+ w.raw(@unknown_fields)
2497
+ w.to_bytes
2498
+ end
2499
+
2500
+ def unmarshal_dc(data)
2501
+ @unknown_fields = "".b
2502
+ @error_code = 0
2503
+ @values = []
2504
+ r = Reader.new(data)
2505
+ loop do
2506
+ item = r.field
2507
+ break if item.nil?
2508
+
2509
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2510
+ case num
2511
+ when 1
2512
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2513
+ when 2
2514
+ item = ConfigValue.new
2515
+ item.unmarshal_dc(bytes_value)
2516
+ @values << item
2517
+ else
2518
+ @unknown_fields = @unknown_fields + raw_value
2519
+ end
2520
+ end
2521
+ self
2522
+ end
2523
+
2524
+ def ==(other)
2525
+ other.is_a?(DescribeConfigsResponse) && @error_code == other.error_code && @values == other.values
2526
+ end
2527
+ end
2528
+
2529
+ class AlterConfigsRequest
2530
+ attr_accessor :resource_type, :resource_name, :entries, :validate_only, :unknown_fields
2531
+
2532
+ def initialize(resource_type: 0, resource_name: "", entries: [], validate_only: false)
2533
+ @resource_type = resource_type
2534
+ @resource_name = resource_name
2535
+ @entries = entries
2536
+ @validate_only = validate_only
2537
+ @unknown_fields = "".b
2538
+ end
2539
+
2540
+ def marshal_dc
2541
+ w = Writer.new
2542
+ if @resource_type != 0
2543
+ w.tag(1, 0)
2544
+ w.varint(@resource_type)
2545
+ end
2546
+ w.string_field(2, @resource_name)
2547
+ @entries.each { |x| w.bytes_field(3, x.marshal_dc) }
2548
+ if @validate_only
2549
+ w.tag(4, 0)
2550
+ w.varint((@validate_only ? 1 : 0))
2551
+ end
2552
+ w.raw(@unknown_fields)
2553
+ w.to_bytes
2554
+ end
2555
+
2556
+ def unmarshal_dc(data)
2557
+ @unknown_fields = "".b
2558
+ @resource_type = 0
2559
+ @resource_name = ""
2560
+ @entries = []
2561
+ @validate_only = false
2562
+ r = Reader.new(data)
2563
+ loop do
2564
+ item = r.field
2565
+ break if item.nil?
2566
+
2567
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2568
+ case num
2569
+ when 1
2570
+ @resource_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2571
+ when 2
2572
+ @resource_name = bytes_value.dup.force_encoding(Encoding::UTF_8)
2573
+ when 3
2574
+ item = AlterConfigEntry.new
2575
+ item.unmarshal_dc(bytes_value)
2576
+ @entries << item
2577
+ when 4
2578
+ @validate_only = (varint_value != 0)
2579
+ else
2580
+ @unknown_fields = @unknown_fields + raw_value
2581
+ end
2582
+ end
2583
+ self
2584
+ end
2585
+
2586
+ def ==(other)
2587
+ other.is_a?(AlterConfigsRequest) && @resource_type == other.resource_type && @resource_name == other.resource_name && @entries == other.entries && @validate_only == other.validate_only
2588
+ end
2589
+ end
2590
+
2591
+ class AlterConfigsResponse
2592
+ attr_accessor :error_code, :unknown_fields
2593
+
2594
+ def initialize(error_code: 0)
2595
+ @error_code = error_code
2596
+ @unknown_fields = "".b
2597
+ end
2598
+
2599
+ def marshal_dc
2600
+ w = Writer.new
2601
+ if @error_code != 0
2602
+ w.tag(1, 0)
2603
+ w.varint(@error_code)
2604
+ end
2605
+ w.raw(@unknown_fields)
2606
+ w.to_bytes
2607
+ end
2608
+
2609
+ def unmarshal_dc(data)
2610
+ @unknown_fields = "".b
2611
+ @error_code = 0
2612
+ r = Reader.new(data)
2613
+ loop do
2614
+ item = r.field
2615
+ break if item.nil?
2616
+
2617
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2618
+ case num
2619
+ when 1
2620
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2621
+ else
2622
+ @unknown_fields = @unknown_fields + raw_value
2623
+ end
2624
+ end
2625
+ self
2626
+ end
2627
+
2628
+ def ==(other)
2629
+ other.is_a?(AlterConfigsResponse) && @error_code == other.error_code
2630
+ end
2631
+ end
2632
+
2633
+ class CreatePartitionsRequest
2634
+ attr_accessor :topic, :total_count, :validate_only, :timeout_ms, :unknown_fields
2635
+
2636
+ def initialize(topic: "", total_count: 0, validate_only: false, timeout_ms: 0)
2637
+ @topic = topic
2638
+ @total_count = total_count
2639
+ @validate_only = validate_only
2640
+ @timeout_ms = timeout_ms
2641
+ @unknown_fields = "".b
2642
+ end
2643
+
2644
+ def marshal_dc
2645
+ w = Writer.new
2646
+ w.string_field(1, @topic)
2647
+ if @total_count != 0
2648
+ w.tag(2, 0)
2649
+ w.varint(@total_count)
2650
+ end
2651
+ if @validate_only
2652
+ w.tag(3, 0)
2653
+ w.varint((@validate_only ? 1 : 0))
2654
+ end
2655
+ if @timeout_ms != 0
2656
+ w.tag(4, 0)
2657
+ w.varint(@timeout_ms)
2658
+ end
2659
+ w.raw(@unknown_fields)
2660
+ w.to_bytes
2661
+ end
2662
+
2663
+ def unmarshal_dc(data)
2664
+ @unknown_fields = "".b
2665
+ @topic = ""
2666
+ @total_count = 0
2667
+ @validate_only = false
2668
+ @timeout_ms = 0
2669
+ r = Reader.new(data)
2670
+ loop do
2671
+ item = r.field
2672
+ break if item.nil?
2673
+
2674
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2675
+ case num
2676
+ when 1
2677
+ @topic = bytes_value.dup.force_encoding(Encoding::UTF_8)
2678
+ when 2
2679
+ @total_count = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2680
+ when 3
2681
+ @validate_only = (varint_value != 0)
2682
+ when 4
2683
+ @timeout_ms = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2684
+ else
2685
+ @unknown_fields = @unknown_fields + raw_value
2686
+ end
2687
+ end
2688
+ self
2689
+ end
2690
+
2691
+ def ==(other)
2692
+ other.is_a?(CreatePartitionsRequest) && @topic == other.topic && @total_count == other.total_count && @validate_only == other.validate_only && @timeout_ms == other.timeout_ms
2693
+ end
2694
+ end
2695
+
2696
+ class CreatePartitionsResponse
2697
+ attr_accessor :error_code, :unknown_fields
2698
+
2699
+ def initialize(error_code: 0)
2700
+ @error_code = error_code
2701
+ @unknown_fields = "".b
2702
+ end
2703
+
2704
+ def marshal_dc
2705
+ w = Writer.new
2706
+ if @error_code != 0
2707
+ w.tag(1, 0)
2708
+ w.varint(@error_code)
2709
+ end
2710
+ w.raw(@unknown_fields)
2711
+ w.to_bytes
2712
+ end
2713
+
2714
+ def unmarshal_dc(data)
2715
+ @unknown_fields = "".b
2716
+ @error_code = 0
2717
+ r = Reader.new(data)
2718
+ loop do
2719
+ item = r.field
2720
+ break if item.nil?
2721
+
2722
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2723
+ case num
2724
+ when 1
2725
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2726
+ else
2727
+ @unknown_fields = @unknown_fields + raw_value
2728
+ end
2729
+ end
2730
+ self
2731
+ end
2732
+
2733
+ def ==(other)
2734
+ other.is_a?(CreatePartitionsResponse) && @error_code == other.error_code
2735
+ end
2736
+ end
2737
+
2738
+ class DeleteRecordsRequest
2739
+ attr_accessor :topic, :partition, :before_offset, :unknown_fields
2740
+
2741
+ def initialize(topic: "", partition: 0, before_offset: 0)
2742
+ @topic = topic
2743
+ @partition = partition
2744
+ @before_offset = before_offset
2745
+ @unknown_fields = "".b
2746
+ end
2747
+
2748
+ def marshal_dc
2749
+ w = Writer.new
2750
+ w.string_field(1, @topic)
2751
+ if @partition != 0
2752
+ w.tag(2, 0)
2753
+ w.varint(@partition)
2754
+ end
2755
+ if @before_offset != 0
2756
+ w.tag(3, 0)
2757
+ w.varint(@before_offset)
2758
+ end
2759
+ w.raw(@unknown_fields)
2760
+ w.to_bytes
2761
+ end
2762
+
2763
+ def unmarshal_dc(data)
2764
+ @unknown_fields = "".b
2765
+ @topic = ""
2766
+ @partition = 0
2767
+ @before_offset = 0
2768
+ r = Reader.new(data)
2769
+ loop do
2770
+ item = r.field
2771
+ break if item.nil?
2772
+
2773
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2774
+ case num
2775
+ when 1
2776
+ @topic = bytes_value.dup.force_encoding(Encoding::UTF_8)
2777
+ when 2
2778
+ @partition = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2779
+ when 3
2780
+ @before_offset = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
2781
+ else
2782
+ @unknown_fields = @unknown_fields + raw_value
2783
+ end
2784
+ end
2785
+ self
2786
+ end
2787
+
2788
+ def ==(other)
2789
+ other.is_a?(DeleteRecordsRequest) && @topic == other.topic && @partition == other.partition && @before_offset == other.before_offset
2790
+ end
2791
+ end
2792
+
2793
+ class DeleteRecordsResponse
2794
+ attr_accessor :low_watermark, :error_code, :unknown_fields
2795
+
2796
+ def initialize(low_watermark: 0, error_code: 0)
2797
+ @low_watermark = low_watermark
2798
+ @error_code = error_code
2799
+ @unknown_fields = "".b
2800
+ end
2801
+
2802
+ def marshal_dc
2803
+ w = Writer.new
2804
+ if @low_watermark != 0
2805
+ w.tag(1, 0)
2806
+ w.varint(@low_watermark)
2807
+ end
2808
+ if @error_code != 0
2809
+ w.tag(2, 0)
2810
+ w.varint(@error_code)
2811
+ end
2812
+ w.raw(@unknown_fields)
2813
+ w.to_bytes
2814
+ end
2815
+
2816
+ def unmarshal_dc(data)
2817
+ @unknown_fields = "".b
2818
+ @low_watermark = 0
2819
+ @error_code = 0
2820
+ r = Reader.new(data)
2821
+ loop do
2822
+ item = r.field
2823
+ break if item.nil?
2824
+
2825
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2826
+ case num
2827
+ when 1
2828
+ @low_watermark = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
2829
+ when 2
2830
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2831
+ else
2832
+ @unknown_fields = @unknown_fields + raw_value
2833
+ end
2834
+ end
2835
+ self
2836
+ end
2837
+
2838
+ def ==(other)
2839
+ other.is_a?(DeleteRecordsResponse) && @low_watermark == other.low_watermark && @error_code == other.error_code
2840
+ end
2841
+ end
2842
+
2843
+ class ListGroupsRequest
2844
+ def initialize()
2845
+ @unknown_fields = "".b
2846
+ end
2847
+
2848
+ def marshal_dc
2849
+ w = Writer.new
2850
+ w.raw(@unknown_fields)
2851
+ w.to_bytes
2852
+ end
2853
+
2854
+ def unmarshal_dc(data)
2855
+ @unknown_fields = "".b
2856
+ r = Reader.new(data)
2857
+ loop do
2858
+ item = r.field
2859
+ break if item.nil?
2860
+
2861
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2862
+ @unknown_fields = @unknown_fields + raw_value
2863
+ end
2864
+ self
2865
+ end
2866
+
2867
+ def ==(other)
2868
+ other.is_a?(ListGroupsRequest) && true
2869
+ end
2870
+ end
2871
+
2872
+ class GroupListing
2873
+ attr_accessor :group_id, :protocol_type, :group_state, :unknown_fields
2874
+
2875
+ def initialize(group_id: "", protocol_type: "", group_state: "")
2876
+ @group_id = group_id
2877
+ @protocol_type = protocol_type
2878
+ @group_state = group_state
2879
+ @unknown_fields = "".b
2880
+ end
2881
+
2882
+ def marshal_dc
2883
+ w = Writer.new
2884
+ w.string_field(1, @group_id)
2885
+ w.string_field(2, @protocol_type)
2886
+ w.string_field(3, @group_state)
2887
+ w.raw(@unknown_fields)
2888
+ w.to_bytes
2889
+ end
2890
+
2891
+ def unmarshal_dc(data)
2892
+ @unknown_fields = "".b
2893
+ @group_id = ""
2894
+ @protocol_type = ""
2895
+ @group_state = ""
2896
+ r = Reader.new(data)
2897
+ loop do
2898
+ item = r.field
2899
+ break if item.nil?
2900
+
2901
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2902
+ case num
2903
+ when 1
2904
+ @group_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
2905
+ when 2
2906
+ @protocol_type = bytes_value.dup.force_encoding(Encoding::UTF_8)
2907
+ when 3
2908
+ @group_state = bytes_value.dup.force_encoding(Encoding::UTF_8)
2909
+ else
2910
+ @unknown_fields = @unknown_fields + raw_value
2911
+ end
2912
+ end
2913
+ self
2914
+ end
2915
+
2916
+ def ==(other)
2917
+ other.is_a?(GroupListing) && @group_id == other.group_id && @protocol_type == other.protocol_type && @group_state == other.group_state
2918
+ end
2919
+ end
2920
+
2921
+ class ListGroupsResponse
2922
+ attr_accessor :error_code, :groups, :unknown_fields
2923
+
2924
+ def initialize(error_code: 0, groups: [])
2925
+ @error_code = error_code
2926
+ @groups = groups
2927
+ @unknown_fields = "".b
2928
+ end
2929
+
2930
+ def marshal_dc
2931
+ w = Writer.new
2932
+ if @error_code != 0
2933
+ w.tag(1, 0)
2934
+ w.varint(@error_code)
2935
+ end
2936
+ @groups.each { |x| w.bytes_field(2, x.marshal_dc) }
2937
+ w.raw(@unknown_fields)
2938
+ w.to_bytes
2939
+ end
2940
+
2941
+ def unmarshal_dc(data)
2942
+ @unknown_fields = "".b
2943
+ @error_code = 0
2944
+ @groups = []
2945
+ r = Reader.new(data)
2946
+ loop do
2947
+ item = r.field
2948
+ break if item.nil?
2949
+
2950
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2951
+ case num
2952
+ when 1
2953
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
2954
+ when 2
2955
+ item = GroupListing.new
2956
+ item.unmarshal_dc(bytes_value)
2957
+ @groups << item
2958
+ else
2959
+ @unknown_fields = @unknown_fields + raw_value
2960
+ end
2961
+ end
2962
+ self
2963
+ end
2964
+
2965
+ def ==(other)
2966
+ other.is_a?(ListGroupsResponse) && @error_code == other.error_code && @groups == other.groups
2967
+ end
2968
+ end
2969
+
2970
+ class DescribeGroupsRequest
2971
+ attr_accessor :group_ids, :unknown_fields
2972
+
2973
+ def initialize(group_ids: [])
2974
+ @group_ids = group_ids
2975
+ @unknown_fields = "".b
2976
+ end
2977
+
2978
+ def marshal_dc
2979
+ w = Writer.new
2980
+ @group_ids.each { |x| w.bytes_field(1, x) }
2981
+ w.raw(@unknown_fields)
2982
+ w.to_bytes
2983
+ end
2984
+
2985
+ def unmarshal_dc(data)
2986
+ @unknown_fields = "".b
2987
+ @group_ids = []
2988
+ r = Reader.new(data)
2989
+ loop do
2990
+ item = r.field
2991
+ break if item.nil?
2992
+
2993
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
2994
+ case num
2995
+ when 1
2996
+ @group_ids << bytes_value.dup.force_encoding(Encoding::UTF_8)
2997
+ else
2998
+ @unknown_fields = @unknown_fields + raw_value
2999
+ end
3000
+ end
3001
+ self
3002
+ end
3003
+
3004
+ def ==(other)
3005
+ other.is_a?(DescribeGroupsRequest) && @group_ids == other.group_ids
3006
+ end
3007
+ end
3008
+
3009
+ class GroupMember
3010
+ attr_accessor :member_id, :client_id, :client_host, :assignment, :unknown_fields
3011
+
3012
+ def initialize(member_id: "", client_id: "", client_host: "", assignment: [])
3013
+ @member_id = member_id
3014
+ @client_id = client_id
3015
+ @client_host = client_host
3016
+ @assignment = assignment
3017
+ @unknown_fields = "".b
3018
+ end
3019
+
3020
+ def marshal_dc
3021
+ w = Writer.new
3022
+ w.string_field(1, @member_id)
3023
+ w.string_field(2, @client_id)
3024
+ w.string_field(3, @client_host)
3025
+ @assignment.each { |x| w.bytes_field(4, x.marshal_dc) }
3026
+ w.raw(@unknown_fields)
3027
+ w.to_bytes
3028
+ end
3029
+
3030
+ def unmarshal_dc(data)
3031
+ @unknown_fields = "".b
3032
+ @member_id = ""
3033
+ @client_id = ""
3034
+ @client_host = ""
3035
+ @assignment = []
3036
+ r = Reader.new(data)
3037
+ loop do
3038
+ item = r.field
3039
+ break if item.nil?
3040
+
3041
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3042
+ case num
3043
+ when 1
3044
+ @member_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3045
+ when 2
3046
+ @client_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3047
+ when 3
3048
+ @client_host = bytes_value.dup.force_encoding(Encoding::UTF_8)
3049
+ when 4
3050
+ item = TopicPartition.new
3051
+ item.unmarshal_dc(bytes_value)
3052
+ @assignment << item
3053
+ else
3054
+ @unknown_fields = @unknown_fields + raw_value
3055
+ end
3056
+ end
3057
+ self
3058
+ end
3059
+
3060
+ def ==(other)
3061
+ other.is_a?(GroupMember) && @member_id == other.member_id && @client_id == other.client_id && @client_host == other.client_host && @assignment == other.assignment
3062
+ end
3063
+ end
3064
+
3065
+ class DescribedGroup
3066
+ attr_accessor :group_id, :error_code, :group_state, :protocol_type, :protocol, :members, :unknown_fields
3067
+
3068
+ def initialize(group_id: "", error_code: 0, group_state: "", protocol_type: "", protocol: "", members: [])
3069
+ @group_id = group_id
3070
+ @error_code = error_code
3071
+ @group_state = group_state
3072
+ @protocol_type = protocol_type
3073
+ @protocol = protocol
3074
+ @members = members
3075
+ @unknown_fields = "".b
3076
+ end
3077
+
3078
+ def marshal_dc
3079
+ w = Writer.new
3080
+ w.string_field(1, @group_id)
3081
+ if @error_code != 0
3082
+ w.tag(2, 0)
3083
+ w.varint(@error_code)
3084
+ end
3085
+ w.string_field(3, @group_state)
3086
+ w.string_field(4, @protocol_type)
3087
+ w.string_field(5, @protocol)
3088
+ @members.each { |x| w.bytes_field(6, x.marshal_dc) }
3089
+ w.raw(@unknown_fields)
3090
+ w.to_bytes
3091
+ end
3092
+
3093
+ def unmarshal_dc(data)
3094
+ @unknown_fields = "".b
3095
+ @group_id = ""
3096
+ @error_code = 0
3097
+ @group_state = ""
3098
+ @protocol_type = ""
3099
+ @protocol = ""
3100
+ @members = []
3101
+ r = Reader.new(data)
3102
+ loop do
3103
+ item = r.field
3104
+ break if item.nil?
3105
+
3106
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3107
+ case num
3108
+ when 1
3109
+ @group_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3110
+ when 2
3111
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3112
+ when 3
3113
+ @group_state = bytes_value.dup.force_encoding(Encoding::UTF_8)
3114
+ when 4
3115
+ @protocol_type = bytes_value.dup.force_encoding(Encoding::UTF_8)
3116
+ when 5
3117
+ @protocol = bytes_value.dup.force_encoding(Encoding::UTF_8)
3118
+ when 6
3119
+ item = GroupMember.new
3120
+ item.unmarshal_dc(bytes_value)
3121
+ @members << item
3122
+ else
3123
+ @unknown_fields = @unknown_fields + raw_value
3124
+ end
3125
+ end
3126
+ self
3127
+ end
3128
+
3129
+ def ==(other)
3130
+ other.is_a?(DescribedGroup) && @group_id == other.group_id && @error_code == other.error_code && @group_state == other.group_state && @protocol_type == other.protocol_type && @protocol == other.protocol && @members == other.members
3131
+ end
3132
+ end
3133
+
3134
+ class DescribeGroupsResponse
3135
+ attr_accessor :groups, :unknown_fields
3136
+
3137
+ def initialize(groups: [])
3138
+ @groups = groups
3139
+ @unknown_fields = "".b
3140
+ end
3141
+
3142
+ def marshal_dc
3143
+ w = Writer.new
3144
+ @groups.each { |x| w.bytes_field(1, x.marshal_dc) }
3145
+ w.raw(@unknown_fields)
3146
+ w.to_bytes
3147
+ end
3148
+
3149
+ def unmarshal_dc(data)
3150
+ @unknown_fields = "".b
3151
+ @groups = []
3152
+ r = Reader.new(data)
3153
+ loop do
3154
+ item = r.field
3155
+ break if item.nil?
3156
+
3157
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3158
+ case num
3159
+ when 1
3160
+ item = DescribedGroup.new
3161
+ item.unmarshal_dc(bytes_value)
3162
+ @groups << item
3163
+ else
3164
+ @unknown_fields = @unknown_fields + raw_value
3165
+ end
3166
+ end
3167
+ self
3168
+ end
3169
+
3170
+ def ==(other)
3171
+ other.is_a?(DescribeGroupsResponse) && @groups == other.groups
3172
+ end
3173
+ end
3174
+
3175
+ class DeleteGroupsRequest
3176
+ attr_accessor :group_ids, :unknown_fields
3177
+
3178
+ def initialize(group_ids: [])
3179
+ @group_ids = group_ids
3180
+ @unknown_fields = "".b
3181
+ end
3182
+
3183
+ def marshal_dc
3184
+ w = Writer.new
3185
+ @group_ids.each { |x| w.bytes_field(1, x) }
3186
+ w.raw(@unknown_fields)
3187
+ w.to_bytes
3188
+ end
3189
+
3190
+ def unmarshal_dc(data)
3191
+ @unknown_fields = "".b
3192
+ @group_ids = []
3193
+ r = Reader.new(data)
3194
+ loop do
3195
+ item = r.field
3196
+ break if item.nil?
3197
+
3198
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3199
+ case num
3200
+ when 1
3201
+ @group_ids << bytes_value.dup.force_encoding(Encoding::UTF_8)
3202
+ else
3203
+ @unknown_fields = @unknown_fields + raw_value
3204
+ end
3205
+ end
3206
+ self
3207
+ end
3208
+
3209
+ def ==(other)
3210
+ other.is_a?(DeleteGroupsRequest) && @group_ids == other.group_ids
3211
+ end
3212
+ end
3213
+
3214
+ class GroupErrorResult
3215
+ attr_accessor :group_id, :error_code, :unknown_fields
3216
+
3217
+ def initialize(group_id: "", error_code: 0)
3218
+ @group_id = group_id
3219
+ @error_code = error_code
3220
+ @unknown_fields = "".b
3221
+ end
3222
+
3223
+ def marshal_dc
3224
+ w = Writer.new
3225
+ w.string_field(1, @group_id)
3226
+ if @error_code != 0
3227
+ w.tag(2, 0)
3228
+ w.varint(@error_code)
3229
+ end
3230
+ w.raw(@unknown_fields)
3231
+ w.to_bytes
3232
+ end
3233
+
3234
+ def unmarshal_dc(data)
3235
+ @unknown_fields = "".b
3236
+ @group_id = ""
3237
+ @error_code = 0
3238
+ r = Reader.new(data)
3239
+ loop do
3240
+ item = r.field
3241
+ break if item.nil?
3242
+
3243
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3244
+ case num
3245
+ when 1
3246
+ @group_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3247
+ when 2
3248
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3249
+ else
3250
+ @unknown_fields = @unknown_fields + raw_value
3251
+ end
3252
+ end
3253
+ self
3254
+ end
3255
+
3256
+ def ==(other)
3257
+ other.is_a?(GroupErrorResult) && @group_id == other.group_id && @error_code == other.error_code
3258
+ end
3259
+ end
3260
+
3261
+ class DeleteGroupsResponse
3262
+ attr_accessor :results, :unknown_fields
3263
+
3264
+ def initialize(results: [])
3265
+ @results = results
3266
+ @unknown_fields = "".b
3267
+ end
3268
+
3269
+ def marshal_dc
3270
+ w = Writer.new
3271
+ @results.each { |x| w.bytes_field(1, x.marshal_dc) }
3272
+ w.raw(@unknown_fields)
3273
+ w.to_bytes
3274
+ end
3275
+
3276
+ def unmarshal_dc(data)
3277
+ @unknown_fields = "".b
3278
+ @results = []
3279
+ r = Reader.new(data)
3280
+ loop do
3281
+ item = r.field
3282
+ break if item.nil?
3283
+
3284
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3285
+ case num
3286
+ when 1
3287
+ item = GroupErrorResult.new
3288
+ item.unmarshal_dc(bytes_value)
3289
+ @results << item
3290
+ else
3291
+ @unknown_fields = @unknown_fields + raw_value
3292
+ end
3293
+ end
3294
+ self
3295
+ end
3296
+
3297
+ def ==(other)
3298
+ other.is_a?(DeleteGroupsResponse) && @results == other.results
3299
+ end
3300
+ end
3301
+
3302
+ class DeleteGroupOffsetsRequest
3303
+ attr_accessor :group_id, :topic, :partitions, :unknown_fields
3304
+
3305
+ def initialize(group_id: "", topic: "", partitions: [])
3306
+ @group_id = group_id
3307
+ @topic = topic
3308
+ @partitions = partitions
3309
+ @unknown_fields = "".b
3310
+ end
3311
+
3312
+ def marshal_dc
3313
+ w = Writer.new
3314
+ w.string_field(1, @group_id)
3315
+ w.string_field(2, @topic)
3316
+ unless @partitions.empty?
3317
+ payload = +"".b
3318
+ @partitions.each { |x| payload << KafkaPbVarint.call(x) }
3319
+ w.bytes_field(3, payload)
3320
+ end
3321
+ w.raw(@unknown_fields)
3322
+ w.to_bytes
3323
+ end
3324
+
3325
+ def unmarshal_dc(data)
3326
+ @unknown_fields = "".b
3327
+ @group_id = ""
3328
+ @topic = ""
3329
+ @partitions = []
3330
+ r = Reader.new(data)
3331
+ loop do
3332
+ item = r.field
3333
+ break if item.nil?
3334
+
3335
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3336
+ case num
3337
+ when 1
3338
+ @group_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3339
+ when 2
3340
+ @topic = bytes_value.dup.force_encoding(Encoding::UTF_8)
3341
+ when 3
3342
+ if wire == 2
3343
+ sub = Reader.new(bytes_value)
3344
+ until sub.done?
3345
+ raw = sub.varint
3346
+ @partitions << (((raw & 0xffffffff) ^ 0x80000000) - 0x80000000)
3347
+ end
3348
+ else
3349
+ @partitions << (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3350
+ end
3351
+ else
3352
+ @unknown_fields = @unknown_fields + raw_value
3353
+ end
3354
+ end
3355
+ self
3356
+ end
3357
+
3358
+ def ==(other)
3359
+ other.is_a?(DeleteGroupOffsetsRequest) && @group_id == other.group_id && @topic == other.topic && @partitions == other.partitions
3360
+ end
3361
+ end
3362
+
3363
+ class DeleteGroupOffsetsResponse
3364
+ attr_accessor :error_code, :unknown_fields
3365
+
3366
+ def initialize(error_code: 0)
3367
+ @error_code = error_code
3368
+ @unknown_fields = "".b
3369
+ end
3370
+
3371
+ def marshal_dc
3372
+ w = Writer.new
3373
+ if @error_code != 0
3374
+ w.tag(1, 0)
3375
+ w.varint(@error_code)
3376
+ end
3377
+ w.raw(@unknown_fields)
3378
+ w.to_bytes
3379
+ end
3380
+
3381
+ def unmarshal_dc(data)
3382
+ @unknown_fields = "".b
3383
+ @error_code = 0
3384
+ r = Reader.new(data)
3385
+ loop do
3386
+ item = r.field
3387
+ break if item.nil?
3388
+
3389
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3390
+ case num
3391
+ when 1
3392
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3393
+ else
3394
+ @unknown_fields = @unknown_fields + raw_value
3395
+ end
3396
+ end
3397
+ self
3398
+ end
3399
+
3400
+ def ==(other)
3401
+ other.is_a?(DeleteGroupOffsetsResponse) && @error_code == other.error_code
3402
+ end
3403
+ end
3404
+
3405
+ class Acl
3406
+ attr_accessor :resource_type, :resource_name, :pattern_type, :principal, :host, :operation, :permission_type, :unknown_fields
3407
+
3408
+ def initialize(resource_type: 0, resource_name: "", pattern_type: 0, principal: "", host: "", operation: 0, permission_type: 0)
3409
+ @resource_type = resource_type
3410
+ @resource_name = resource_name
3411
+ @pattern_type = pattern_type
3412
+ @principal = principal
3413
+ @host = host
3414
+ @operation = operation
3415
+ @permission_type = permission_type
3416
+ @unknown_fields = "".b
3417
+ end
3418
+
3419
+ def marshal_dc
3420
+ w = Writer.new
3421
+ if @resource_type != 0
3422
+ w.tag(1, 0)
3423
+ w.varint(@resource_type)
3424
+ end
3425
+ w.string_field(2, @resource_name)
3426
+ if @pattern_type != 0
3427
+ w.tag(3, 0)
3428
+ w.varint(@pattern_type)
3429
+ end
3430
+ w.string_field(4, @principal)
3431
+ w.string_field(5, @host)
3432
+ if @operation != 0
3433
+ w.tag(6, 0)
3434
+ w.varint(@operation)
3435
+ end
3436
+ if @permission_type != 0
3437
+ w.tag(7, 0)
3438
+ w.varint(@permission_type)
3439
+ end
3440
+ w.raw(@unknown_fields)
3441
+ w.to_bytes
3442
+ end
3443
+
3444
+ def unmarshal_dc(data)
3445
+ @unknown_fields = "".b
3446
+ @resource_type = 0
3447
+ @resource_name = ""
3448
+ @pattern_type = 0
3449
+ @principal = ""
3450
+ @host = ""
3451
+ @operation = 0
3452
+ @permission_type = 0
3453
+ r = Reader.new(data)
3454
+ loop do
3455
+ item = r.field
3456
+ break if item.nil?
3457
+
3458
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3459
+ case num
3460
+ when 1
3461
+ @resource_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3462
+ when 2
3463
+ @resource_name = bytes_value.dup.force_encoding(Encoding::UTF_8)
3464
+ when 3
3465
+ @pattern_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3466
+ when 4
3467
+ @principal = bytes_value.dup.force_encoding(Encoding::UTF_8)
3468
+ when 5
3469
+ @host = bytes_value.dup.force_encoding(Encoding::UTF_8)
3470
+ when 6
3471
+ @operation = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3472
+ when 7
3473
+ @permission_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3474
+ else
3475
+ @unknown_fields = @unknown_fields + raw_value
3476
+ end
3477
+ end
3478
+ self
3479
+ end
3480
+
3481
+ def ==(other)
3482
+ other.is_a?(Acl) && @resource_type == other.resource_type && @resource_name == other.resource_name && @pattern_type == other.pattern_type && @principal == other.principal && @host == other.host && @operation == other.operation && @permission_type == other.permission_type
3483
+ end
3484
+ end
3485
+
3486
+ class DescribeAclsRequest
3487
+ attr_accessor :filter, :unknown_fields
3488
+
3489
+ def initialize(filter: nil)
3490
+ @filter = filter
3491
+ @unknown_fields = "".b
3492
+ end
3493
+
3494
+ def marshal_dc
3495
+ w = Writer.new
3496
+ unless @filter.nil?
3497
+ w.bytes_field(1, @filter.marshal_dc)
3498
+ end
3499
+ w.raw(@unknown_fields)
3500
+ w.to_bytes
3501
+ end
3502
+
3503
+ def unmarshal_dc(data)
3504
+ @unknown_fields = "".b
3505
+ @filter = nil
3506
+ r = Reader.new(data)
3507
+ loop do
3508
+ item = r.field
3509
+ break if item.nil?
3510
+
3511
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3512
+ case num
3513
+ when 1
3514
+ @filter = Acl.new
3515
+ @filter.unmarshal_dc(bytes_value)
3516
+ else
3517
+ @unknown_fields = @unknown_fields + raw_value
3518
+ end
3519
+ end
3520
+ self
3521
+ end
3522
+
3523
+ def ==(other)
3524
+ other.is_a?(DescribeAclsRequest) && @filter == other.filter
3525
+ end
3526
+ end
3527
+
3528
+ class DescribeAclsResponse
3529
+ attr_accessor :error_code, :acls, :unknown_fields
3530
+
3531
+ def initialize(error_code: 0, acls: [])
3532
+ @error_code = error_code
3533
+ @acls = acls
3534
+ @unknown_fields = "".b
3535
+ end
3536
+
3537
+ def marshal_dc
3538
+ w = Writer.new
3539
+ if @error_code != 0
3540
+ w.tag(1, 0)
3541
+ w.varint(@error_code)
3542
+ end
3543
+ @acls.each { |x| w.bytes_field(2, x.marshal_dc) }
3544
+ w.raw(@unknown_fields)
3545
+ w.to_bytes
3546
+ end
3547
+
3548
+ def unmarshal_dc(data)
3549
+ @unknown_fields = "".b
3550
+ @error_code = 0
3551
+ @acls = []
3552
+ r = Reader.new(data)
3553
+ loop do
3554
+ item = r.field
3555
+ break if item.nil?
3556
+
3557
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3558
+ case num
3559
+ when 1
3560
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3561
+ when 2
3562
+ item = Acl.new
3563
+ item.unmarshal_dc(bytes_value)
3564
+ @acls << item
3565
+ else
3566
+ @unknown_fields = @unknown_fields + raw_value
3567
+ end
3568
+ end
3569
+ self
3570
+ end
3571
+
3572
+ def ==(other)
3573
+ other.is_a?(DescribeAclsResponse) && @error_code == other.error_code && @acls == other.acls
3574
+ end
3575
+ end
3576
+
3577
+ class CreateAclsRequest
3578
+ attr_accessor :acls, :unknown_fields
3579
+
3580
+ def initialize(acls: [])
3581
+ @acls = acls
3582
+ @unknown_fields = "".b
3583
+ end
3584
+
3585
+ def marshal_dc
3586
+ w = Writer.new
3587
+ @acls.each { |x| w.bytes_field(1, x.marshal_dc) }
3588
+ w.raw(@unknown_fields)
3589
+ w.to_bytes
3590
+ end
3591
+
3592
+ def unmarshal_dc(data)
3593
+ @unknown_fields = "".b
3594
+ @acls = []
3595
+ r = Reader.new(data)
3596
+ loop do
3597
+ item = r.field
3598
+ break if item.nil?
3599
+
3600
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3601
+ case num
3602
+ when 1
3603
+ item = Acl.new
3604
+ item.unmarshal_dc(bytes_value)
3605
+ @acls << item
3606
+ else
3607
+ @unknown_fields = @unknown_fields + raw_value
3608
+ end
3609
+ end
3610
+ self
3611
+ end
3612
+
3613
+ def ==(other)
3614
+ other.is_a?(CreateAclsRequest) && @acls == other.acls
3615
+ end
3616
+ end
3617
+
3618
+ class CreateAclsResponse
3619
+ attr_accessor :error_codes, :unknown_fields
3620
+
3621
+ def initialize(error_codes: [])
3622
+ @error_codes = error_codes
3623
+ @unknown_fields = "".b
3624
+ end
3625
+
3626
+ def marshal_dc
3627
+ w = Writer.new
3628
+ unless @error_codes.empty?
3629
+ payload = +"".b
3630
+ @error_codes.each { |x| payload << KafkaPbVarint.call(x) }
3631
+ w.bytes_field(1, payload)
3632
+ end
3633
+ w.raw(@unknown_fields)
3634
+ w.to_bytes
3635
+ end
3636
+
3637
+ def unmarshal_dc(data)
3638
+ @unknown_fields = "".b
3639
+ @error_codes = []
3640
+ r = Reader.new(data)
3641
+ loop do
3642
+ item = r.field
3643
+ break if item.nil?
3644
+
3645
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3646
+ case num
3647
+ when 1
3648
+ if wire == 2
3649
+ sub = Reader.new(bytes_value)
3650
+ until sub.done?
3651
+ raw = sub.varint
3652
+ @error_codes << (((raw & 0xffffffff) ^ 0x80000000) - 0x80000000)
3653
+ end
3654
+ else
3655
+ @error_codes << (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3656
+ end
3657
+ else
3658
+ @unknown_fields = @unknown_fields + raw_value
3659
+ end
3660
+ end
3661
+ self
3662
+ end
3663
+
3664
+ def ==(other)
3665
+ other.is_a?(CreateAclsResponse) && @error_codes == other.error_codes
3666
+ end
3667
+ end
3668
+
3669
+ class DeleteAclsRequest
3670
+ attr_accessor :filters, :unknown_fields
3671
+
3672
+ def initialize(filters: [])
3673
+ @filters = filters
3674
+ @unknown_fields = "".b
3675
+ end
3676
+
3677
+ def marshal_dc
3678
+ w = Writer.new
3679
+ @filters.each { |x| w.bytes_field(1, x.marshal_dc) }
3680
+ w.raw(@unknown_fields)
3681
+ w.to_bytes
3682
+ end
3683
+
3684
+ def unmarshal_dc(data)
3685
+ @unknown_fields = "".b
3686
+ @filters = []
3687
+ r = Reader.new(data)
3688
+ loop do
3689
+ item = r.field
3690
+ break if item.nil?
3691
+
3692
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3693
+ case num
3694
+ when 1
3695
+ item = Acl.new
3696
+ item.unmarshal_dc(bytes_value)
3697
+ @filters << item
3698
+ else
3699
+ @unknown_fields = @unknown_fields + raw_value
3700
+ end
3701
+ end
3702
+ self
3703
+ end
3704
+
3705
+ def ==(other)
3706
+ other.is_a?(DeleteAclsRequest) && @filters == other.filters
3707
+ end
3708
+ end
3709
+
3710
+ class DeleteAclsResponse
3711
+ attr_accessor :error_codes, :unknown_fields
3712
+
3713
+ def initialize(error_codes: [])
3714
+ @error_codes = error_codes
3715
+ @unknown_fields = "".b
3716
+ end
3717
+
3718
+ def marshal_dc
3719
+ w = Writer.new
3720
+ unless @error_codes.empty?
3721
+ payload = +"".b
3722
+ @error_codes.each { |x| payload << KafkaPbVarint.call(x) }
3723
+ w.bytes_field(1, payload)
3724
+ end
3725
+ w.raw(@unknown_fields)
3726
+ w.to_bytes
3727
+ end
3728
+
3729
+ def unmarshal_dc(data)
3730
+ @unknown_fields = "".b
3731
+ @error_codes = []
3732
+ r = Reader.new(data)
3733
+ loop do
3734
+ item = r.field
3735
+ break if item.nil?
3736
+
3737
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3738
+ case num
3739
+ when 1
3740
+ if wire == 2
3741
+ sub = Reader.new(bytes_value)
3742
+ until sub.done?
3743
+ raw = sub.varint
3744
+ @error_codes << (((raw & 0xffffffff) ^ 0x80000000) - 0x80000000)
3745
+ end
3746
+ else
3747
+ @error_codes << (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3748
+ end
3749
+ else
3750
+ @unknown_fields = @unknown_fields + raw_value
3751
+ end
3752
+ end
3753
+ self
3754
+ end
3755
+
3756
+ def ==(other)
3757
+ other.is_a?(DeleteAclsResponse) && @error_codes == other.error_codes
3758
+ end
3759
+ end
3760
+
3761
+ class ListTransactionsRequest
3762
+ def initialize()
3763
+ @unknown_fields = "".b
3764
+ end
3765
+
3766
+ def marshal_dc
3767
+ w = Writer.new
3768
+ w.raw(@unknown_fields)
3769
+ w.to_bytes
3770
+ end
3771
+
3772
+ def unmarshal_dc(data)
3773
+ @unknown_fields = "".b
3774
+ r = Reader.new(data)
3775
+ loop do
3776
+ item = r.field
3777
+ break if item.nil?
3778
+
3779
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3780
+ @unknown_fields = @unknown_fields + raw_value
3781
+ end
3782
+ self
3783
+ end
3784
+
3785
+ def ==(other)
3786
+ other.is_a?(ListTransactionsRequest) && true
3787
+ end
3788
+ end
3789
+
3790
+ class TransactionListing
3791
+ attr_accessor :transactional_id, :producer_id, :transaction_state, :unknown_fields
3792
+
3793
+ def initialize(transactional_id: "", producer_id: 0, transaction_state: "")
3794
+ @transactional_id = transactional_id
3795
+ @producer_id = producer_id
3796
+ @transaction_state = transaction_state
3797
+ @unknown_fields = "".b
3798
+ end
3799
+
3800
+ def marshal_dc
3801
+ w = Writer.new
3802
+ w.string_field(1, @transactional_id)
3803
+ if @producer_id != 0
3804
+ w.tag(2, 0)
3805
+ w.varint(@producer_id)
3806
+ end
3807
+ w.string_field(3, @transaction_state)
3808
+ w.raw(@unknown_fields)
3809
+ w.to_bytes
3810
+ end
3811
+
3812
+ def unmarshal_dc(data)
3813
+ @unknown_fields = "".b
3814
+ @transactional_id = ""
3815
+ @producer_id = 0
3816
+ @transaction_state = ""
3817
+ r = Reader.new(data)
3818
+ loop do
3819
+ item = r.field
3820
+ break if item.nil?
3821
+
3822
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3823
+ case num
3824
+ when 1
3825
+ @transactional_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3826
+ when 2
3827
+ @producer_id = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
3828
+ when 3
3829
+ @transaction_state = bytes_value.dup.force_encoding(Encoding::UTF_8)
3830
+ else
3831
+ @unknown_fields = @unknown_fields + raw_value
3832
+ end
3833
+ end
3834
+ self
3835
+ end
3836
+
3837
+ def ==(other)
3838
+ other.is_a?(TransactionListing) && @transactional_id == other.transactional_id && @producer_id == other.producer_id && @transaction_state == other.transaction_state
3839
+ end
3840
+ end
3841
+
3842
+ class ListTransactionsResponse
3843
+ attr_accessor :error_code, :transactions, :unknown_fields
3844
+
3845
+ def initialize(error_code: 0, transactions: [])
3846
+ @error_code = error_code
3847
+ @transactions = transactions
3848
+ @unknown_fields = "".b
3849
+ end
3850
+
3851
+ def marshal_dc
3852
+ w = Writer.new
3853
+ if @error_code != 0
3854
+ w.tag(1, 0)
3855
+ w.varint(@error_code)
3856
+ end
3857
+ @transactions.each { |x| w.bytes_field(2, x.marshal_dc) }
3858
+ w.raw(@unknown_fields)
3859
+ w.to_bytes
3860
+ end
3861
+
3862
+ def unmarshal_dc(data)
3863
+ @unknown_fields = "".b
3864
+ @error_code = 0
3865
+ @transactions = []
3866
+ r = Reader.new(data)
3867
+ loop do
3868
+ item = r.field
3869
+ break if item.nil?
3870
+
3871
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3872
+ case num
3873
+ when 1
3874
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3875
+ when 2
3876
+ item = TransactionListing.new
3877
+ item.unmarshal_dc(bytes_value)
3878
+ @transactions << item
3879
+ else
3880
+ @unknown_fields = @unknown_fields + raw_value
3881
+ end
3882
+ end
3883
+ self
3884
+ end
3885
+
3886
+ def ==(other)
3887
+ other.is_a?(ListTransactionsResponse) && @error_code == other.error_code && @transactions == other.transactions
3888
+ end
3889
+ end
3890
+
3891
+ class DescribeTransactionsRequest
3892
+ attr_accessor :transactional_ids, :unknown_fields
3893
+
3894
+ def initialize(transactional_ids: [])
3895
+ @transactional_ids = transactional_ids
3896
+ @unknown_fields = "".b
3897
+ end
3898
+
3899
+ def marshal_dc
3900
+ w = Writer.new
3901
+ @transactional_ids.each { |x| w.bytes_field(1, x) }
3902
+ w.raw(@unknown_fields)
3903
+ w.to_bytes
3904
+ end
3905
+
3906
+ def unmarshal_dc(data)
3907
+ @unknown_fields = "".b
3908
+ @transactional_ids = []
3909
+ r = Reader.new(data)
3910
+ loop do
3911
+ item = r.field
3912
+ break if item.nil?
3913
+
3914
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3915
+ case num
3916
+ when 1
3917
+ @transactional_ids << bytes_value.dup.force_encoding(Encoding::UTF_8)
3918
+ else
3919
+ @unknown_fields = @unknown_fields + raw_value
3920
+ end
3921
+ end
3922
+ self
3923
+ end
3924
+
3925
+ def ==(other)
3926
+ other.is_a?(DescribeTransactionsRequest) && @transactional_ids == other.transactional_ids
3927
+ end
3928
+ end
3929
+
3930
+ class DescribedTransaction
3931
+ attr_accessor :transactional_id, :error_code, :producer_id, :producer_epoch, :transaction_state, :last_update_timestamp_ms, :unknown_fields
3932
+
3933
+ def initialize(transactional_id: "", error_code: 0, producer_id: 0, producer_epoch: 0, transaction_state: "", last_update_timestamp_ms: 0)
3934
+ @transactional_id = transactional_id
3935
+ @error_code = error_code
3936
+ @producer_id = producer_id
3937
+ @producer_epoch = producer_epoch
3938
+ @transaction_state = transaction_state
3939
+ @last_update_timestamp_ms = last_update_timestamp_ms
3940
+ @unknown_fields = "".b
3941
+ end
3942
+
3943
+ def marshal_dc
3944
+ w = Writer.new
3945
+ w.string_field(1, @transactional_id)
3946
+ if @error_code != 0
3947
+ w.tag(2, 0)
3948
+ w.varint(@error_code)
3949
+ end
3950
+ if @producer_id != 0
3951
+ w.tag(3, 0)
3952
+ w.varint(@producer_id)
3953
+ end
3954
+ if @producer_epoch != 0
3955
+ w.tag(4, 0)
3956
+ w.varint(@producer_epoch)
3957
+ end
3958
+ w.string_field(5, @transaction_state)
3959
+ if @last_update_timestamp_ms != 0
3960
+ w.tag(6, 0)
3961
+ w.varint(@last_update_timestamp_ms)
3962
+ end
3963
+ w.raw(@unknown_fields)
3964
+ w.to_bytes
3965
+ end
3966
+
3967
+ def unmarshal_dc(data)
3968
+ @unknown_fields = "".b
3969
+ @transactional_id = ""
3970
+ @error_code = 0
3971
+ @producer_id = 0
3972
+ @producer_epoch = 0
3973
+ @transaction_state = ""
3974
+ @last_update_timestamp_ms = 0
3975
+ r = Reader.new(data)
3976
+ loop do
3977
+ item = r.field
3978
+ break if item.nil?
3979
+
3980
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
3981
+ case num
3982
+ when 1
3983
+ @transactional_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
3984
+ when 2
3985
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3986
+ when 3
3987
+ @producer_id = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
3988
+ when 4
3989
+ @producer_epoch = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
3990
+ when 5
3991
+ @transaction_state = bytes_value.dup.force_encoding(Encoding::UTF_8)
3992
+ when 6
3993
+ @last_update_timestamp_ms = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
3994
+ else
3995
+ @unknown_fields = @unknown_fields + raw_value
3996
+ end
3997
+ end
3998
+ self
3999
+ end
4000
+
4001
+ def ==(other)
4002
+ other.is_a?(DescribedTransaction) && @transactional_id == other.transactional_id && @error_code == other.error_code && @producer_id == other.producer_id && @producer_epoch == other.producer_epoch && @transaction_state == other.transaction_state && @last_update_timestamp_ms == other.last_update_timestamp_ms
4003
+ end
4004
+ end
4005
+
4006
+ class DescribeTransactionsResponse
4007
+ attr_accessor :transactions, :unknown_fields
4008
+
4009
+ def initialize(transactions: [])
4010
+ @transactions = transactions
4011
+ @unknown_fields = "".b
4012
+ end
4013
+
4014
+ def marshal_dc
4015
+ w = Writer.new
4016
+ @transactions.each { |x| w.bytes_field(1, x.marshal_dc) }
4017
+ w.raw(@unknown_fields)
4018
+ w.to_bytes
4019
+ end
4020
+
4021
+ def unmarshal_dc(data)
4022
+ @unknown_fields = "".b
4023
+ @transactions = []
4024
+ r = Reader.new(data)
4025
+ loop do
4026
+ item = r.field
4027
+ break if item.nil?
4028
+
4029
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4030
+ case num
4031
+ when 1
4032
+ item = DescribedTransaction.new
4033
+ item.unmarshal_dc(bytes_value)
4034
+ @transactions << item
4035
+ else
4036
+ @unknown_fields = @unknown_fields + raw_value
4037
+ end
4038
+ end
4039
+ self
4040
+ end
4041
+
4042
+ def ==(other)
4043
+ other.is_a?(DescribeTransactionsResponse) && @transactions == other.transactions
4044
+ end
4045
+ end
4046
+
4047
+ class OpenShareGroupRequest
4048
+ attr_accessor :group_id, :topics, :group_instance_id, :session_timeout_ms, :unknown_fields
4049
+
4050
+ def initialize(group_id: "", topics: [], group_instance_id: "", session_timeout_ms: 0)
4051
+ @group_id = group_id
4052
+ @topics = topics
4053
+ @group_instance_id = group_instance_id
4054
+ @session_timeout_ms = session_timeout_ms
4055
+ @unknown_fields = "".b
4056
+ end
4057
+
4058
+ def marshal_dc
4059
+ w = Writer.new
4060
+ w.string_field(1, @group_id)
4061
+ @topics.each { |x| w.bytes_field(2, x) }
4062
+ w.string_field(3, @group_instance_id)
4063
+ if @session_timeout_ms != 0
4064
+ w.tag(4, 0)
4065
+ w.varint(@session_timeout_ms)
4066
+ end
4067
+ w.raw(@unknown_fields)
4068
+ w.to_bytes
4069
+ end
4070
+
4071
+ def unmarshal_dc(data)
4072
+ @unknown_fields = "".b
4073
+ @group_id = ""
4074
+ @topics = []
4075
+ @group_instance_id = ""
4076
+ @session_timeout_ms = 0
4077
+ r = Reader.new(data)
4078
+ loop do
4079
+ item = r.field
4080
+ break if item.nil?
4081
+
4082
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4083
+ case num
4084
+ when 1
4085
+ @group_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4086
+ when 2
4087
+ @topics << bytes_value.dup.force_encoding(Encoding::UTF_8)
4088
+ when 3
4089
+ @group_instance_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4090
+ when 4
4091
+ @session_timeout_ms = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4092
+ else
4093
+ @unknown_fields = @unknown_fields + raw_value
4094
+ end
4095
+ end
4096
+ self
4097
+ end
4098
+
4099
+ def ==(other)
4100
+ other.is_a?(OpenShareGroupRequest) && @group_id == other.group_id && @topics == other.topics && @group_instance_id == other.group_instance_id && @session_timeout_ms == other.session_timeout_ms
4101
+ end
4102
+ end
4103
+
4104
+ class OpenShareGroupResponse
4105
+ attr_accessor :session_id, :error_code, :assignment, :unknown_fields
4106
+
4107
+ def initialize(session_id: "", error_code: 0, assignment: nil)
4108
+ @session_id = session_id
4109
+ @error_code = error_code
4110
+ @assignment = assignment
4111
+ @unknown_fields = "".b
4112
+ end
4113
+
4114
+ def marshal_dc
4115
+ w = Writer.new
4116
+ w.string_field(1, @session_id)
4117
+ if @error_code != 0
4118
+ w.tag(2, 0)
4119
+ w.varint(@error_code)
4120
+ end
4121
+ unless @assignment.nil?
4122
+ w.bytes_field(3, @assignment.marshal_dc)
4123
+ end
4124
+ w.raw(@unknown_fields)
4125
+ w.to_bytes
4126
+ end
4127
+
4128
+ def unmarshal_dc(data)
4129
+ @unknown_fields = "".b
4130
+ @session_id = ""
4131
+ @error_code = 0
4132
+ @assignment = nil
4133
+ r = Reader.new(data)
4134
+ loop do
4135
+ item = r.field
4136
+ break if item.nil?
4137
+
4138
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4139
+ case num
4140
+ when 1
4141
+ @session_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4142
+ when 2
4143
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4144
+ when 3
4145
+ @assignment = Assignment.new
4146
+ @assignment.unmarshal_dc(bytes_value)
4147
+ else
4148
+ @unknown_fields = @unknown_fields + raw_value
4149
+ end
4150
+ end
4151
+ self
4152
+ end
4153
+
4154
+ def ==(other)
4155
+ other.is_a?(OpenShareGroupResponse) && @session_id == other.session_id && @error_code == other.error_code && @assignment == other.assignment
4156
+ end
4157
+ end
4158
+
4159
+ class SharePollRequest
4160
+ attr_accessor :session_id, :max_records, :max_wait_ms, :unknown_fields
4161
+
4162
+ def initialize(session_id: "", max_records: 0, max_wait_ms: 0)
4163
+ @session_id = session_id
4164
+ @max_records = max_records
4165
+ @max_wait_ms = max_wait_ms
4166
+ @unknown_fields = "".b
4167
+ end
4168
+
4169
+ def marshal_dc
4170
+ w = Writer.new
4171
+ w.string_field(1, @session_id)
4172
+ if @max_records != 0
4173
+ w.tag(2, 0)
4174
+ w.varint(@max_records)
4175
+ end
4176
+ if @max_wait_ms != 0
4177
+ w.tag(3, 0)
4178
+ w.varint(@max_wait_ms)
4179
+ end
4180
+ w.raw(@unknown_fields)
4181
+ w.to_bytes
4182
+ end
4183
+
4184
+ def unmarshal_dc(data)
4185
+ @unknown_fields = "".b
4186
+ @session_id = ""
4187
+ @max_records = 0
4188
+ @max_wait_ms = 0
4189
+ r = Reader.new(data)
4190
+ loop do
4191
+ item = r.field
4192
+ break if item.nil?
4193
+
4194
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4195
+ case num
4196
+ when 1
4197
+ @session_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4198
+ when 2
4199
+ @max_records = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4200
+ when 3
4201
+ @max_wait_ms = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4202
+ else
4203
+ @unknown_fields = @unknown_fields + raw_value
4204
+ end
4205
+ end
4206
+ self
4207
+ end
4208
+
4209
+ def ==(other)
4210
+ other.is_a?(SharePollRequest) && @session_id == other.session_id && @max_records == other.max_records && @max_wait_ms == other.max_wait_ms
4211
+ end
4212
+ end
4213
+
4214
+ class SharePollRecord
4215
+ attr_accessor :topic, :partition, :offset, :key, :value, :headers, :timestamp_ms, :delivery_count, :null_key, :unknown_fields
4216
+
4217
+ def initialize(topic: "", partition: 0, offset: 0, key: "".b, value: "".b, headers: [], timestamp_ms: 0, delivery_count: 0, null_key: false)
4218
+ @topic = topic
4219
+ @partition = partition
4220
+ @offset = offset
4221
+ @key = key
4222
+ @value = value
4223
+ @headers = headers
4224
+ @timestamp_ms = timestamp_ms
4225
+ @delivery_count = delivery_count
4226
+ @null_key = null_key
4227
+ @unknown_fields = "".b
4228
+ end
4229
+
4230
+ def marshal_dc
4231
+ w = Writer.new
4232
+ w.string_field(1, @topic)
4233
+ if @partition != 0
4234
+ w.tag(2, 0)
4235
+ w.varint(@partition)
4236
+ end
4237
+ if @offset != 0
4238
+ w.tag(3, 0)
4239
+ w.varint(@offset)
4240
+ end
4241
+ if @key.bytesize > 0
4242
+ w.bytes_field(4, @key)
4243
+ end
4244
+ if @value.bytesize > 0
4245
+ w.bytes_field(5, @value)
4246
+ end
4247
+ @headers.each { |x| w.bytes_field(6, x.marshal_dc) }
4248
+ if @timestamp_ms != 0
4249
+ w.tag(7, 0)
4250
+ w.varint(@timestamp_ms)
4251
+ end
4252
+ if @delivery_count != 0
4253
+ w.tag(8, 0)
4254
+ w.varint(@delivery_count)
4255
+ end
4256
+ if @null_key
4257
+ w.tag(9, 0)
4258
+ w.varint((@null_key ? 1 : 0))
4259
+ end
4260
+ w.raw(@unknown_fields)
4261
+ w.to_bytes
4262
+ end
4263
+
4264
+ def unmarshal_dc(data)
4265
+ @unknown_fields = "".b
4266
+ @topic = ""
4267
+ @partition = 0
4268
+ @offset = 0
4269
+ @key = "".b
4270
+ @value = "".b
4271
+ @headers = []
4272
+ @timestamp_ms = 0
4273
+ @delivery_count = 0
4274
+ @null_key = false
4275
+ r = Reader.new(data)
4276
+ loop do
4277
+ item = r.field
4278
+ break if item.nil?
4279
+
4280
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4281
+ case num
4282
+ when 1
4283
+ @topic = bytes_value.dup.force_encoding(Encoding::UTF_8)
4284
+ when 2
4285
+ @partition = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4286
+ when 3
4287
+ @offset = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
4288
+ when 4
4289
+ @key = bytes_value
4290
+ when 5
4291
+ @value = bytes_value
4292
+ when 6
4293
+ item = Header.new
4294
+ item.unmarshal_dc(bytes_value)
4295
+ @headers << item
4296
+ when 7
4297
+ @timestamp_ms = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
4298
+ when 8
4299
+ @delivery_count = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4300
+ when 9
4301
+ @null_key = (varint_value != 0)
4302
+ else
4303
+ @unknown_fields = @unknown_fields + raw_value
4304
+ end
4305
+ end
4306
+ self
4307
+ end
4308
+
4309
+ def ==(other)
4310
+ other.is_a?(SharePollRecord) && @topic == other.topic && @partition == other.partition && @offset == other.offset && @key == other.key && @value == other.value && @headers == other.headers && @timestamp_ms == other.timestamp_ms && @delivery_count == other.delivery_count && @null_key == other.null_key
4311
+ end
4312
+ end
4313
+
4314
+ class SharePollResponse
4315
+ attr_accessor :records, :error_code, :unknown_fields
4316
+
4317
+ def initialize(records: [], error_code: 0)
4318
+ @records = records
4319
+ @error_code = error_code
4320
+ @unknown_fields = "".b
4321
+ end
4322
+
4323
+ def marshal_dc
4324
+ w = Writer.new
4325
+ @records.each { |x| w.bytes_field(1, x.marshal_dc) }
4326
+ if @error_code != 0
4327
+ w.tag(2, 0)
4328
+ w.varint(@error_code)
4329
+ end
4330
+ w.raw(@unknown_fields)
4331
+ w.to_bytes
4332
+ end
4333
+
4334
+ def unmarshal_dc(data)
4335
+ @unknown_fields = "".b
4336
+ @records = []
4337
+ @error_code = 0
4338
+ r = Reader.new(data)
4339
+ loop do
4340
+ item = r.field
4341
+ break if item.nil?
4342
+
4343
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4344
+ case num
4345
+ when 1
4346
+ item = SharePollRecord.new
4347
+ item.unmarshal_dc(bytes_value)
4348
+ @records << item
4349
+ when 2
4350
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4351
+ else
4352
+ @unknown_fields = @unknown_fields + raw_value
4353
+ end
4354
+ end
4355
+ self
4356
+ end
4357
+
4358
+ def ==(other)
4359
+ other.is_a?(SharePollResponse) && @records == other.records && @error_code == other.error_code
4360
+ end
4361
+ end
4362
+
4363
+ class ShareAckEntry
4364
+ attr_accessor :topic, :partition, :offset, :ack_type, :unknown_fields
4365
+
4366
+ def initialize(topic: "", partition: 0, offset: 0, ack_type: 0)
4367
+ @topic = topic
4368
+ @partition = partition
4369
+ @offset = offset
4370
+ @ack_type = ack_type
4371
+ @unknown_fields = "".b
4372
+ end
4373
+
4374
+ def marshal_dc
4375
+ w = Writer.new
4376
+ w.string_field(1, @topic)
4377
+ if @partition != 0
4378
+ w.tag(2, 0)
4379
+ w.varint(@partition)
4380
+ end
4381
+ if @offset != 0
4382
+ w.tag(3, 0)
4383
+ w.varint(@offset)
4384
+ end
4385
+ if @ack_type != 0
4386
+ w.tag(4, 0)
4387
+ w.varint(@ack_type)
4388
+ end
4389
+ w.raw(@unknown_fields)
4390
+ w.to_bytes
4391
+ end
4392
+
4393
+ def unmarshal_dc(data)
4394
+ @unknown_fields = "".b
4395
+ @topic = ""
4396
+ @partition = 0
4397
+ @offset = 0
4398
+ @ack_type = 0
4399
+ r = Reader.new(data)
4400
+ loop do
4401
+ item = r.field
4402
+ break if item.nil?
4403
+
4404
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4405
+ case num
4406
+ when 1
4407
+ @topic = bytes_value.dup.force_encoding(Encoding::UTF_8)
4408
+ when 2
4409
+ @partition = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4410
+ when 3
4411
+ @offset = (((varint_value & 0xffffffffffffffff) ^ 0x8000000000000000) - 0x8000000000000000)
4412
+ when 4
4413
+ @ack_type = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4414
+ else
4415
+ @unknown_fields = @unknown_fields + raw_value
4416
+ end
4417
+ end
4418
+ self
4419
+ end
4420
+
4421
+ def ==(other)
4422
+ other.is_a?(ShareAckEntry) && @topic == other.topic && @partition == other.partition && @offset == other.offset && @ack_type == other.ack_type
4423
+ end
4424
+ end
4425
+
4426
+ class ShareAckRequest
4427
+ attr_accessor :session_id, :entries, :unknown_fields
4428
+
4429
+ def initialize(session_id: "", entries: [])
4430
+ @session_id = session_id
4431
+ @entries = entries
4432
+ @unknown_fields = "".b
4433
+ end
4434
+
4435
+ def marshal_dc
4436
+ w = Writer.new
4437
+ w.string_field(1, @session_id)
4438
+ @entries.each { |x| w.bytes_field(2, x.marshal_dc) }
4439
+ w.raw(@unknown_fields)
4440
+ w.to_bytes
4441
+ end
4442
+
4443
+ def unmarshal_dc(data)
4444
+ @unknown_fields = "".b
4445
+ @session_id = ""
4446
+ @entries = []
4447
+ r = Reader.new(data)
4448
+ loop do
4449
+ item = r.field
4450
+ break if item.nil?
4451
+
4452
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4453
+ case num
4454
+ when 1
4455
+ @session_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4456
+ when 2
4457
+ item = ShareAckEntry.new
4458
+ item.unmarshal_dc(bytes_value)
4459
+ @entries << item
4460
+ else
4461
+ @unknown_fields = @unknown_fields + raw_value
4462
+ end
4463
+ end
4464
+ self
4465
+ end
4466
+
4467
+ def ==(other)
4468
+ other.is_a?(ShareAckRequest) && @session_id == other.session_id && @entries == other.entries
4469
+ end
4470
+ end
4471
+
4472
+ class ShareAckResponse
4473
+ attr_accessor :error_code, :unknown_fields
4474
+
4475
+ def initialize(error_code: 0)
4476
+ @error_code = error_code
4477
+ @unknown_fields = "".b
4478
+ end
4479
+
4480
+ def marshal_dc
4481
+ w = Writer.new
4482
+ if @error_code != 0
4483
+ w.tag(1, 0)
4484
+ w.varint(@error_code)
4485
+ end
4486
+ w.raw(@unknown_fields)
4487
+ w.to_bytes
4488
+ end
4489
+
4490
+ def unmarshal_dc(data)
4491
+ @unknown_fields = "".b
4492
+ @error_code = 0
4493
+ r = Reader.new(data)
4494
+ loop do
4495
+ item = r.field
4496
+ break if item.nil?
4497
+
4498
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4499
+ case num
4500
+ when 1
4501
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4502
+ else
4503
+ @unknown_fields = @unknown_fields + raw_value
4504
+ end
4505
+ end
4506
+ self
4507
+ end
4508
+
4509
+ def ==(other)
4510
+ other.is_a?(ShareAckResponse) && @error_code == other.error_code
4511
+ end
4512
+ end
4513
+
4514
+ class CloseShareGroupRequest
4515
+ attr_accessor :session_id, :unknown_fields
4516
+
4517
+ def initialize(session_id: "")
4518
+ @session_id = session_id
4519
+ @unknown_fields = "".b
4520
+ end
4521
+
4522
+ def marshal_dc
4523
+ w = Writer.new
4524
+ w.string_field(1, @session_id)
4525
+ w.raw(@unknown_fields)
4526
+ w.to_bytes
4527
+ end
4528
+
4529
+ def unmarshal_dc(data)
4530
+ @unknown_fields = "".b
4531
+ @session_id = ""
4532
+ r = Reader.new(data)
4533
+ loop do
4534
+ item = r.field
4535
+ break if item.nil?
4536
+
4537
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4538
+ case num
4539
+ when 1
4540
+ @session_id = bytes_value.dup.force_encoding(Encoding::UTF_8)
4541
+ else
4542
+ @unknown_fields = @unknown_fields + raw_value
4543
+ end
4544
+ end
4545
+ self
4546
+ end
4547
+
4548
+ def ==(other)
4549
+ other.is_a?(CloseShareGroupRequest) && @session_id == other.session_id
4550
+ end
4551
+ end
4552
+
4553
+ class CloseShareGroupResponse
4554
+ attr_accessor :error_code, :unknown_fields
4555
+
4556
+ def initialize(error_code: 0)
4557
+ @error_code = error_code
4558
+ @unknown_fields = "".b
4559
+ end
4560
+
4561
+ def marshal_dc
4562
+ w = Writer.new
4563
+ if @error_code != 0
4564
+ w.tag(1, 0)
4565
+ w.varint(@error_code)
4566
+ end
4567
+ w.raw(@unknown_fields)
4568
+ w.to_bytes
4569
+ end
4570
+
4571
+ def unmarshal_dc(data)
4572
+ @unknown_fields = "".b
4573
+ @error_code = 0
4574
+ r = Reader.new(data)
4575
+ loop do
4576
+ item = r.field
4577
+ break if item.nil?
4578
+
4579
+ num, wire, varint_value, bytes_value, fixed_value, raw_value = item
4580
+ case num
4581
+ when 1
4582
+ @error_code = (((varint_value & 0xffffffff) ^ 0x80000000) - 0x80000000)
4583
+ else
4584
+ @unknown_fields = @unknown_fields + raw_value
4585
+ end
4586
+ end
4587
+ self
4588
+ end
4589
+
4590
+ def ==(other)
4591
+ other.is_a?(CloseShareGroupResponse) && @error_code == other.error_code
4592
+ end
4593
+ end
4594
+
2237
4595
  end