-
Notifications
You must be signed in to change notification settings - Fork 0
/
store_manager.pb.go
2438 lines (2184 loc) · 97.2 KB
/
store_manager.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: api/proto/v1/store_manager.proto
// This document describes the store manager API for NBN23 SwishPay platform.
package _go
import (
_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// SubscriptionType
//
// SubscriptionType represents the type of subscription that a user has purchased.
type SubscriptionType int32
const (
SubscriptionType_SUBSCRIPTION_TYPE_UNSPECIFIED SubscriptionType = 0
// SUBSCRIPTION_TYPE_TRIAL represents a trial subscription.
SubscriptionType_SUBSCRIPTION_TYPE_TRIAL SubscriptionType = 1
// SUBSCRIPTION_TYPE_PREMIUM represents a premium subscription.
SubscriptionType_SUBSCRIPTION_TYPE_PREMIUM SubscriptionType = 2
// SUBSCRIPTION_TYPE_MANUAL_PREMIUM represents a manual premium subscription.
SubscriptionType_SUBSCRIPTION_TYPE_MANUAL_PREMIUM SubscriptionType = 3
// SUBSCRIPTION_TYPE_FREE represents a user with no subscription.
SubscriptionType_SUBSCRIPTION_TYPE_FREE SubscriptionType = 4
)
// Enum value maps for SubscriptionType.
var (
SubscriptionType_name = map[int32]string{
0: "SUBSCRIPTION_TYPE_UNSPECIFIED",
1: "SUBSCRIPTION_TYPE_TRIAL",
2: "SUBSCRIPTION_TYPE_PREMIUM",
3: "SUBSCRIPTION_TYPE_MANUAL_PREMIUM",
4: "SUBSCRIPTION_TYPE_FREE",
}
SubscriptionType_value = map[string]int32{
"SUBSCRIPTION_TYPE_UNSPECIFIED": 0,
"SUBSCRIPTION_TYPE_TRIAL": 1,
"SUBSCRIPTION_TYPE_PREMIUM": 2,
"SUBSCRIPTION_TYPE_MANUAL_PREMIUM": 3,
"SUBSCRIPTION_TYPE_FREE": 4,
}
)
func (x SubscriptionType) Enum() *SubscriptionType {
p := new(SubscriptionType)
*p = x
return p
}
func (x SubscriptionType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SubscriptionType) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_v1_store_manager_proto_enumTypes[0].Descriptor()
}
func (SubscriptionType) Type() protoreflect.EnumType {
return &file_api_proto_v1_store_manager_proto_enumTypes[0]
}
func (x SubscriptionType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SubscriptionType.Descriptor instead.
func (SubscriptionType) EnumDescriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{0}
}
// SubscriptionCode
//
// SubscriptionCode represents the code of the subscription.
type SubscriptionCode int32
const (
SubscriptionCode_SUBSCRIPTION_CODE_UNSPECIFIED SubscriptionCode = 0
// SUBSCRIPTION_CODE_STARTED represents that a subscription has started.
SubscriptionCode_SUBSCRIPTION_CODE_STARTED SubscriptionCode = 1
// SUBSCRIPTION_CODE_RENEWED represents that a subscription has been renewed.
SubscriptionCode_SUBSCRIPTION_CODE_RENEWED SubscriptionCode = 2
// SUBSCRIPTION_CODE_CANCELLED represents that a subscription has been cancelled.
SubscriptionCode_SUBSCRIPTION_CODE_CANCELLED SubscriptionCode = 3
// SUBSCRIPTION_CODE_EXPIRED represents that a subscription has expired.
SubscriptionCode_SUBSCRIPTION_CODE_EXPIRED SubscriptionCode = 4
)
// Enum value maps for SubscriptionCode.
var (
SubscriptionCode_name = map[int32]string{
0: "SUBSCRIPTION_CODE_UNSPECIFIED",
1: "SUBSCRIPTION_CODE_STARTED",
2: "SUBSCRIPTION_CODE_RENEWED",
3: "SUBSCRIPTION_CODE_CANCELLED",
4: "SUBSCRIPTION_CODE_EXPIRED",
}
SubscriptionCode_value = map[string]int32{
"SUBSCRIPTION_CODE_UNSPECIFIED": 0,
"SUBSCRIPTION_CODE_STARTED": 1,
"SUBSCRIPTION_CODE_RENEWED": 2,
"SUBSCRIPTION_CODE_CANCELLED": 3,
"SUBSCRIPTION_CODE_EXPIRED": 4,
}
)
func (x SubscriptionCode) Enum() *SubscriptionCode {
p := new(SubscriptionCode)
*p = x
return p
}
func (x SubscriptionCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SubscriptionCode) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_v1_store_manager_proto_enumTypes[1].Descriptor()
}
func (SubscriptionCode) Type() protoreflect.EnumType {
return &file_api_proto_v1_store_manager_proto_enumTypes[1]
}
func (x SubscriptionCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SubscriptionCode.Descriptor instead.
func (SubscriptionCode) EnumDescriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{1}
}
// SubscriptionProvider
//
// SubscriptionProvider represents the provider of the subscription.
type SubscriptionProvider int32
const (
SubscriptionProvider_SUBSCRIPTION_PROVIDER_UNSPECIFIED SubscriptionProvider = 0
// SUBSCRIPTION_PROVIDER_APPLE represents a subscription purchased through Apple.
SubscriptionProvider_SUBSCRIPTION_PROVIDER_APPLE SubscriptionProvider = 1
// SUBSCRIPTION_PROVIDER_GOOGLE represents a subscription purchased through Google.
SubscriptionProvider_SUBSCRIPTION_PROVIDER_GOOGLE SubscriptionProvider = 2
// SUBSCRIPTION_PROVIDER_STRIPE represents a subscription purchased through Stripe.
SubscriptionProvider_SUBSCRIPTION_PROVIDER_STRIPE SubscriptionProvider = 3
// SUBSCRIPTION_PROVIDER_REDSYS represents a subscription purchased through Redsys.
SubscriptionProvider_SUBSCRIPTION_PROVIDER_REDSYS SubscriptionProvider = 4
)
// Enum value maps for SubscriptionProvider.
var (
SubscriptionProvider_name = map[int32]string{
0: "SUBSCRIPTION_PROVIDER_UNSPECIFIED",
1: "SUBSCRIPTION_PROVIDER_APPLE",
2: "SUBSCRIPTION_PROVIDER_GOOGLE",
3: "SUBSCRIPTION_PROVIDER_STRIPE",
4: "SUBSCRIPTION_PROVIDER_REDSYS",
}
SubscriptionProvider_value = map[string]int32{
"SUBSCRIPTION_PROVIDER_UNSPECIFIED": 0,
"SUBSCRIPTION_PROVIDER_APPLE": 1,
"SUBSCRIPTION_PROVIDER_GOOGLE": 2,
"SUBSCRIPTION_PROVIDER_STRIPE": 3,
"SUBSCRIPTION_PROVIDER_REDSYS": 4,
}
)
func (x SubscriptionProvider) Enum() *SubscriptionProvider {
p := new(SubscriptionProvider)
*p = x
return p
}
func (x SubscriptionProvider) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SubscriptionProvider) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_v1_store_manager_proto_enumTypes[2].Descriptor()
}
func (SubscriptionProvider) Type() protoreflect.EnumType {
return &file_api_proto_v1_store_manager_proto_enumTypes[2]
}
func (x SubscriptionProvider) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SubscriptionProvider.Descriptor instead.
func (SubscriptionProvider) EnumDescriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{2}
}
// SubscriptionCategory
//
// SubscriptionCategory represents the category of the subscription.
type SubscriptionCategory int32
const (
SubscriptionCategory_SUBSCRIPTION_CATEGORY_UNSPECIFIED SubscriptionCategory = 0
// SUBSCRIPTION_CATEGORY_GIFT represents a subscription purchased as a gift.
SubscriptionCategory_SUBSCRIPTION_CATEGORY_GIFT SubscriptionCategory = 1
// SUBSCRIPTION_CATEGORY_GROUP represents a subscription purchased as a group.
SubscriptionCategory_SUBSCRIPTION_CATEGORY_GROUP SubscriptionCategory = 2
)
// Enum value maps for SubscriptionCategory.
var (
SubscriptionCategory_name = map[int32]string{
0: "SUBSCRIPTION_CATEGORY_UNSPECIFIED",
1: "SUBSCRIPTION_CATEGORY_GIFT",
2: "SUBSCRIPTION_CATEGORY_GROUP",
}
SubscriptionCategory_value = map[string]int32{
"SUBSCRIPTION_CATEGORY_UNSPECIFIED": 0,
"SUBSCRIPTION_CATEGORY_GIFT": 1,
"SUBSCRIPTION_CATEGORY_GROUP": 2,
}
)
func (x SubscriptionCategory) Enum() *SubscriptionCategory {
p := new(SubscriptionCategory)
*p = x
return p
}
func (x SubscriptionCategory) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SubscriptionCategory) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_v1_store_manager_proto_enumTypes[3].Descriptor()
}
func (SubscriptionCategory) Type() protoreflect.EnumType {
return &file_api_proto_v1_store_manager_proto_enumTypes[3]
}
func (x SubscriptionCategory) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SubscriptionCategory.Descriptor instead.
func (SubscriptionCategory) EnumDescriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{3}
}
// SubscriptionPayload
//
// SubscriptionPayload represents the payload of a subscription.
type SubscriptionPayload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// product_id is the unique identifier of the product.
ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
// purchase_token is the purchase token of the subscription.
PurchaseToken string `protobuf:"bytes,2,opt,name=purchase_token,json=purchaseToken,proto3" json:"purchase_token,omitempty"`
// provider is the provider of the subscription.
Provider SubscriptionProvider `protobuf:"varint,3,opt,name=provider,proto3,enum=store.manager.v1.SubscriptionProvider" json:"provider,omitempty"`
// purchased_at is the time when the subscription was purchased.
PurchasedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=purchased_at,json=purchasedAt,proto3" json:"purchased_at,omitempty"`
// expires_at is the time when the subscription expires.
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
}
func (x *SubscriptionPayload) Reset() {
*x = SubscriptionPayload{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscriptionPayload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscriptionPayload) ProtoMessage() {}
func (x *SubscriptionPayload) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscriptionPayload.ProtoReflect.Descriptor instead.
func (*SubscriptionPayload) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{0}
}
func (x *SubscriptionPayload) GetProductId() string {
if x != nil {
return x.ProductId
}
return ""
}
func (x *SubscriptionPayload) GetPurchaseToken() string {
if x != nil {
return x.PurchaseToken
}
return ""
}
func (x *SubscriptionPayload) GetProvider() SubscriptionProvider {
if x != nil {
return x.Provider
}
return SubscriptionProvider_SUBSCRIPTION_PROVIDER_UNSPECIFIED
}
func (x *SubscriptionPayload) GetPurchasedAt() *timestamppb.Timestamp {
if x != nil {
return x.PurchasedAt
}
return nil
}
func (x *SubscriptionPayload) GetExpiresAt() *timestamppb.Timestamp {
if x != nil {
return x.ExpiresAt
}
return nil
}
// ProductPayload
//
// ProductPayload represents the payload of a product.
type ProductPayload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// members is the number of members that the subscription has.
Members *int32 `protobuf:"varint,1,opt,name=members,proto3,oneof" json:"members,omitempty"`
// recipients is the list of emails of the recipients of the subscription.
Recipients []string `protobuf:"bytes,3,rep,name=recipients,proto3" json:"recipients,omitempty"`
// owner_id is the unique identifier of the owner of the subscription.
OwnerId *string `protobuf:"bytes,4,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"`
// gifted_id is the unique identifier of the user who gifted the subscription.
GiftedId *string `protobuf:"bytes,5,opt,name=gifted_id,json=giftedId,proto3,oneof" json:"gifted_id,omitempty"`
}
func (x *ProductPayload) Reset() {
*x = ProductPayload{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProductPayload) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProductPayload) ProtoMessage() {}
func (x *ProductPayload) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProductPayload.ProtoReflect.Descriptor instead.
func (*ProductPayload) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{1}
}
func (x *ProductPayload) GetMembers() int32 {
if x != nil && x.Members != nil {
return *x.Members
}
return 0
}
func (x *ProductPayload) GetRecipients() []string {
if x != nil {
return x.Recipients
}
return nil
}
func (x *ProductPayload) GetOwnerId() string {
if x != nil && x.OwnerId != nil {
return *x.OwnerId
}
return ""
}
func (x *ProductPayload) GetGiftedId() string {
if x != nil && x.GiftedId != nil {
return *x.GiftedId
}
return ""
}
// Subscription
//
// Subscription represents a subscription that a user has purchased.
type Subscription struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// user_id is the unique identifier of the user.
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// app_id is the unique identifier of the application.
AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
// type is the type of the subscription.
Type SubscriptionType `protobuf:"varint,3,opt,name=type,proto3,enum=store.manager.v1.SubscriptionType" json:"type,omitempty"`
// code is the code of the subscription.
Code *SubscriptionCode `protobuf:"varint,4,opt,name=code,proto3,enum=store.manager.v1.SubscriptionCode,oneof" json:"code,omitempty"`
// category is the category of the subscription.
Category *SubscriptionCategory `protobuf:"varint,5,opt,name=category,proto3,enum=store.manager.v1.SubscriptionCategory,oneof" json:"category,omitempty"`
// subscription_payload is the payload of the subscription.
SubscriptionPayload *SubscriptionPayload `protobuf:"bytes,6,opt,name=subscription_payload,json=subscriptionPayload,proto3,oneof" json:"subscription_payload,omitempty"`
// product_payload is the payload of the product.
ProductPayload *ProductPayload `protobuf:"bytes,7,opt,name=product_payload,json=productPayload,proto3,oneof" json:"product_payload,omitempty"`
}
func (x *Subscription) Reset() {
*x = Subscription{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Subscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Subscription) ProtoMessage() {}
func (x *Subscription) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{2}
}
func (x *Subscription) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *Subscription) GetAppId() string {
if x != nil {
return x.AppId
}
return ""
}
func (x *Subscription) GetType() SubscriptionType {
if x != nil {
return x.Type
}
return SubscriptionType_SUBSCRIPTION_TYPE_UNSPECIFIED
}
func (x *Subscription) GetCode() SubscriptionCode {
if x != nil && x.Code != nil {
return *x.Code
}
return SubscriptionCode_SUBSCRIPTION_CODE_UNSPECIFIED
}
func (x *Subscription) GetCategory() SubscriptionCategory {
if x != nil && x.Category != nil {
return *x.Category
}
return SubscriptionCategory_SUBSCRIPTION_CATEGORY_UNSPECIFIED
}
func (x *Subscription) GetSubscriptionPayload() *SubscriptionPayload {
if x != nil {
return x.SubscriptionPayload
}
return nil
}
func (x *Subscription) GetProductPayload() *ProductPayload {
if x != nil {
return x.ProductPayload
}
return nil
}
// PrivacyPolicy
//
// PrivacyPolicy represents a privacy policy accepted by the user.
type PrivacyPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// version is the version of the privacy policy.
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// policy_date is the date when the privacy policy was created.
PolicyDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=policy_date,json=policyDate,proto3" json:"policy_date,omitempty"`
// accepted_date is the date when the privacy policy was accepted.
AcceptedDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=accepted_date,json=acceptedDate,proto3" json:"accepted_date,omitempty"`
// business_communications is the acceptance of business communications.
BusinessCommunications bool `protobuf:"varint,4,opt,name=business_communications,json=businessCommunications,proto3" json:"business_communications,omitempty"`
// marketing_segmentation is the acceptance of marketing segmentation.
MarketingSegmentation bool `protobuf:"varint,5,opt,name=marketing_segmentation,json=marketingSegmentation,proto3" json:"marketing_segmentation,omitempty"`
// data_transfer is the acceptance of data transfer.
DataTransfer bool `protobuf:"varint,6,opt,name=data_transfer,json=dataTransfer,proto3" json:"data_transfer,omitempty"`
}
func (x *PrivacyPolicy) Reset() {
*x = PrivacyPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PrivacyPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrivacyPolicy) ProtoMessage() {}
func (x *PrivacyPolicy) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PrivacyPolicy.ProtoReflect.Descriptor instead.
func (*PrivacyPolicy) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{3}
}
func (x *PrivacyPolicy) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *PrivacyPolicy) GetPolicyDate() *timestamppb.Timestamp {
if x != nil {
return x.PolicyDate
}
return nil
}
func (x *PrivacyPolicy) GetAcceptedDate() *timestamppb.Timestamp {
if x != nil {
return x.AcceptedDate
}
return nil
}
func (x *PrivacyPolicy) GetBusinessCommunications() bool {
if x != nil {
return x.BusinessCommunications
}
return false
}
func (x *PrivacyPolicy) GetMarketingSegmentation() bool {
if x != nil {
return x.MarketingSegmentation
}
return false
}
func (x *PrivacyPolicy) GetDataTransfer() bool {
if x != nil {
return x.DataTransfer
}
return false
}
// User
//
// User represents a user of the application.
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// id is the unique identifier of the user.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// email is the email of the user.
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// name is the name of the user.
Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"`
// image is the image URL of the user.
Image *string `protobuf:"bytes,4,opt,name=image,proto3,oneof" json:"image,omitempty"`
// privacy_policies is the list of privacy policies accepted by the user.
PrivacyPolicies []*PrivacyPolicy `protobuf:"bytes,5,rep,name=privacy_policies,json=privacyPolicies,proto3" json:"privacy_policies,omitempty"`
}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{4}
}
func (x *User) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *User) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *User) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *User) GetImage() string {
if x != nil && x.Image != nil {
return *x.Image
}
return ""
}
func (x *User) GetPrivacyPolicies() []*PrivacyPolicy {
if x != nil {
return x.PrivacyPolicies
}
return nil
}
// CreateUserRequest
//
// CreateUserRequest represents a request to create a user.
type CreateUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// user_id is the unique identifier of the user.
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// app_id is the unique identifier of the application.
AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
// email is the email of the user.
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// name is the name of the user.
Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"`
// image is the image URL of the user.
Image *string `protobuf:"bytes,5,opt,name=image,proto3,oneof" json:"image,omitempty"`
}
func (x *CreateUserRequest) Reset() {
*x = CreateUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateUserRequest) ProtoMessage() {}
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{5}
}
func (x *CreateUserRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *CreateUserRequest) GetAppId() string {
if x != nil {
return x.AppId
}
return ""
}
func (x *CreateUserRequest) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *CreateUserRequest) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *CreateUserRequest) GetImage() string {
if x != nil && x.Image != nil {
return *x.Image
}
return ""
}
// ReadUserRequest
//
// ReadUserRequest represents a request to get a user.
type ReadUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// user_id is the unique identifier of the user.
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// app_id is the unique identifier of the application.
AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
}
func (x *ReadUserRequest) Reset() {
*x = ReadUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadUserRequest) ProtoMessage() {}
func (x *ReadUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReadUserRequest.ProtoReflect.Descriptor instead.
func (*ReadUserRequest) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{6}
}
func (x *ReadUserRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *ReadUserRequest) GetAppId() string {
if x != nil {
return x.AppId
}
return ""
}
// UpdateUserRequest
//
// UpdateUserRequest represents a request to update a user.
type UpdateUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// user_id is the unique identifier of the user.
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// app_id is the unique identifier of the application.
AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
// name is the name of the user.
Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"`
// image is the image URL of the user.
Image *string `protobuf:"bytes,5,opt,name=image,proto3,oneof" json:"image,omitempty"`
}
func (x *UpdateUserRequest) Reset() {
*x = UpdateUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateUserRequest) ProtoMessage() {}
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{7}
}
func (x *UpdateUserRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *UpdateUserRequest) GetAppId() string {
if x != nil {
return x.AppId
}
return ""
}
func (x *UpdateUserRequest) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *UpdateUserRequest) GetImage() string {
if x != nil && x.Image != nil {
return *x.Image
}
return ""
}
// DeleteUserRequest
//
// DeleteUserRequest represents a request to delete a user.
type DeleteUserRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// user_id is the unique identifier of the user.
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// app_id is the unique identifier of the application.
AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
}
func (x *DeleteUserRequest) Reset() {
*x = DeleteUserRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteUserRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteUserRequest) ProtoMessage() {}
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_v1_store_manager_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) Descriptor() ([]byte, []int) {
return file_api_proto_v1_store_manager_proto_rawDescGZIP(), []int{8}
}
func (x *DeleteUserRequest) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *DeleteUserRequest) GetAppId() string {