Debian Codegraph @

go/types/v1/subscription.pb.go

raw symbols SCIP
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // versions:
3 // protoc-gen-go v1.36.5
4 // protoc (unknown)
5 // source: types/v1/subscription.proto
6
7 package typesv1
8
9 import (
10 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
13 reflect "reflect"
14 sync "sync"
15 unsafe "unsafe"
16 )
17
18 const (
19 // Verify that this generated code is sufficiently up-to-date.
20 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
21 // Verify that runtime/protoimpl is sufficiently up-to-date.
22 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
23 )
24
25 type Subscription_Status int32
26
27 const (
28 Subscription_Unknown Subscription_Status = 0
29 Subscription_Active Subscription_Status = 1
30 Subscription_Canceled Subscription_Status = 2
31 Subscription_Incomplete Subscription_Status = 3
32 Subscription_IncompleteExpired Subscription_Status = 4
33 Subscription_PastDue Subscription_Status = 5
34 Subscription_Paused Subscription_Status = 6
35 Subscription_Trialing Subscription_Status = 7
36 Subscription_Unpaid Subscription_Status = 8
37 )
38
39 // Enum value maps for Subscription_Status.
40 var (
41 Subscription_Status_name = map[int32]string{
42 0: "Unknown",
43 1: "Active",
44 2: "Canceled",
45 3: "Incomplete",
46 4: "IncompleteExpired",
47 5: "PastDue",
48 6: "Paused",
49 7: "Trialing",
50 8: "Unpaid",
51 }
52 Subscription_Status_value = map[string]int32{
53 "Unknown": 0,
54 "Active": 1,
55 "Canceled": 2,
56 "Incomplete": 3,
57 "IncompleteExpired": 4,
58 "PastDue": 5,
59 "Paused": 6,
60 "Trialing": 7,
61 "Unpaid": 8,
62 }
63 )
64
65 func (x Subscription_Status) Enum() *Subscription_Status {
66 p := new(Subscription_Status)
67 *p = x
68 return p
69 }
70
71 func (x Subscription_Status) String() string {
72 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
73 }
74
75 func (Subscription_Status) Descriptor() protoreflect.EnumDescriptor {
76 return file_types_v1_subscription_proto_enumTypes[0].Descriptor()
77 }
78
79 func (Subscription_Status) Type() protoreflect.EnumType {
80 return &file_types_v1_subscription_proto_enumTypes[0]
81 }
82
83 func (x Subscription_Status) Number() protoreflect.EnumNumber {
84 return protoreflect.EnumNumber(x)
85 }
86
87 // Deprecated: Use Subscription_Status.Descriptor instead.
88 func (Subscription_Status) EnumDescriptor() ([]byte, []int) {
89 return file_types_v1_subscription_proto_rawDescGZIP(), []int{0, 0}
90 }
91
92 type Subscription struct {
93 state protoimpl.MessageState `protogen:"open.v1"`
94 CreatedAt *timestamppb.Timestamp `protobuf:"bytes,100,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
95 StripeId string `protobuf:"bytes,1,opt,name=stripe_id,json=stripeId,proto3" json:"stripe_id,omitempty"`
96 DefaultPaymentMethod *PaymentMethod `protobuf:"bytes,2,opt,name=default_payment_method,json=defaultPaymentMethod,proto3" json:"default_payment_method,omitempty"`
97 Status Subscription_Status `protobuf:"varint,3,opt,name=status,proto3,enum=types.v1.Subscription_Status" json:"status,omitempty"`
98 CurrentPeriodStartAt *timestamppb.Timestamp `protobuf:"bytes,201,opt,name=current_period_start_at,json=currentPeriodStartAt,proto3" json:"current_period_start_at,omitempty"`
99 CurrentPeriodEndAt *timestamppb.Timestamp `protobuf:"bytes,202,opt,name=current_period_end_at,json=currentPeriodEndAt,proto3" json:"current_period_end_at,omitempty"`
100 CancelAt *timestamppb.Timestamp `protobuf:"bytes,301,opt,name=cancel_at,json=cancelAt,proto3" json:"cancel_at,omitempty"`
101 CanceledAt *timestamppb.Timestamp `protobuf:"bytes,302,opt,name=canceled_at,json=canceledAt,proto3" json:"canceled_at,omitempty"`
102 EndedAt *timestamppb.Timestamp `protobuf:"bytes,401,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"`
103 unknownFields protoimpl.UnknownFields
104 sizeCache protoimpl.SizeCache
105 }
106
107 func (x *Subscription) Reset() {
108 *x = Subscription{}
109 mi := &file_types_v1_subscription_proto_msgTypes[0]
110 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
111 ms.StoreMessageInfo(mi)
112 }
113
114 func (x *Subscription) String() string {
115 return protoimpl.X.MessageStringOf(x)
116 }
117
118 func (*Subscription) ProtoMessage() {}
119
120 func (x *Subscription) ProtoReflect() protoreflect.Message {
121 mi := &file_types_v1_subscription_proto_msgTypes[0]
122 if x != nil {
123 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
124 if ms.LoadMessageInfo() == nil {
125 ms.StoreMessageInfo(mi)
126 }
127 return ms
128 }
129 return mi.MessageOf(x)
130 }
131
132 // Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
133 func (*Subscription) Descriptor() ([]byte, []int) {
134 return file_types_v1_subscription_proto_rawDescGZIP(), []int{0}
135 }
136
137 func (x *Subscription) GetCreatedAt() *timestamppb.Timestamp {
138 if x != nil {
139 return x.CreatedAt
140 }
141 return nil
142 }
143
144 func (x *Subscription) GetStripeId() string {
145 if x != nil {
146 return x.StripeId
147 }
148 return ""
149 }
150
151 func (x *Subscription) GetDefaultPaymentMethod() *PaymentMethod {
152 if x != nil {
153 return x.DefaultPaymentMethod
154 }
155 return nil
156 }
157
158 func (x *Subscription) GetStatus() Subscription_Status {
159 if x != nil {
160 return x.Status
161 }
162 return Subscription_Unknown
163 }
164
165 func (x *Subscription) GetCurrentPeriodStartAt() *timestamppb.Timestamp {
166 if x != nil {
167 return x.CurrentPeriodStartAt
168 }
169 return nil
170 }
171
172 func (x *Subscription) GetCurrentPeriodEndAt() *timestamppb.Timestamp {
173 if x != nil {
174 return x.CurrentPeriodEndAt
175 }
176 return nil
177 }
178
179 func (x *Subscription) GetCancelAt() *timestamppb.Timestamp {
180 if x != nil {
181 return x.CancelAt
182 }
183 return nil
184 }
185
186 func (x *Subscription) GetCanceledAt() *timestamppb.Timestamp {
187 if x != nil {
188 return x.CanceledAt
189 }
190 return nil
191 }
192
193 func (x *Subscription) GetEndedAt() *timestamppb.Timestamp {
194 if x != nil {
195 return x.EndedAt
196 }
197 return nil
198 }
199
200 var File_types_v1_subscription_proto protoreflect.FileDescriptor
201
202 var file_types_v1_subscription_proto_rawDesc = string([]byte{
203 0x0a, 0x1b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63,
204 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x74,
205 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
206 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
207 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f,
208 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
209 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x05, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73,
210 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61,
211 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
212 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
213 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
214 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x5f, 0x69, 0x64,
215 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x49, 0x64,
216 0x12, 0x4d, 0x0a, 0x16, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d,
217 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
218 0x32, 0x17, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d,
219 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75,
220 0x6c, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
221 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
222 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63,
223 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
224 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x52, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
225 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61,
226 0x74, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
227 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
228 0x74, 0x61, 0x6d, 0x70, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72,
229 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x4e, 0x0a, 0x15, 0x63, 0x75,
230 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64,
231 0x5f, 0x61, 0x74, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
232 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
233 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50,
234 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x6e, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x61,
235 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x61, 0x74, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
236 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
237 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63,
238 0x65, 0x6c, 0x41, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64,
239 0x5f, 0x61, 0x74, 0x18, 0xae, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
240 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
241 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64,
242 0x41, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x91,
243 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
244 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
245 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x06, 0x53,
246 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
247 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0c,
248 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a,
249 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11,
250 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65,
251 0x64, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x61, 0x73, 0x74, 0x44, 0x75, 0x65, 0x10, 0x05,
252 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x75, 0x73, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08,
253 0x54, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x6e,
254 0x70, 0x61, 0x69, 0x64, 0x10, 0x08, 0x42, 0x91, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74,
255 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
256 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69,
257 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x6c, 0x6f,
258 0x67, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
259 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58,
260 0x58, 0xaa, 0x02, 0x08, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x54,
261 0x79, 0x70, 0x65, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c,
262 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
263 0x09, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
264 0x6f, 0x33,
265 })
266
267 var (
268 file_types_v1_subscription_proto_rawDescOnce sync.Once
269 file_types_v1_subscription_proto_rawDescData []byte
270 )
271
272 func file_types_v1_subscription_proto_rawDescGZIP() []byte {
273 file_types_v1_subscription_proto_rawDescOnce.Do(func() {
274 file_types_v1_subscription_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_types_v1_subscription_proto_rawDesc), len(file_types_v1_subscription_proto_rawDesc)))
275 })
276 return file_types_v1_subscription_proto_rawDescData
277 }
278
279 var file_types_v1_subscription_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
280 var file_types_v1_subscription_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
281 var file_types_v1_subscription_proto_goTypes = []any{
282 (Subscription_Status)(0), // 0: types.v1.Subscription.Status
283 (*Subscription)(nil), // 1: types.v1.Subscription
284 (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
285 (*PaymentMethod)(nil), // 3: types.v1.PaymentMethod
286 }
287 var file_types_v1_subscription_proto_depIdxs = []int32{
288 2, // 0: types.v1.Subscription.created_at:type_name -> google.protobuf.Timestamp
289 3, // 1: types.v1.Subscription.default_payment_method:type_name -> types.v1.PaymentMethod
290 0, // 2: types.v1.Subscription.status:type_name -> types.v1.Subscription.Status
291 2, // 3: types.v1.Subscription.current_period_start_at:type_name -> google.protobuf.Timestamp
292 2, // 4: types.v1.Subscription.current_period_end_at:type_name -> google.protobuf.Timestamp
293 2, // 5: types.v1.Subscription.cancel_at:type_name -> google.protobuf.Timestamp
294 2, // 6: types.v1.Subscription.canceled_at:type_name -> google.protobuf.Timestamp
295 2, // 7: types.v1.Subscription.ended_at:type_name -> google.protobuf.Timestamp
296 8, // [8:8] is the sub-list for method output_type
297 8, // [8:8] is the sub-list for method input_type
298 8, // [8:8] is the sub-list for extension type_name
299 8, // [8:8] is the sub-list for extension extendee
300 0, // [0:8] is the sub-list for field type_name
301 }
302
303 func init() { file_types_v1_subscription_proto_init() }
304 func file_types_v1_subscription_proto_init() {
305 if File_types_v1_subscription_proto != nil {
306 return
307 }
308 file_types_v1_payment_method_proto_init()
309 type x struct{}
310 out := protoimpl.TypeBuilder{
311 File: protoimpl.DescBuilder{
312 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
313 RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_v1_subscription_proto_rawDesc), len(file_types_v1_subscription_proto_rawDesc)),
314 NumEnums: 1,
315 NumMessages: 1,
316 NumExtensions: 0,
317 NumServices: 0,
318 },
319 GoTypes: file_types_v1_subscription_proto_goTypes,
320 DependencyIndexes: file_types_v1_subscription_proto_depIdxs,
321 EnumInfos: file_types_v1_subscription_proto_enumTypes,
322 MessageInfos: file_types_v1_subscription_proto_msgTypes,
323 }.Build()
324 File_types_v1_subscription_proto = out.File
325 file_types_v1_subscription_proto_goTypes = nil
326 file_types_v1_subscription_proto_depIdxs = nil
327 }