From 396ed5ee61953cbfb116983164937187e21a83d2 Mon Sep 17 00:00:00 2001 From: Laurent Luce Date: Tue, 24 Oct 2023 18:14:50 -0400 Subject: [PATCH] feat: Product and subscription added to the get payment config response (#1606) ## Description: Protobuf changes for https://github.com/kurtosis-tech/kurtosis-cloud-backend/pull/61 ## Is this change user facing? NO --- .../kurtosis_backend_server_api.pb.go | 470 +++++++++++++----- .../kurtosis_backend_server_api.proto | 16 +- 2 files changed, 350 insertions(+), 136 deletions(-) diff --git a/cloud/api/golang/kurtosis_backend_server_rpc_api_bindings/kurtosis_backend_server_api.pb.go b/cloud/api/golang/kurtosis_backend_server_rpc_api_bindings/kurtosis_backend_server_api.pb.go index 28c54b3033..94861bc41a 100644 --- a/cloud/api/golang/kurtosis_backend_server_rpc_api_bindings/kurtosis_backend_server_api.pb.go +++ b/cloud/api/golang/kurtosis_backend_server_rpc_api_bindings/kurtosis_backend_server_api.pb.go @@ -661,20 +661,141 @@ func (x *PaymentMethod) GetLastFour() string { return "" } +type PaymentProduct struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PriceUnitAmount int32 `protobuf:"varint,2,opt,name=price_unit_amount,json=priceUnitAmount,proto3" json:"price_unit_amount,omitempty"` + PriceCurrency string `protobuf:"bytes,3,opt,name=price_currency,json=priceCurrency,proto3" json:"price_currency,omitempty"` + TaxCodeName string `protobuf:"bytes,4,opt,name=tax_code_name,json=taxCodeName,proto3" json:"tax_code_name,omitempty"` +} + +func (x *PaymentProduct) Reset() { + *x = PaymentProduct{} + if protoimpl.UnsafeEnabled { + mi := &file_kurtosis_backend_server_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PaymentProduct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentProduct) ProtoMessage() {} + +func (x *PaymentProduct) ProtoReflect() protoreflect.Message { + mi := &file_kurtosis_backend_server_api_proto_msgTypes[11] + 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 PaymentProduct.ProtoReflect.Descriptor instead. +func (*PaymentProduct) Descriptor() ([]byte, []int) { + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{11} +} + +func (x *PaymentProduct) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PaymentProduct) GetPriceUnitAmount() int32 { + if x != nil { + return x.PriceUnitAmount + } + return 0 +} + +func (x *PaymentProduct) GetPriceCurrency() string { + if x != nil { + return x.PriceCurrency + } + return "" +} + +func (x *PaymentProduct) GetTaxCodeName() string { + if x != nil { + return x.TaxCodeName + } + return "" +} + +type PaymentSubscription struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Product *PaymentProduct `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` +} + +func (x *PaymentSubscription) Reset() { + *x = PaymentSubscription{} + if protoimpl.UnsafeEnabled { + mi := &file_kurtosis_backend_server_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PaymentSubscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentSubscription) ProtoMessage() {} + +func (x *PaymentSubscription) ProtoReflect() protoreflect.Message { + mi := &file_kurtosis_backend_server_api_proto_msgTypes[12] + 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 PaymentSubscription.ProtoReflect.Descriptor instead. +func (*PaymentSubscription) Descriptor() ([]byte, []int) { + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{12} +} + +func (x *PaymentSubscription) GetProduct() *PaymentProduct { + if x != nil { + return x.Product + } + return nil +} + type GetOrCreatePaymentConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` - PaymentMethod *PaymentMethod `protobuf:"bytes,3,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` + PaymentMethod *PaymentMethod `protobuf:"bytes,3,opt,name=payment_method,json=paymentMethod,proto3,oneof" json:"payment_method,omitempty"` + Product *PaymentProduct `protobuf:"bytes,4,opt,name=product,proto3" json:"product,omitempty"` + Subscription *PaymentSubscription `protobuf:"bytes,5,opt,name=subscription,proto3,oneof" json:"subscription,omitempty"` + TrialEnd int32 `protobuf:"varint,6,opt,name=trial_end,json=trialEnd,proto3" json:"trial_end,omitempty"` } func (x *GetOrCreatePaymentConfigResponse) Reset() { *x = GetOrCreatePaymentConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[11] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -687,7 +808,7 @@ func (x *GetOrCreatePaymentConfigResponse) String() string { func (*GetOrCreatePaymentConfigResponse) ProtoMessage() {} func (x *GetOrCreatePaymentConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[11] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -700,7 +821,7 @@ func (x *GetOrCreatePaymentConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOrCreatePaymentConfigResponse.ProtoReflect.Descriptor instead. func (*GetOrCreatePaymentConfigResponse) Descriptor() ([]byte, []int) { - return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{11} + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{13} } func (x *GetOrCreatePaymentConfigResponse) GetUserId() string { @@ -724,6 +845,27 @@ func (x *GetOrCreatePaymentConfigResponse) GetPaymentMethod() *PaymentMethod { return nil } +func (x *GetOrCreatePaymentConfigResponse) GetProduct() *PaymentProduct { + if x != nil { + return x.Product + } + return nil +} + +func (x *GetOrCreatePaymentConfigResponse) GetSubscription() *PaymentSubscription { + if x != nil { + return x.Subscription + } + return nil +} + +func (x *GetOrCreatePaymentConfigResponse) GetTrialEnd() int32 { + if x != nil { + return x.TrialEnd + } + return 0 +} + type RefreshDefaultPaymentMethodArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -736,7 +878,7 @@ type RefreshDefaultPaymentMethodArgs struct { func (x *RefreshDefaultPaymentMethodArgs) Reset() { *x = RefreshDefaultPaymentMethodArgs{} if protoimpl.UnsafeEnabled { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[12] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -749,7 +891,7 @@ func (x *RefreshDefaultPaymentMethodArgs) String() string { func (*RefreshDefaultPaymentMethodArgs) ProtoMessage() {} func (x *RefreshDefaultPaymentMethodArgs) ProtoReflect() protoreflect.Message { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[12] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -762,7 +904,7 @@ func (x *RefreshDefaultPaymentMethodArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshDefaultPaymentMethodArgs.ProtoReflect.Descriptor instead. func (*RefreshDefaultPaymentMethodArgs) Descriptor() ([]byte, []int) { - return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{12} + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{14} } func (x *RefreshDefaultPaymentMethodArgs) GetAccessToken() string { @@ -791,7 +933,7 @@ type AwsKey struct { func (x *AwsKey) Reset() { *x = AwsKey{} if protoimpl.UnsafeEnabled { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[13] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -804,7 +946,7 @@ func (x *AwsKey) String() string { func (*AwsKey) ProtoMessage() {} func (x *AwsKey) ProtoReflect() protoreflect.Message { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[13] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -817,7 +959,7 @@ func (x *AwsKey) ProtoReflect() protoreflect.Message { // Deprecated: Use AwsKey.ProtoReflect.Descriptor instead. func (*AwsKey) Descriptor() ([]byte, []int) { - return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{13} + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{15} } func (x *AwsKey) GetId() string { @@ -849,7 +991,7 @@ type AwsEnvironment struct { func (x *AwsEnvironment) Reset() { *x = AwsEnvironment{} if protoimpl.UnsafeEnabled { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[14] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -862,7 +1004,7 @@ func (x *AwsEnvironment) String() string { func (*AwsEnvironment) ProtoMessage() {} func (x *AwsEnvironment) ProtoReflect() protoreflect.Message { - mi := &file_kurtosis_backend_server_api_proto_msgTypes[14] + mi := &file_kurtosis_backend_server_api_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -875,7 +1017,7 @@ func (x *AwsEnvironment) ProtoReflect() protoreflect.Message { // Deprecated: Use AwsEnvironment.ProtoReflect.Descriptor instead. func (*AwsEnvironment) Descriptor() ([]byte, []int) { - return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{14} + return file_kurtosis_backend_server_api_proto_rawDescGZIP(), []int{16} } func (x *AwsEnvironment) GetAccessKeyId() string { @@ -998,97 +1140,125 @@ var file_kurtosis_backend_server_api_proto_rawDesc = []byte{ 0x08, 0x65, 0x78, 0x70, 0x5f, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x78, 0x70, 0x59, 0x65, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, - 0x74, 0x46, 0x6f, 0x75, 0x72, 0x22, 0xa6, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, - 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x70, - 0x0a, 0x1f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x72, 0x67, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, - 0x22, 0x30, 0x0a, 0x06, 0x41, 0x77, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x22, 0xd4, 0x01, 0x0a, 0x0e, 0x41, 0x77, 0x73, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x32, 0x96, 0x06, 0x0a, 0x1a, 0x4b, 0x75, - 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0b, 0x49, 0x73, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x13, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x2d, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x31, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, + 0x74, 0x46, 0x6f, 0x75, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, + 0x69, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, + 0x22, 0x0a, 0x0d, 0x74, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x13, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6b, 0x75, + 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x22, 0xf4, 0x02, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x48, 0x00, + 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x38, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x0c, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x72, + 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, + 0x72, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x1f, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x72, 0x67, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x22, 0x30, 0x0a, + 0x06, 0x41, 0x77, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, + 0xd4, 0x01, 0x0a, 0x0e, 0x41, 0x77, 0x73, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x32, 0x96, 0x06, 0x0a, 0x1a, 0x4b, 0x75, 0x72, 0x74, 0x6f, + 0x73, 0x69, 0x73, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0b, 0x49, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x2e, + 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x31, 0x2e, 0x6b, + 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x76, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x2e, 0x6b, 0x75, + 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, + 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, 0x2e, 0x6b, 0x75, 0x72, - 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x12, 0x28, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6b, 0x75, - 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x2a, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6b, 0x75, - 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x18, 0x47, 0x65, - 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, - 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2f, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, - 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, + 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x6b, + 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, + 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x2c, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x72, 0x67, + 0x73, 0x1a, 0x30, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x42, 0x5d, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x6b, - 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, - 0x73, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2f, 0x2e, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, + 0x5d, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, + 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x6b, 0x75, 0x72, 0x74, + 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x70, + 0x63, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1103,7 +1273,7 @@ func file_kurtosis_backend_server_api_proto_rawDescGZIP() []byte { return file_kurtosis_backend_server_api_proto_rawDescData } -var file_kurtosis_backend_server_api_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_kurtosis_backend_server_api_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_kurtosis_backend_server_api_proto_goTypes = []interface{}{ (*GetOrCreateApiKeyRequest)(nil), // 0: kurtosis_cloud.GetOrCreateApiKeyRequest (*GetOrCreateApiKeyResponse)(nil), // 1: kurtosis_cloud.GetOrCreateApiKeyResponse @@ -1116,36 +1286,41 @@ var file_kurtosis_backend_server_api_proto_goTypes = []interface{}{ (*GetCloudInstanceConfigResponse)(nil), // 8: kurtosis_cloud.GetCloudInstanceConfigResponse (*GetOrCreatePaymentConfigArgs)(nil), // 9: kurtosis_cloud.GetOrCreatePaymentConfigArgs (*PaymentMethod)(nil), // 10: kurtosis_cloud.PaymentMethod - (*GetOrCreatePaymentConfigResponse)(nil), // 11: kurtosis_cloud.GetOrCreatePaymentConfigResponse - (*RefreshDefaultPaymentMethodArgs)(nil), // 12: kurtosis_cloud.RefreshDefaultPaymentMethodArgs - (*AwsKey)(nil), // 13: kurtosis_cloud.AwsKey - (*AwsEnvironment)(nil), // 14: kurtosis_cloud.AwsEnvironment - (*emptypb.Empty)(nil), // 15: google.protobuf.Empty + (*PaymentProduct)(nil), // 11: kurtosis_cloud.PaymentProduct + (*PaymentSubscription)(nil), // 12: kurtosis_cloud.PaymentSubscription + (*GetOrCreatePaymentConfigResponse)(nil), // 13: kurtosis_cloud.GetOrCreatePaymentConfigResponse + (*RefreshDefaultPaymentMethodArgs)(nil), // 14: kurtosis_cloud.RefreshDefaultPaymentMethodArgs + (*AwsKey)(nil), // 15: kurtosis_cloud.AwsKey + (*AwsEnvironment)(nil), // 16: kurtosis_cloud.AwsEnvironment + (*emptypb.Empty)(nil), // 17: google.protobuf.Empty } var file_kurtosis_backend_server_api_proto_depIdxs = []int32{ 7, // 0: kurtosis_cloud.GetCloudInstanceConfigResponse.launch_result:type_name -> kurtosis_cloud.LaunchResult - 13, // 1: kurtosis_cloud.GetCloudInstanceConfigResponse.user_key:type_name -> kurtosis_cloud.AwsKey - 14, // 2: kurtosis_cloud.GetCloudInstanceConfigResponse.aws_environment:type_name -> kurtosis_cloud.AwsEnvironment - 10, // 3: kurtosis_cloud.GetOrCreatePaymentConfigResponse.payment_method:type_name -> kurtosis_cloud.PaymentMethod - 15, // 4: kurtosis_cloud.KurtosisCloudBackendServer.IsAvailable:input_type -> google.protobuf.Empty - 4, // 5: kurtosis_cloud.KurtosisCloudBackendServer.CreateCloudInstance:input_type -> kurtosis_cloud.CreateCloudInstanceConfigArgs - 6, // 6: kurtosis_cloud.KurtosisCloudBackendServer.GetCloudInstanceConfig:input_type -> kurtosis_cloud.GetCloudInstanceConfigArgs - 0, // 7: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateApiKey:input_type -> kurtosis_cloud.GetOrCreateApiKeyRequest - 2, // 8: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateInstance:input_type -> kurtosis_cloud.GetOrCreateInstanceRequest - 9, // 9: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreatePaymentConfig:input_type -> kurtosis_cloud.GetOrCreatePaymentConfigArgs - 12, // 10: kurtosis_cloud.KurtosisCloudBackendServer.RefreshDefaultPaymentMethod:input_type -> kurtosis_cloud.RefreshDefaultPaymentMethodArgs - 15, // 11: kurtosis_cloud.KurtosisCloudBackendServer.IsAvailable:output_type -> google.protobuf.Empty - 5, // 12: kurtosis_cloud.KurtosisCloudBackendServer.CreateCloudInstance:output_type -> kurtosis_cloud.CreateCloudInstanceConfigResponse - 8, // 13: kurtosis_cloud.KurtosisCloudBackendServer.GetCloudInstanceConfig:output_type -> kurtosis_cloud.GetCloudInstanceConfigResponse - 1, // 14: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateApiKey:output_type -> kurtosis_cloud.GetOrCreateApiKeyResponse - 3, // 15: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateInstance:output_type -> kurtosis_cloud.GetOrCreateInstanceResponse - 11, // 16: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreatePaymentConfig:output_type -> kurtosis_cloud.GetOrCreatePaymentConfigResponse - 15, // 17: kurtosis_cloud.KurtosisCloudBackendServer.RefreshDefaultPaymentMethod:output_type -> google.protobuf.Empty - 11, // [11:18] is the sub-list for method output_type - 4, // [4:11] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 15, // 1: kurtosis_cloud.GetCloudInstanceConfigResponse.user_key:type_name -> kurtosis_cloud.AwsKey + 16, // 2: kurtosis_cloud.GetCloudInstanceConfigResponse.aws_environment:type_name -> kurtosis_cloud.AwsEnvironment + 11, // 3: kurtosis_cloud.PaymentSubscription.product:type_name -> kurtosis_cloud.PaymentProduct + 10, // 4: kurtosis_cloud.GetOrCreatePaymentConfigResponse.payment_method:type_name -> kurtosis_cloud.PaymentMethod + 11, // 5: kurtosis_cloud.GetOrCreatePaymentConfigResponse.product:type_name -> kurtosis_cloud.PaymentProduct + 12, // 6: kurtosis_cloud.GetOrCreatePaymentConfigResponse.subscription:type_name -> kurtosis_cloud.PaymentSubscription + 17, // 7: kurtosis_cloud.KurtosisCloudBackendServer.IsAvailable:input_type -> google.protobuf.Empty + 4, // 8: kurtosis_cloud.KurtosisCloudBackendServer.CreateCloudInstance:input_type -> kurtosis_cloud.CreateCloudInstanceConfigArgs + 6, // 9: kurtosis_cloud.KurtosisCloudBackendServer.GetCloudInstanceConfig:input_type -> kurtosis_cloud.GetCloudInstanceConfigArgs + 0, // 10: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateApiKey:input_type -> kurtosis_cloud.GetOrCreateApiKeyRequest + 2, // 11: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateInstance:input_type -> kurtosis_cloud.GetOrCreateInstanceRequest + 9, // 12: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreatePaymentConfig:input_type -> kurtosis_cloud.GetOrCreatePaymentConfigArgs + 14, // 13: kurtosis_cloud.KurtosisCloudBackendServer.RefreshDefaultPaymentMethod:input_type -> kurtosis_cloud.RefreshDefaultPaymentMethodArgs + 17, // 14: kurtosis_cloud.KurtosisCloudBackendServer.IsAvailable:output_type -> google.protobuf.Empty + 5, // 15: kurtosis_cloud.KurtosisCloudBackendServer.CreateCloudInstance:output_type -> kurtosis_cloud.CreateCloudInstanceConfigResponse + 8, // 16: kurtosis_cloud.KurtosisCloudBackendServer.GetCloudInstanceConfig:output_type -> kurtosis_cloud.GetCloudInstanceConfigResponse + 1, // 17: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateApiKey:output_type -> kurtosis_cloud.GetOrCreateApiKeyResponse + 3, // 18: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreateInstance:output_type -> kurtosis_cloud.GetOrCreateInstanceResponse + 13, // 19: kurtosis_cloud.KurtosisCloudBackendServer.GetOrCreatePaymentConfig:output_type -> kurtosis_cloud.GetOrCreatePaymentConfigResponse + 17, // 20: kurtosis_cloud.KurtosisCloudBackendServer.RefreshDefaultPaymentMethod:output_type -> google.protobuf.Empty + 14, // [14:21] is the sub-list for method output_type + 7, // [7:14] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_kurtosis_backend_server_api_proto_init() } @@ -1287,7 +1462,7 @@ func file_kurtosis_backend_server_api_proto_init() { } } file_kurtosis_backend_server_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrCreatePaymentConfigResponse); i { + switch v := v.(*PaymentProduct); i { case 0: return &v.state case 1: @@ -1299,7 +1474,7 @@ func file_kurtosis_backend_server_api_proto_init() { } } file_kurtosis_backend_server_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshDefaultPaymentMethodArgs); i { + switch v := v.(*PaymentSubscription); i { case 0: return &v.state case 1: @@ -1311,7 +1486,7 @@ func file_kurtosis_backend_server_api_proto_init() { } } file_kurtosis_backend_server_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AwsKey); i { + switch v := v.(*GetOrCreatePaymentConfigResponse); i { case 0: return &v.state case 1: @@ -1323,6 +1498,30 @@ func file_kurtosis_backend_server_api_proto_init() { } } file_kurtosis_backend_server_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshDefaultPaymentMethodArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kurtosis_backend_server_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AwsKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kurtosis_backend_server_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AwsEnvironment); i { case 0: return &v.state @@ -1336,13 +1535,14 @@ func file_kurtosis_backend_server_api_proto_init() { } } file_kurtosis_backend_server_api_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_kurtosis_backend_server_api_proto_msgTypes[13].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_kurtosis_backend_server_api_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/cloud/api/protobuf/kurtosis_backend_server_api.proto b/cloud/api/protobuf/kurtosis_backend_server_api.proto index d3c1855283..ecf73eeb0c 100644 --- a/cloud/api/protobuf/kurtosis_backend_server_api.proto +++ b/cloud/api/protobuf/kurtosis_backend_server_api.proto @@ -80,10 +80,24 @@ message PaymentMethod { string last_four = 3; } +message PaymentProduct { + string name = 1; + int32 price_unit_amount = 2; + string price_currency = 3; + string tax_code_name = 4; +} + +message PaymentSubscription { + PaymentProduct product = 1; +} + message GetOrCreatePaymentConfigResponse { string user_id = 1; string client_secret = 2; - PaymentMethod payment_method = 3; + optional PaymentMethod payment_method = 3; + PaymentProduct product = 4; + optional PaymentSubscription subscription = 5; + int32 trial_end = 6; } message RefreshDefaultPaymentMethodArgs {