@fatehan/tsrp 1.6.76 → 1.6.78

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.
@@ -7,6 +7,7 @@
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import Long from "long";
9
9
  import { Device, Tracker } from "../devices/devices";
10
+ import { DocumentRequirement, Expense, FleetDocument, Inspection, InspectionTemplate, Issue, OdometerOffset, OutOfService, ServiceProgram, Vendor, VendorCategory, } from "../devices/fleet";
10
11
  import { Maintenance, MaintenanceService } from "../devices/maintenance";
11
12
  import { Currency } from "../financial/financial";
12
13
  import { Timestamp } from "../google/protobuf/timestamp";
@@ -2557,6 +2558,1173 @@ export const ServicePagination = {
2557
2558
  return message;
2558
2559
  },
2559
2560
  };
2561
+ function createBaseVendorPagination() {
2562
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
2563
+ }
2564
+ export const VendorPagination = {
2565
+ encode(message, writer = new BinaryWriter()) {
2566
+ if (message.currentPage !== 0) {
2567
+ writer.uint32(8).uint32(message.currentPage);
2568
+ }
2569
+ if (message.lastPage !== 0) {
2570
+ writer.uint32(16).uint32(message.lastPage);
2571
+ }
2572
+ if (message.perPage !== 0) {
2573
+ writer.uint32(24).uint32(message.perPage);
2574
+ }
2575
+ if (message.total !== 0) {
2576
+ writer.uint32(32).uint32(message.total);
2577
+ }
2578
+ for (const v of message.data) {
2579
+ Vendor.encode(v, writer.uint32(42).fork()).join();
2580
+ }
2581
+ return writer;
2582
+ },
2583
+ decode(input, length) {
2584
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2585
+ const end = length === undefined ? reader.len : reader.pos + length;
2586
+ const message = createBaseVendorPagination();
2587
+ while (reader.pos < end) {
2588
+ const tag = reader.uint32();
2589
+ switch (tag >>> 3) {
2590
+ case 1: {
2591
+ if (tag !== 8) {
2592
+ break;
2593
+ }
2594
+ message.currentPage = reader.uint32();
2595
+ continue;
2596
+ }
2597
+ case 2: {
2598
+ if (tag !== 16) {
2599
+ break;
2600
+ }
2601
+ message.lastPage = reader.uint32();
2602
+ continue;
2603
+ }
2604
+ case 3: {
2605
+ if (tag !== 24) {
2606
+ break;
2607
+ }
2608
+ message.perPage = reader.uint32();
2609
+ continue;
2610
+ }
2611
+ case 4: {
2612
+ if (tag !== 32) {
2613
+ break;
2614
+ }
2615
+ message.total = reader.uint32();
2616
+ continue;
2617
+ }
2618
+ case 5: {
2619
+ if (tag !== 42) {
2620
+ break;
2621
+ }
2622
+ message.data.push(Vendor.decode(reader, reader.uint32()));
2623
+ continue;
2624
+ }
2625
+ }
2626
+ if ((tag & 7) === 4 || tag === 0) {
2627
+ break;
2628
+ }
2629
+ reader.skip(tag & 7);
2630
+ }
2631
+ return message;
2632
+ },
2633
+ create(base) {
2634
+ return VendorPagination.fromPartial(base ?? {});
2635
+ },
2636
+ fromPartial(object) {
2637
+ const message = createBaseVendorPagination();
2638
+ message.currentPage = object.currentPage ?? 0;
2639
+ message.lastPage = object.lastPage ?? 0;
2640
+ message.perPage = object.perPage ?? 0;
2641
+ message.total = object.total ?? 0;
2642
+ message.data = object.data?.map((e) => Vendor.fromPartial(e)) || [];
2643
+ return message;
2644
+ },
2645
+ };
2646
+ function createBaseVendorCategoryPagination() {
2647
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
2648
+ }
2649
+ export const VendorCategoryPagination = {
2650
+ encode(message, writer = new BinaryWriter()) {
2651
+ if (message.currentPage !== 0) {
2652
+ writer.uint32(8).uint32(message.currentPage);
2653
+ }
2654
+ if (message.lastPage !== 0) {
2655
+ writer.uint32(16).uint32(message.lastPage);
2656
+ }
2657
+ if (message.perPage !== 0) {
2658
+ writer.uint32(24).uint32(message.perPage);
2659
+ }
2660
+ if (message.total !== 0) {
2661
+ writer.uint32(32).uint32(message.total);
2662
+ }
2663
+ for (const v of message.data) {
2664
+ VendorCategory.encode(v, writer.uint32(42).fork()).join();
2665
+ }
2666
+ return writer;
2667
+ },
2668
+ decode(input, length) {
2669
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2670
+ const end = length === undefined ? reader.len : reader.pos + length;
2671
+ const message = createBaseVendorCategoryPagination();
2672
+ while (reader.pos < end) {
2673
+ const tag = reader.uint32();
2674
+ switch (tag >>> 3) {
2675
+ case 1: {
2676
+ if (tag !== 8) {
2677
+ break;
2678
+ }
2679
+ message.currentPage = reader.uint32();
2680
+ continue;
2681
+ }
2682
+ case 2: {
2683
+ if (tag !== 16) {
2684
+ break;
2685
+ }
2686
+ message.lastPage = reader.uint32();
2687
+ continue;
2688
+ }
2689
+ case 3: {
2690
+ if (tag !== 24) {
2691
+ break;
2692
+ }
2693
+ message.perPage = reader.uint32();
2694
+ continue;
2695
+ }
2696
+ case 4: {
2697
+ if (tag !== 32) {
2698
+ break;
2699
+ }
2700
+ message.total = reader.uint32();
2701
+ continue;
2702
+ }
2703
+ case 5: {
2704
+ if (tag !== 42) {
2705
+ break;
2706
+ }
2707
+ message.data.push(VendorCategory.decode(reader, reader.uint32()));
2708
+ continue;
2709
+ }
2710
+ }
2711
+ if ((tag & 7) === 4 || tag === 0) {
2712
+ break;
2713
+ }
2714
+ reader.skip(tag & 7);
2715
+ }
2716
+ return message;
2717
+ },
2718
+ create(base) {
2719
+ return VendorCategoryPagination.fromPartial(base ?? {});
2720
+ },
2721
+ fromPartial(object) {
2722
+ const message = createBaseVendorCategoryPagination();
2723
+ message.currentPage = object.currentPage ?? 0;
2724
+ message.lastPage = object.lastPage ?? 0;
2725
+ message.perPage = object.perPage ?? 0;
2726
+ message.total = object.total ?? 0;
2727
+ message.data = object.data?.map((e) => VendorCategory.fromPartial(e)) || [];
2728
+ return message;
2729
+ },
2730
+ };
2731
+ function createBaseExpensePagination() {
2732
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [], pendingTotal: 0, pendingCount: 0 };
2733
+ }
2734
+ export const ExpensePagination = {
2735
+ encode(message, writer = new BinaryWriter()) {
2736
+ if (message.currentPage !== 0) {
2737
+ writer.uint32(8).uint32(message.currentPage);
2738
+ }
2739
+ if (message.lastPage !== 0) {
2740
+ writer.uint32(16).uint32(message.lastPage);
2741
+ }
2742
+ if (message.perPage !== 0) {
2743
+ writer.uint32(24).uint32(message.perPage);
2744
+ }
2745
+ if (message.total !== 0) {
2746
+ writer.uint32(32).uint32(message.total);
2747
+ }
2748
+ for (const v of message.data) {
2749
+ Expense.encode(v, writer.uint32(42).fork()).join();
2750
+ }
2751
+ if (message.pendingTotal !== 0) {
2752
+ writer.uint32(49).double(message.pendingTotal);
2753
+ }
2754
+ if (message.pendingCount !== 0) {
2755
+ writer.uint32(56).uint32(message.pendingCount);
2756
+ }
2757
+ return writer;
2758
+ },
2759
+ decode(input, length) {
2760
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2761
+ const end = length === undefined ? reader.len : reader.pos + length;
2762
+ const message = createBaseExpensePagination();
2763
+ while (reader.pos < end) {
2764
+ const tag = reader.uint32();
2765
+ switch (tag >>> 3) {
2766
+ case 1: {
2767
+ if (tag !== 8) {
2768
+ break;
2769
+ }
2770
+ message.currentPage = reader.uint32();
2771
+ continue;
2772
+ }
2773
+ case 2: {
2774
+ if (tag !== 16) {
2775
+ break;
2776
+ }
2777
+ message.lastPage = reader.uint32();
2778
+ continue;
2779
+ }
2780
+ case 3: {
2781
+ if (tag !== 24) {
2782
+ break;
2783
+ }
2784
+ message.perPage = reader.uint32();
2785
+ continue;
2786
+ }
2787
+ case 4: {
2788
+ if (tag !== 32) {
2789
+ break;
2790
+ }
2791
+ message.total = reader.uint32();
2792
+ continue;
2793
+ }
2794
+ case 5: {
2795
+ if (tag !== 42) {
2796
+ break;
2797
+ }
2798
+ message.data.push(Expense.decode(reader, reader.uint32()));
2799
+ continue;
2800
+ }
2801
+ case 6: {
2802
+ if (tag !== 49) {
2803
+ break;
2804
+ }
2805
+ message.pendingTotal = reader.double();
2806
+ continue;
2807
+ }
2808
+ case 7: {
2809
+ if (tag !== 56) {
2810
+ break;
2811
+ }
2812
+ message.pendingCount = reader.uint32();
2813
+ continue;
2814
+ }
2815
+ }
2816
+ if ((tag & 7) === 4 || tag === 0) {
2817
+ break;
2818
+ }
2819
+ reader.skip(tag & 7);
2820
+ }
2821
+ return message;
2822
+ },
2823
+ create(base) {
2824
+ return ExpensePagination.fromPartial(base ?? {});
2825
+ },
2826
+ fromPartial(object) {
2827
+ const message = createBaseExpensePagination();
2828
+ message.currentPage = object.currentPage ?? 0;
2829
+ message.lastPage = object.lastPage ?? 0;
2830
+ message.perPage = object.perPage ?? 0;
2831
+ message.total = object.total ?? 0;
2832
+ message.data = object.data?.map((e) => Expense.fromPartial(e)) || [];
2833
+ message.pendingTotal = object.pendingTotal ?? 0;
2834
+ message.pendingCount = object.pendingCount ?? 0;
2835
+ return message;
2836
+ },
2837
+ };
2838
+ function createBaseServiceEntryPagination() {
2839
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
2840
+ }
2841
+ export const ServiceEntryPagination = {
2842
+ encode(message, writer = new BinaryWriter()) {
2843
+ if (message.currentPage !== 0) {
2844
+ writer.uint32(8).uint32(message.currentPage);
2845
+ }
2846
+ if (message.lastPage !== 0) {
2847
+ writer.uint32(16).uint32(message.lastPage);
2848
+ }
2849
+ if (message.perPage !== 0) {
2850
+ writer.uint32(24).uint32(message.perPage);
2851
+ }
2852
+ if (message.total !== 0) {
2853
+ writer.uint32(32).uint32(message.total);
2854
+ }
2855
+ for (const v of message.data) {
2856
+ Maintenance.encode(v, writer.uint32(42).fork()).join();
2857
+ }
2858
+ return writer;
2859
+ },
2860
+ decode(input, length) {
2861
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2862
+ const end = length === undefined ? reader.len : reader.pos + length;
2863
+ const message = createBaseServiceEntryPagination();
2864
+ while (reader.pos < end) {
2865
+ const tag = reader.uint32();
2866
+ switch (tag >>> 3) {
2867
+ case 1: {
2868
+ if (tag !== 8) {
2869
+ break;
2870
+ }
2871
+ message.currentPage = reader.uint32();
2872
+ continue;
2873
+ }
2874
+ case 2: {
2875
+ if (tag !== 16) {
2876
+ break;
2877
+ }
2878
+ message.lastPage = reader.uint32();
2879
+ continue;
2880
+ }
2881
+ case 3: {
2882
+ if (tag !== 24) {
2883
+ break;
2884
+ }
2885
+ message.perPage = reader.uint32();
2886
+ continue;
2887
+ }
2888
+ case 4: {
2889
+ if (tag !== 32) {
2890
+ break;
2891
+ }
2892
+ message.total = reader.uint32();
2893
+ continue;
2894
+ }
2895
+ case 5: {
2896
+ if (tag !== 42) {
2897
+ break;
2898
+ }
2899
+ message.data.push(Maintenance.decode(reader, reader.uint32()));
2900
+ continue;
2901
+ }
2902
+ }
2903
+ if ((tag & 7) === 4 || tag === 0) {
2904
+ break;
2905
+ }
2906
+ reader.skip(tag & 7);
2907
+ }
2908
+ return message;
2909
+ },
2910
+ create(base) {
2911
+ return ServiceEntryPagination.fromPartial(base ?? {});
2912
+ },
2913
+ fromPartial(object) {
2914
+ const message = createBaseServiceEntryPagination();
2915
+ message.currentPage = object.currentPage ?? 0;
2916
+ message.lastPage = object.lastPage ?? 0;
2917
+ message.perPage = object.perPage ?? 0;
2918
+ message.total = object.total ?? 0;
2919
+ message.data = object.data?.map((e) => Maintenance.fromPartial(e)) || [];
2920
+ return message;
2921
+ },
2922
+ };
2923
+ function createBaseServiceProgramPagination() {
2924
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
2925
+ }
2926
+ export const ServiceProgramPagination = {
2927
+ encode(message, writer = new BinaryWriter()) {
2928
+ if (message.currentPage !== 0) {
2929
+ writer.uint32(8).uint32(message.currentPage);
2930
+ }
2931
+ if (message.lastPage !== 0) {
2932
+ writer.uint32(16).uint32(message.lastPage);
2933
+ }
2934
+ if (message.perPage !== 0) {
2935
+ writer.uint32(24).uint32(message.perPage);
2936
+ }
2937
+ if (message.total !== 0) {
2938
+ writer.uint32(32).uint32(message.total);
2939
+ }
2940
+ for (const v of message.data) {
2941
+ ServiceProgram.encode(v, writer.uint32(42).fork()).join();
2942
+ }
2943
+ return writer;
2944
+ },
2945
+ decode(input, length) {
2946
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2947
+ const end = length === undefined ? reader.len : reader.pos + length;
2948
+ const message = createBaseServiceProgramPagination();
2949
+ while (reader.pos < end) {
2950
+ const tag = reader.uint32();
2951
+ switch (tag >>> 3) {
2952
+ case 1: {
2953
+ if (tag !== 8) {
2954
+ break;
2955
+ }
2956
+ message.currentPage = reader.uint32();
2957
+ continue;
2958
+ }
2959
+ case 2: {
2960
+ if (tag !== 16) {
2961
+ break;
2962
+ }
2963
+ message.lastPage = reader.uint32();
2964
+ continue;
2965
+ }
2966
+ case 3: {
2967
+ if (tag !== 24) {
2968
+ break;
2969
+ }
2970
+ message.perPage = reader.uint32();
2971
+ continue;
2972
+ }
2973
+ case 4: {
2974
+ if (tag !== 32) {
2975
+ break;
2976
+ }
2977
+ message.total = reader.uint32();
2978
+ continue;
2979
+ }
2980
+ case 5: {
2981
+ if (tag !== 42) {
2982
+ break;
2983
+ }
2984
+ message.data.push(ServiceProgram.decode(reader, reader.uint32()));
2985
+ continue;
2986
+ }
2987
+ }
2988
+ if ((tag & 7) === 4 || tag === 0) {
2989
+ break;
2990
+ }
2991
+ reader.skip(tag & 7);
2992
+ }
2993
+ return message;
2994
+ },
2995
+ create(base) {
2996
+ return ServiceProgramPagination.fromPartial(base ?? {});
2997
+ },
2998
+ fromPartial(object) {
2999
+ const message = createBaseServiceProgramPagination();
3000
+ message.currentPage = object.currentPage ?? 0;
3001
+ message.lastPage = object.lastPage ?? 0;
3002
+ message.perPage = object.perPage ?? 0;
3003
+ message.total = object.total ?? 0;
3004
+ message.data = object.data?.map((e) => ServiceProgram.fromPartial(e)) || [];
3005
+ return message;
3006
+ },
3007
+ };
3008
+ function createBaseIssuePagination() {
3009
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3010
+ }
3011
+ export const IssuePagination = {
3012
+ encode(message, writer = new BinaryWriter()) {
3013
+ if (message.currentPage !== 0) {
3014
+ writer.uint32(8).uint32(message.currentPage);
3015
+ }
3016
+ if (message.lastPage !== 0) {
3017
+ writer.uint32(16).uint32(message.lastPage);
3018
+ }
3019
+ if (message.perPage !== 0) {
3020
+ writer.uint32(24).uint32(message.perPage);
3021
+ }
3022
+ if (message.total !== 0) {
3023
+ writer.uint32(32).uint32(message.total);
3024
+ }
3025
+ for (const v of message.data) {
3026
+ Issue.encode(v, writer.uint32(42).fork()).join();
3027
+ }
3028
+ return writer;
3029
+ },
3030
+ decode(input, length) {
3031
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3032
+ const end = length === undefined ? reader.len : reader.pos + length;
3033
+ const message = createBaseIssuePagination();
3034
+ while (reader.pos < end) {
3035
+ const tag = reader.uint32();
3036
+ switch (tag >>> 3) {
3037
+ case 1: {
3038
+ if (tag !== 8) {
3039
+ break;
3040
+ }
3041
+ message.currentPage = reader.uint32();
3042
+ continue;
3043
+ }
3044
+ case 2: {
3045
+ if (tag !== 16) {
3046
+ break;
3047
+ }
3048
+ message.lastPage = reader.uint32();
3049
+ continue;
3050
+ }
3051
+ case 3: {
3052
+ if (tag !== 24) {
3053
+ break;
3054
+ }
3055
+ message.perPage = reader.uint32();
3056
+ continue;
3057
+ }
3058
+ case 4: {
3059
+ if (tag !== 32) {
3060
+ break;
3061
+ }
3062
+ message.total = reader.uint32();
3063
+ continue;
3064
+ }
3065
+ case 5: {
3066
+ if (tag !== 42) {
3067
+ break;
3068
+ }
3069
+ message.data.push(Issue.decode(reader, reader.uint32()));
3070
+ continue;
3071
+ }
3072
+ }
3073
+ if ((tag & 7) === 4 || tag === 0) {
3074
+ break;
3075
+ }
3076
+ reader.skip(tag & 7);
3077
+ }
3078
+ return message;
3079
+ },
3080
+ create(base) {
3081
+ return IssuePagination.fromPartial(base ?? {});
3082
+ },
3083
+ fromPartial(object) {
3084
+ const message = createBaseIssuePagination();
3085
+ message.currentPage = object.currentPage ?? 0;
3086
+ message.lastPage = object.lastPage ?? 0;
3087
+ message.perPage = object.perPage ?? 0;
3088
+ message.total = object.total ?? 0;
3089
+ message.data = object.data?.map((e) => Issue.fromPartial(e)) || [];
3090
+ return message;
3091
+ },
3092
+ };
3093
+ function createBaseInspectionPagination() {
3094
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3095
+ }
3096
+ export const InspectionPagination = {
3097
+ encode(message, writer = new BinaryWriter()) {
3098
+ if (message.currentPage !== 0) {
3099
+ writer.uint32(8).uint32(message.currentPage);
3100
+ }
3101
+ if (message.lastPage !== 0) {
3102
+ writer.uint32(16).uint32(message.lastPage);
3103
+ }
3104
+ if (message.perPage !== 0) {
3105
+ writer.uint32(24).uint32(message.perPage);
3106
+ }
3107
+ if (message.total !== 0) {
3108
+ writer.uint32(32).uint32(message.total);
3109
+ }
3110
+ for (const v of message.data) {
3111
+ Inspection.encode(v, writer.uint32(42).fork()).join();
3112
+ }
3113
+ return writer;
3114
+ },
3115
+ decode(input, length) {
3116
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3117
+ const end = length === undefined ? reader.len : reader.pos + length;
3118
+ const message = createBaseInspectionPagination();
3119
+ while (reader.pos < end) {
3120
+ const tag = reader.uint32();
3121
+ switch (tag >>> 3) {
3122
+ case 1: {
3123
+ if (tag !== 8) {
3124
+ break;
3125
+ }
3126
+ message.currentPage = reader.uint32();
3127
+ continue;
3128
+ }
3129
+ case 2: {
3130
+ if (tag !== 16) {
3131
+ break;
3132
+ }
3133
+ message.lastPage = reader.uint32();
3134
+ continue;
3135
+ }
3136
+ case 3: {
3137
+ if (tag !== 24) {
3138
+ break;
3139
+ }
3140
+ message.perPage = reader.uint32();
3141
+ continue;
3142
+ }
3143
+ case 4: {
3144
+ if (tag !== 32) {
3145
+ break;
3146
+ }
3147
+ message.total = reader.uint32();
3148
+ continue;
3149
+ }
3150
+ case 5: {
3151
+ if (tag !== 42) {
3152
+ break;
3153
+ }
3154
+ message.data.push(Inspection.decode(reader, reader.uint32()));
3155
+ continue;
3156
+ }
3157
+ }
3158
+ if ((tag & 7) === 4 || tag === 0) {
3159
+ break;
3160
+ }
3161
+ reader.skip(tag & 7);
3162
+ }
3163
+ return message;
3164
+ },
3165
+ create(base) {
3166
+ return InspectionPagination.fromPartial(base ?? {});
3167
+ },
3168
+ fromPartial(object) {
3169
+ const message = createBaseInspectionPagination();
3170
+ message.currentPage = object.currentPage ?? 0;
3171
+ message.lastPage = object.lastPage ?? 0;
3172
+ message.perPage = object.perPage ?? 0;
3173
+ message.total = object.total ?? 0;
3174
+ message.data = object.data?.map((e) => Inspection.fromPartial(e)) || [];
3175
+ return message;
3176
+ },
3177
+ };
3178
+ function createBaseInspectionTemplatePagination() {
3179
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3180
+ }
3181
+ export const InspectionTemplatePagination = {
3182
+ encode(message, writer = new BinaryWriter()) {
3183
+ if (message.currentPage !== 0) {
3184
+ writer.uint32(8).uint32(message.currentPage);
3185
+ }
3186
+ if (message.lastPage !== 0) {
3187
+ writer.uint32(16).uint32(message.lastPage);
3188
+ }
3189
+ if (message.perPage !== 0) {
3190
+ writer.uint32(24).uint32(message.perPage);
3191
+ }
3192
+ if (message.total !== 0) {
3193
+ writer.uint32(32).uint32(message.total);
3194
+ }
3195
+ for (const v of message.data) {
3196
+ InspectionTemplate.encode(v, writer.uint32(42).fork()).join();
3197
+ }
3198
+ return writer;
3199
+ },
3200
+ decode(input, length) {
3201
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3202
+ const end = length === undefined ? reader.len : reader.pos + length;
3203
+ const message = createBaseInspectionTemplatePagination();
3204
+ while (reader.pos < end) {
3205
+ const tag = reader.uint32();
3206
+ switch (tag >>> 3) {
3207
+ case 1: {
3208
+ if (tag !== 8) {
3209
+ break;
3210
+ }
3211
+ message.currentPage = reader.uint32();
3212
+ continue;
3213
+ }
3214
+ case 2: {
3215
+ if (tag !== 16) {
3216
+ break;
3217
+ }
3218
+ message.lastPage = reader.uint32();
3219
+ continue;
3220
+ }
3221
+ case 3: {
3222
+ if (tag !== 24) {
3223
+ break;
3224
+ }
3225
+ message.perPage = reader.uint32();
3226
+ continue;
3227
+ }
3228
+ case 4: {
3229
+ if (tag !== 32) {
3230
+ break;
3231
+ }
3232
+ message.total = reader.uint32();
3233
+ continue;
3234
+ }
3235
+ case 5: {
3236
+ if (tag !== 42) {
3237
+ break;
3238
+ }
3239
+ message.data.push(InspectionTemplate.decode(reader, reader.uint32()));
3240
+ continue;
3241
+ }
3242
+ }
3243
+ if ((tag & 7) === 4 || tag === 0) {
3244
+ break;
3245
+ }
3246
+ reader.skip(tag & 7);
3247
+ }
3248
+ return message;
3249
+ },
3250
+ create(base) {
3251
+ return InspectionTemplatePagination.fromPartial(base ?? {});
3252
+ },
3253
+ fromPartial(object) {
3254
+ const message = createBaseInspectionTemplatePagination();
3255
+ message.currentPage = object.currentPage ?? 0;
3256
+ message.lastPage = object.lastPage ?? 0;
3257
+ message.perPage = object.perPage ?? 0;
3258
+ message.total = object.total ?? 0;
3259
+ message.data = object.data?.map((e) => InspectionTemplate.fromPartial(e)) || [];
3260
+ return message;
3261
+ },
3262
+ };
3263
+ function createBaseOutOfServicePagination() {
3264
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3265
+ }
3266
+ export const OutOfServicePagination = {
3267
+ encode(message, writer = new BinaryWriter()) {
3268
+ if (message.currentPage !== 0) {
3269
+ writer.uint32(8).uint32(message.currentPage);
3270
+ }
3271
+ if (message.lastPage !== 0) {
3272
+ writer.uint32(16).uint32(message.lastPage);
3273
+ }
3274
+ if (message.perPage !== 0) {
3275
+ writer.uint32(24).uint32(message.perPage);
3276
+ }
3277
+ if (message.total !== 0) {
3278
+ writer.uint32(32).uint32(message.total);
3279
+ }
3280
+ for (const v of message.data) {
3281
+ OutOfService.encode(v, writer.uint32(42).fork()).join();
3282
+ }
3283
+ return writer;
3284
+ },
3285
+ decode(input, length) {
3286
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3287
+ const end = length === undefined ? reader.len : reader.pos + length;
3288
+ const message = createBaseOutOfServicePagination();
3289
+ while (reader.pos < end) {
3290
+ const tag = reader.uint32();
3291
+ switch (tag >>> 3) {
3292
+ case 1: {
3293
+ if (tag !== 8) {
3294
+ break;
3295
+ }
3296
+ message.currentPage = reader.uint32();
3297
+ continue;
3298
+ }
3299
+ case 2: {
3300
+ if (tag !== 16) {
3301
+ break;
3302
+ }
3303
+ message.lastPage = reader.uint32();
3304
+ continue;
3305
+ }
3306
+ case 3: {
3307
+ if (tag !== 24) {
3308
+ break;
3309
+ }
3310
+ message.perPage = reader.uint32();
3311
+ continue;
3312
+ }
3313
+ case 4: {
3314
+ if (tag !== 32) {
3315
+ break;
3316
+ }
3317
+ message.total = reader.uint32();
3318
+ continue;
3319
+ }
3320
+ case 5: {
3321
+ if (tag !== 42) {
3322
+ break;
3323
+ }
3324
+ message.data.push(OutOfService.decode(reader, reader.uint32()));
3325
+ continue;
3326
+ }
3327
+ }
3328
+ if ((tag & 7) === 4 || tag === 0) {
3329
+ break;
3330
+ }
3331
+ reader.skip(tag & 7);
3332
+ }
3333
+ return message;
3334
+ },
3335
+ create(base) {
3336
+ return OutOfServicePagination.fromPartial(base ?? {});
3337
+ },
3338
+ fromPartial(object) {
3339
+ const message = createBaseOutOfServicePagination();
3340
+ message.currentPage = object.currentPage ?? 0;
3341
+ message.lastPage = object.lastPage ?? 0;
3342
+ message.perPage = object.perPage ?? 0;
3343
+ message.total = object.total ?? 0;
3344
+ message.data = object.data?.map((e) => OutOfService.fromPartial(e)) || [];
3345
+ return message;
3346
+ },
3347
+ };
3348
+ function createBaseFleetDocumentPagination() {
3349
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3350
+ }
3351
+ export const FleetDocumentPagination = {
3352
+ encode(message, writer = new BinaryWriter()) {
3353
+ if (message.currentPage !== 0) {
3354
+ writer.uint32(8).uint32(message.currentPage);
3355
+ }
3356
+ if (message.lastPage !== 0) {
3357
+ writer.uint32(16).uint32(message.lastPage);
3358
+ }
3359
+ if (message.perPage !== 0) {
3360
+ writer.uint32(24).uint32(message.perPage);
3361
+ }
3362
+ if (message.total !== 0) {
3363
+ writer.uint32(32).uint32(message.total);
3364
+ }
3365
+ for (const v of message.data) {
3366
+ FleetDocument.encode(v, writer.uint32(42).fork()).join();
3367
+ }
3368
+ return writer;
3369
+ },
3370
+ decode(input, length) {
3371
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3372
+ const end = length === undefined ? reader.len : reader.pos + length;
3373
+ const message = createBaseFleetDocumentPagination();
3374
+ while (reader.pos < end) {
3375
+ const tag = reader.uint32();
3376
+ switch (tag >>> 3) {
3377
+ case 1: {
3378
+ if (tag !== 8) {
3379
+ break;
3380
+ }
3381
+ message.currentPage = reader.uint32();
3382
+ continue;
3383
+ }
3384
+ case 2: {
3385
+ if (tag !== 16) {
3386
+ break;
3387
+ }
3388
+ message.lastPage = reader.uint32();
3389
+ continue;
3390
+ }
3391
+ case 3: {
3392
+ if (tag !== 24) {
3393
+ break;
3394
+ }
3395
+ message.perPage = reader.uint32();
3396
+ continue;
3397
+ }
3398
+ case 4: {
3399
+ if (tag !== 32) {
3400
+ break;
3401
+ }
3402
+ message.total = reader.uint32();
3403
+ continue;
3404
+ }
3405
+ case 5: {
3406
+ if (tag !== 42) {
3407
+ break;
3408
+ }
3409
+ message.data.push(FleetDocument.decode(reader, reader.uint32()));
3410
+ continue;
3411
+ }
3412
+ }
3413
+ if ((tag & 7) === 4 || tag === 0) {
3414
+ break;
3415
+ }
3416
+ reader.skip(tag & 7);
3417
+ }
3418
+ return message;
3419
+ },
3420
+ create(base) {
3421
+ return FleetDocumentPagination.fromPartial(base ?? {});
3422
+ },
3423
+ fromPartial(object) {
3424
+ const message = createBaseFleetDocumentPagination();
3425
+ message.currentPage = object.currentPage ?? 0;
3426
+ message.lastPage = object.lastPage ?? 0;
3427
+ message.perPage = object.perPage ?? 0;
3428
+ message.total = object.total ?? 0;
3429
+ message.data = object.data?.map((e) => FleetDocument.fromPartial(e)) || [];
3430
+ return message;
3431
+ },
3432
+ };
3433
+ function createBaseDocumentRequirementPagination() {
3434
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3435
+ }
3436
+ export const DocumentRequirementPagination = {
3437
+ encode(message, writer = new BinaryWriter()) {
3438
+ if (message.currentPage !== 0) {
3439
+ writer.uint32(8).uint32(message.currentPage);
3440
+ }
3441
+ if (message.lastPage !== 0) {
3442
+ writer.uint32(16).uint32(message.lastPage);
3443
+ }
3444
+ if (message.perPage !== 0) {
3445
+ writer.uint32(24).uint32(message.perPage);
3446
+ }
3447
+ if (message.total !== 0) {
3448
+ writer.uint32(32).uint32(message.total);
3449
+ }
3450
+ for (const v of message.data) {
3451
+ DocumentRequirement.encode(v, writer.uint32(42).fork()).join();
3452
+ }
3453
+ return writer;
3454
+ },
3455
+ decode(input, length) {
3456
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3457
+ const end = length === undefined ? reader.len : reader.pos + length;
3458
+ const message = createBaseDocumentRequirementPagination();
3459
+ while (reader.pos < end) {
3460
+ const tag = reader.uint32();
3461
+ switch (tag >>> 3) {
3462
+ case 1: {
3463
+ if (tag !== 8) {
3464
+ break;
3465
+ }
3466
+ message.currentPage = reader.uint32();
3467
+ continue;
3468
+ }
3469
+ case 2: {
3470
+ if (tag !== 16) {
3471
+ break;
3472
+ }
3473
+ message.lastPage = reader.uint32();
3474
+ continue;
3475
+ }
3476
+ case 3: {
3477
+ if (tag !== 24) {
3478
+ break;
3479
+ }
3480
+ message.perPage = reader.uint32();
3481
+ continue;
3482
+ }
3483
+ case 4: {
3484
+ if (tag !== 32) {
3485
+ break;
3486
+ }
3487
+ message.total = reader.uint32();
3488
+ continue;
3489
+ }
3490
+ case 5: {
3491
+ if (tag !== 42) {
3492
+ break;
3493
+ }
3494
+ message.data.push(DocumentRequirement.decode(reader, reader.uint32()));
3495
+ continue;
3496
+ }
3497
+ }
3498
+ if ((tag & 7) === 4 || tag === 0) {
3499
+ break;
3500
+ }
3501
+ reader.skip(tag & 7);
3502
+ }
3503
+ return message;
3504
+ },
3505
+ create(base) {
3506
+ return DocumentRequirementPagination.fromPartial(base ?? {});
3507
+ },
3508
+ fromPartial(object) {
3509
+ const message = createBaseDocumentRequirementPagination();
3510
+ message.currentPage = object.currentPage ?? 0;
3511
+ message.lastPage = object.lastPage ?? 0;
3512
+ message.perPage = object.perPage ?? 0;
3513
+ message.total = object.total ?? 0;
3514
+ message.data = object.data?.map((e) => DocumentRequirement.fromPartial(e)) || [];
3515
+ return message;
3516
+ },
3517
+ };
3518
+ function createBaseOdometerOffsetPagination() {
3519
+ return { currentPage: 0, lastPage: 0, perPage: 0, total: 0, data: [] };
3520
+ }
3521
+ export const OdometerOffsetPagination = {
3522
+ encode(message, writer = new BinaryWriter()) {
3523
+ if (message.currentPage !== 0) {
3524
+ writer.uint32(8).uint32(message.currentPage);
3525
+ }
3526
+ if (message.lastPage !== 0) {
3527
+ writer.uint32(16).uint32(message.lastPage);
3528
+ }
3529
+ if (message.perPage !== 0) {
3530
+ writer.uint32(24).uint32(message.perPage);
3531
+ }
3532
+ if (message.total !== 0) {
3533
+ writer.uint32(32).uint32(message.total);
3534
+ }
3535
+ for (const v of message.data) {
3536
+ OdometerOffset.encode(v, writer.uint32(42).fork()).join();
3537
+ }
3538
+ return writer;
3539
+ },
3540
+ decode(input, length) {
3541
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3542
+ const end = length === undefined ? reader.len : reader.pos + length;
3543
+ const message = createBaseOdometerOffsetPagination();
3544
+ while (reader.pos < end) {
3545
+ const tag = reader.uint32();
3546
+ switch (tag >>> 3) {
3547
+ case 1: {
3548
+ if (tag !== 8) {
3549
+ break;
3550
+ }
3551
+ message.currentPage = reader.uint32();
3552
+ continue;
3553
+ }
3554
+ case 2: {
3555
+ if (tag !== 16) {
3556
+ break;
3557
+ }
3558
+ message.lastPage = reader.uint32();
3559
+ continue;
3560
+ }
3561
+ case 3: {
3562
+ if (tag !== 24) {
3563
+ break;
3564
+ }
3565
+ message.perPage = reader.uint32();
3566
+ continue;
3567
+ }
3568
+ case 4: {
3569
+ if (tag !== 32) {
3570
+ break;
3571
+ }
3572
+ message.total = reader.uint32();
3573
+ continue;
3574
+ }
3575
+ case 5: {
3576
+ if (tag !== 42) {
3577
+ break;
3578
+ }
3579
+ message.data.push(OdometerOffset.decode(reader, reader.uint32()));
3580
+ continue;
3581
+ }
3582
+ }
3583
+ if ((tag & 7) === 4 || tag === 0) {
3584
+ break;
3585
+ }
3586
+ reader.skip(tag & 7);
3587
+ }
3588
+ return message;
3589
+ },
3590
+ create(base) {
3591
+ return OdometerOffsetPagination.fromPartial(base ?? {});
3592
+ },
3593
+ fromPartial(object) {
3594
+ const message = createBaseOdometerOffsetPagination();
3595
+ message.currentPage = object.currentPage ?? 0;
3596
+ message.lastPage = object.lastPage ?? 0;
3597
+ message.perPage = object.perPage ?? 0;
3598
+ message.total = object.total ?? 0;
3599
+ message.data = object.data?.map((e) => OdometerOffset.fromPartial(e)) || [];
3600
+ return message;
3601
+ },
3602
+ };
3603
+ function createBaseIssueList() {
3604
+ return { data: [] };
3605
+ }
3606
+ export const IssueList = {
3607
+ encode(message, writer = new BinaryWriter()) {
3608
+ for (const v of message.data) {
3609
+ Issue.encode(v, writer.uint32(10).fork()).join();
3610
+ }
3611
+ return writer;
3612
+ },
3613
+ decode(input, length) {
3614
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3615
+ const end = length === undefined ? reader.len : reader.pos + length;
3616
+ const message = createBaseIssueList();
3617
+ while (reader.pos < end) {
3618
+ const tag = reader.uint32();
3619
+ switch (tag >>> 3) {
3620
+ case 1: {
3621
+ if (tag !== 10) {
3622
+ break;
3623
+ }
3624
+ message.data.push(Issue.decode(reader, reader.uint32()));
3625
+ continue;
3626
+ }
3627
+ }
3628
+ if ((tag & 7) === 4 || tag === 0) {
3629
+ break;
3630
+ }
3631
+ reader.skip(tag & 7);
3632
+ }
3633
+ return message;
3634
+ },
3635
+ create(base) {
3636
+ return IssueList.fromPartial(base ?? {});
3637
+ },
3638
+ fromPartial(object) {
3639
+ const message = createBaseIssueList();
3640
+ message.data = object.data?.map((e) => Issue.fromPartial(e)) || [];
3641
+ return message;
3642
+ },
3643
+ };
3644
+ function createBaseInspectionTemplateList() {
3645
+ return { data: [] };
3646
+ }
3647
+ export const InspectionTemplateList = {
3648
+ encode(message, writer = new BinaryWriter()) {
3649
+ for (const v of message.data) {
3650
+ InspectionTemplate.encode(v, writer.uint32(10).fork()).join();
3651
+ }
3652
+ return writer;
3653
+ },
3654
+ decode(input, length) {
3655
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3656
+ const end = length === undefined ? reader.len : reader.pos + length;
3657
+ const message = createBaseInspectionTemplateList();
3658
+ while (reader.pos < end) {
3659
+ const tag = reader.uint32();
3660
+ switch (tag >>> 3) {
3661
+ case 1: {
3662
+ if (tag !== 10) {
3663
+ break;
3664
+ }
3665
+ message.data.push(InspectionTemplate.decode(reader, reader.uint32()));
3666
+ continue;
3667
+ }
3668
+ }
3669
+ if ((tag & 7) === 4 || tag === 0) {
3670
+ break;
3671
+ }
3672
+ reader.skip(tag & 7);
3673
+ }
3674
+ return message;
3675
+ },
3676
+ create(base) {
3677
+ return InspectionTemplateList.fromPartial(base ?? {});
3678
+ },
3679
+ fromPartial(object) {
3680
+ const message = createBaseInspectionTemplateList();
3681
+ message.data = object.data?.map((e) => InspectionTemplate.fromPartial(e)) || [];
3682
+ return message;
3683
+ },
3684
+ };
3685
+ function createBaseExpenseDuplicate() {
3686
+ return { duplicate: undefined };
3687
+ }
3688
+ export const ExpenseDuplicate = {
3689
+ encode(message, writer = new BinaryWriter()) {
3690
+ if (message.duplicate !== undefined) {
3691
+ Expense.encode(message.duplicate, writer.uint32(10).fork()).join();
3692
+ }
3693
+ return writer;
3694
+ },
3695
+ decode(input, length) {
3696
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3697
+ const end = length === undefined ? reader.len : reader.pos + length;
3698
+ const message = createBaseExpenseDuplicate();
3699
+ while (reader.pos < end) {
3700
+ const tag = reader.uint32();
3701
+ switch (tag >>> 3) {
3702
+ case 1: {
3703
+ if (tag !== 10) {
3704
+ break;
3705
+ }
3706
+ message.duplicate = Expense.decode(reader, reader.uint32());
3707
+ continue;
3708
+ }
3709
+ }
3710
+ if ((tag & 7) === 4 || tag === 0) {
3711
+ break;
3712
+ }
3713
+ reader.skip(tag & 7);
3714
+ }
3715
+ return message;
3716
+ },
3717
+ create(base) {
3718
+ return ExpenseDuplicate.fromPartial(base ?? {});
3719
+ },
3720
+ fromPartial(object) {
3721
+ const message = createBaseExpenseDuplicate();
3722
+ message.duplicate = (object.duplicate !== undefined && object.duplicate !== null)
3723
+ ? Expense.fromPartial(object.duplicate)
3724
+ : undefined;
3725
+ return message;
3726
+ },
3727
+ };
2560
3728
  function toTimestamp(date) {
2561
3729
  const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
2562
3730
  const nanos = (date.getTime() % 1_000) * 1_000_000;