diff --git a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go index 6e6535c709..42ba877e05 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.go @@ -1999,8 +1999,11 @@ type GetSystemInformationResponse struct { // The Go compiler flag that was used to build this version of Neosync Compiler string `protobuf:"bytes,3,opt,name=compiler,proto3" json:"compiler,omitempty"` // The Go platform flag that was used to build this version of Neosync - Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` + Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` + // The time when the build was created BuildDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"` + // The license information for the system + License *SystemLicense `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"` } func (x *GetSystemInformationResponse) Reset() { @@ -2068,6 +2071,77 @@ func (x *GetSystemInformationResponse) GetBuildDate() *timestamppb.Timestamp { return nil } +func (x *GetSystemInformationResponse) GetLicense() *SystemLicense { + if x != nil { + return x.License + } + return nil +} + +type SystemLicense struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether or not a valid license was found + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` + // The time when the license expires + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + // Whether or not the license is for NeosyncCloud + IsNeosyncCloud bool `protobuf:"varint,3,opt,name=is_neosync_cloud,json=isNeosyncCloud,proto3" json:"is_neosync_cloud,omitempty"` +} + +func (x *SystemLicense) Reset() { + *x = SystemLicense{} + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SystemLicense) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemLicense) ProtoMessage() {} + +func (x *SystemLicense) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemLicense.ProtoReflect.Descriptor instead. +func (*SystemLicense) Descriptor() ([]byte, []int) { + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{36} +} + +func (x *SystemLicense) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +func (x *SystemLicense) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *SystemLicense) GetIsNeosyncCloud() bool { + if x != nil { + return x.IsNeosyncCloud + } + return false +} + type GetAccountOnboardingConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2078,7 +2152,7 @@ type GetAccountOnboardingConfigRequest struct { func (x *GetAccountOnboardingConfigRequest) Reset() { *x = GetAccountOnboardingConfigRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2090,7 +2164,7 @@ func (x *GetAccountOnboardingConfigRequest) String() string { func (*GetAccountOnboardingConfigRequest) ProtoMessage() {} func (x *GetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[36] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2103,7 +2177,7 @@ func (x *GetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetAccountOnboardingConfigRequest.ProtoReflect.Descriptor instead. func (*GetAccountOnboardingConfigRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{36} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{37} } func (x *GetAccountOnboardingConfigRequest) GetAccountId() string { @@ -2123,7 +2197,7 @@ type GetAccountOnboardingConfigResponse struct { func (x *GetAccountOnboardingConfigResponse) Reset() { *x = GetAccountOnboardingConfigResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2135,7 +2209,7 @@ func (x *GetAccountOnboardingConfigResponse) String() string { func (*GetAccountOnboardingConfigResponse) ProtoMessage() {} func (x *GetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[37] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2148,7 +2222,7 @@ func (x *GetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetAccountOnboardingConfigResponse.ProtoReflect.Descriptor instead. func (*GetAccountOnboardingConfigResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{37} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{38} } func (x *GetAccountOnboardingConfigResponse) GetConfig() *AccountOnboardingConfig { @@ -2169,7 +2243,7 @@ type SetAccountOnboardingConfigRequest struct { func (x *SetAccountOnboardingConfigRequest) Reset() { *x = SetAccountOnboardingConfigRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2181,7 +2255,7 @@ func (x *SetAccountOnboardingConfigRequest) String() string { func (*SetAccountOnboardingConfigRequest) ProtoMessage() {} func (x *SetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[38] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2194,7 +2268,7 @@ func (x *SetAccountOnboardingConfigRequest) ProtoReflect() protoreflect.Message // Deprecated: Use SetAccountOnboardingConfigRequest.ProtoReflect.Descriptor instead. func (*SetAccountOnboardingConfigRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{38} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{39} } func (x *SetAccountOnboardingConfigRequest) GetAccountId() string { @@ -2221,7 +2295,7 @@ type SetAccountOnboardingConfigResponse struct { func (x *SetAccountOnboardingConfigResponse) Reset() { *x = SetAccountOnboardingConfigResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2233,7 +2307,7 @@ func (x *SetAccountOnboardingConfigResponse) String() string { func (*SetAccountOnboardingConfigResponse) ProtoMessage() {} func (x *SetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[39] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2246,7 +2320,7 @@ func (x *SetAccountOnboardingConfigResponse) ProtoReflect() protoreflect.Message // Deprecated: Use SetAccountOnboardingConfigResponse.ProtoReflect.Descriptor instead. func (*SetAccountOnboardingConfigResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{39} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{40} } func (x *SetAccountOnboardingConfigResponse) GetConfig() *AccountOnboardingConfig { @@ -2266,7 +2340,7 @@ type AccountOnboardingConfig struct { func (x *AccountOnboardingConfig) Reset() { *x = AccountOnboardingConfig{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2278,7 +2352,7 @@ func (x *AccountOnboardingConfig) String() string { func (*AccountOnboardingConfig) ProtoMessage() {} func (x *AccountOnboardingConfig) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[40] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2291,7 +2365,7 @@ func (x *AccountOnboardingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountOnboardingConfig.ProtoReflect.Descriptor instead. func (*AccountOnboardingConfig) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{40} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{41} } func (x *AccountOnboardingConfig) GetHasCompletedOnboarding() bool { @@ -2311,7 +2385,7 @@ type GetAccountStatusRequest struct { func (x *GetAccountStatusRequest) Reset() { *x = GetAccountStatusRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2323,7 +2397,7 @@ func (x *GetAccountStatusRequest) String() string { func (*GetAccountStatusRequest) ProtoMessage() {} func (x *GetAccountStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[41] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2336,7 +2410,7 @@ func (x *GetAccountStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountStatusRequest.ProtoReflect.Descriptor instead. func (*GetAccountStatusRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{41} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{42} } func (x *GetAccountStatusRequest) GetAccountId() string { @@ -2362,7 +2436,7 @@ type GetAccountStatusResponse struct { func (x *GetAccountStatusResponse) Reset() { *x = GetAccountStatusResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2374,7 +2448,7 @@ func (x *GetAccountStatusResponse) String() string { func (*GetAccountStatusResponse) ProtoMessage() {} func (x *GetAccountStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[42] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2387,7 +2461,7 @@ func (x *GetAccountStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountStatusResponse.ProtoReflect.Descriptor instead. func (*GetAccountStatusResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{42} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{43} } func (x *GetAccountStatusResponse) GetUsedRecordCount() uint64 { @@ -2423,7 +2497,7 @@ type IsAccountStatusValidRequest struct { func (x *IsAccountStatusValidRequest) Reset() { *x = IsAccountStatusValidRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2435,7 +2509,7 @@ func (x *IsAccountStatusValidRequest) String() string { func (*IsAccountStatusValidRequest) ProtoMessage() {} func (x *IsAccountStatusValidRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[43] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2448,7 +2522,7 @@ func (x *IsAccountStatusValidRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IsAccountStatusValidRequest.ProtoReflect.Descriptor instead. func (*IsAccountStatusValidRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{43} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{44} } func (x *IsAccountStatusValidRequest) GetAccountId() string { @@ -2483,7 +2557,7 @@ type IsAccountStatusValidResponse struct { func (x *IsAccountStatusValidResponse) Reset() { *x = IsAccountStatusValidResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2495,7 +2569,7 @@ func (x *IsAccountStatusValidResponse) String() string { func (*IsAccountStatusValidResponse) ProtoMessage() {} func (x *IsAccountStatusValidResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[44] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2508,7 +2582,7 @@ func (x *IsAccountStatusValidResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IsAccountStatusValidResponse.ProtoReflect.Descriptor instead. func (*IsAccountStatusValidResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{44} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{45} } func (x *IsAccountStatusValidResponse) GetIsValid() bool { @@ -2556,7 +2630,7 @@ type GetAccountBillingCheckoutSessionRequest struct { func (x *GetAccountBillingCheckoutSessionRequest) Reset() { *x = GetAccountBillingCheckoutSessionRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2568,7 +2642,7 @@ func (x *GetAccountBillingCheckoutSessionRequest) String() string { func (*GetAccountBillingCheckoutSessionRequest) ProtoMessage() {} func (x *GetAccountBillingCheckoutSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[45] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2581,7 +2655,7 @@ func (x *GetAccountBillingCheckoutSessionRequest) ProtoReflect() protoreflect.Me // Deprecated: Use GetAccountBillingCheckoutSessionRequest.ProtoReflect.Descriptor instead. func (*GetAccountBillingCheckoutSessionRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{45} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{46} } func (x *GetAccountBillingCheckoutSessionRequest) GetAccountId() string { @@ -2602,7 +2676,7 @@ type GetAccountBillingCheckoutSessionResponse struct { func (x *GetAccountBillingCheckoutSessionResponse) Reset() { *x = GetAccountBillingCheckoutSessionResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2614,7 +2688,7 @@ func (x *GetAccountBillingCheckoutSessionResponse) String() string { func (*GetAccountBillingCheckoutSessionResponse) ProtoMessage() {} func (x *GetAccountBillingCheckoutSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[46] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2627,7 +2701,7 @@ func (x *GetAccountBillingCheckoutSessionResponse) ProtoReflect() protoreflect.M // Deprecated: Use GetAccountBillingCheckoutSessionResponse.ProtoReflect.Descriptor instead. func (*GetAccountBillingCheckoutSessionResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{46} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{47} } func (x *GetAccountBillingCheckoutSessionResponse) GetCheckoutSessionUrl() string { @@ -2647,7 +2721,7 @@ type GetAccountBillingPortalSessionRequest struct { func (x *GetAccountBillingPortalSessionRequest) Reset() { *x = GetAccountBillingPortalSessionRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2659,7 +2733,7 @@ func (x *GetAccountBillingPortalSessionRequest) String() string { func (*GetAccountBillingPortalSessionRequest) ProtoMessage() {} func (x *GetAccountBillingPortalSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[47] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2672,7 +2746,7 @@ func (x *GetAccountBillingPortalSessionRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use GetAccountBillingPortalSessionRequest.ProtoReflect.Descriptor instead. func (*GetAccountBillingPortalSessionRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{47} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{48} } func (x *GetAccountBillingPortalSessionRequest) GetAccountId() string { @@ -2693,7 +2767,7 @@ type GetAccountBillingPortalSessionResponse struct { func (x *GetAccountBillingPortalSessionResponse) Reset() { *x = GetAccountBillingPortalSessionResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2705,7 +2779,7 @@ func (x *GetAccountBillingPortalSessionResponse) String() string { func (*GetAccountBillingPortalSessionResponse) ProtoMessage() {} func (x *GetAccountBillingPortalSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[48] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2718,7 +2792,7 @@ func (x *GetAccountBillingPortalSessionResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use GetAccountBillingPortalSessionResponse.ProtoReflect.Descriptor instead. func (*GetAccountBillingPortalSessionResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{48} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{49} } func (x *GetAccountBillingPortalSessionResponse) GetPortalSessionUrl() string { @@ -2739,7 +2813,7 @@ type GetBillingAccountsRequest struct { func (x *GetBillingAccountsRequest) Reset() { *x = GetBillingAccountsRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2751,7 +2825,7 @@ func (x *GetBillingAccountsRequest) String() string { func (*GetBillingAccountsRequest) ProtoMessage() {} func (x *GetBillingAccountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[49] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2764,7 +2838,7 @@ func (x *GetBillingAccountsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBillingAccountsRequest.ProtoReflect.Descriptor instead. func (*GetBillingAccountsRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{49} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{50} } func (x *GetBillingAccountsRequest) GetAccountIds() []string { @@ -2784,7 +2858,7 @@ type GetBillingAccountsResponse struct { func (x *GetBillingAccountsResponse) Reset() { *x = GetBillingAccountsResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2796,7 +2870,7 @@ func (x *GetBillingAccountsResponse) String() string { func (*GetBillingAccountsResponse) ProtoMessage() {} func (x *GetBillingAccountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[50] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2809,7 +2883,7 @@ func (x *GetBillingAccountsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBillingAccountsResponse.ProtoReflect.Descriptor instead. func (*GetBillingAccountsResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{50} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{51} } func (x *GetBillingAccountsResponse) GetAccounts() []*UserAccount { @@ -2838,7 +2912,7 @@ type SetBillingMeterEventRequest struct { func (x *SetBillingMeterEventRequest) Reset() { *x = SetBillingMeterEventRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2850,7 +2924,7 @@ func (x *SetBillingMeterEventRequest) String() string { func (*SetBillingMeterEventRequest) ProtoMessage() {} func (x *SetBillingMeterEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[51] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2863,7 +2937,7 @@ func (x *SetBillingMeterEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBillingMeterEventRequest.ProtoReflect.Descriptor instead. func (*SetBillingMeterEventRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{51} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{52} } func (x *SetBillingMeterEventRequest) GetAccountId() string { @@ -2909,7 +2983,7 @@ type SetBillingMeterEventResponse struct { func (x *SetBillingMeterEventResponse) Reset() { *x = SetBillingMeterEventResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2921,7 +2995,7 @@ func (x *SetBillingMeterEventResponse) String() string { func (*SetBillingMeterEventResponse) ProtoMessage() {} func (x *SetBillingMeterEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[52] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2934,7 +3008,7 @@ func (x *SetBillingMeterEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBillingMeterEventResponse.ProtoReflect.Descriptor instead. func (*SetBillingMeterEventResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{52} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{53} } type SetUserRoleRequest struct { @@ -2952,7 +3026,7 @@ type SetUserRoleRequest struct { func (x *SetUserRoleRequest) Reset() { *x = SetUserRoleRequest{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2964,7 +3038,7 @@ func (x *SetUserRoleRequest) String() string { func (*SetUserRoleRequest) ProtoMessage() {} func (x *SetUserRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[53] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2977,7 +3051,7 @@ func (x *SetUserRoleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetUserRoleRequest.ProtoReflect.Descriptor instead. func (*SetUserRoleRequest) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{53} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{54} } func (x *SetUserRoleRequest) GetAccountId() string { @@ -3009,7 +3083,7 @@ type SetUserRoleResponse struct { func (x *SetUserRoleResponse) Reset() { *x = SetUserRoleResponse{} - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3021,7 +3095,7 @@ func (x *SetUserRoleResponse) String() string { func (*SetUserRoleResponse) ProtoMessage() {} func (x *SetUserRoleResponse) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[54] + mi := &file_mgmt_v1alpha1_user_account_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3034,7 +3108,7 @@ func (x *SetUserRoleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetUserRoleResponse.ProtoReflect.Descriptor instead. func (*SetUserRoleResponse) Descriptor() ([]byte, []int) { - return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{54} + return file_mgmt_v1alpha1_user_account_proto_rawDescGZIP(), []int{55} } var File_mgmt_v1alpha1_user_account_proto protoreflect.FileDescriptor @@ -3251,7 +3325,7 @@ var file_mgmt_v1alpha1_user_account_proto_rawDesc = []byte{ 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xc3, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, + 0x22, 0xfb, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, @@ -3263,391 +3337,403 @@ var file_mgmt_v1alpha1_user_account_proto_rawDesc = []byte{ 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0x4c, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x21, 0x53, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x69, + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x8f, + 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x6e, 0x65, 0x6f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x69, 0x73, 0x4e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x22, 0x4c, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, + 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, + 0x0a, 0x22, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, 0x21, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x22, 0x53, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x6b, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x68, 0x61, - 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x68, 0x61, - 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, - 0x64, 0x69, 0x6e, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x42, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x6b, 0x0a, 0x17, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x68, 0x61, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x42, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, + 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x00, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x13, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x1b, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x16, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x14, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xb3, 0x02, 0x0a, 0x1c, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, + 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x43, 0x0a, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x49, 0x0a, 0x10, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6c, + 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, + 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x52, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x28, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x50, 0x0a, 0x25, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x26, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x55, 0x72, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x73, 0x22, 0x54, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x42, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, - 0x22, 0xe5, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, - 0x11, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x14, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, - 0x12, 0x4d, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x69, - 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0x17, 0x0a, 0x15, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x1b, 0x49, 0x73, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x39, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb3, 0x02, 0x0a, 0x1c, 0x49, 0x73, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x50, 0x6f, 0x6c, - 0x6c, 0x12, 0x43, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x5f, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0e, - 0x74, 0x72, 0x69, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, - 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, - 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x52, 0x0a, - 0x27, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, - 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x22, 0x5c, 0x0a, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, - 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, - 0x50, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, - 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x22, 0x56, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, - 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x69, - 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0xe2, 0x01, - 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, - 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, - 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, - 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, - 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x92, 0x01, 0x0a, - 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, - 0x4c, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, - 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, 0x45, 0x10, - 0x03, 0x2a, 0xa9, 0x01, 0x0a, 0x0d, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x49, - 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, - 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x42, - 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, - 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x90, 0x02, - 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x25, 0x0a, 0x21, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, + 0x12, 0x26, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1e, 0x0a, 0x1c, + 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, + 0x12, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x2e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, + 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x92, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x53, + 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, + 0x52, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, + 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, 0x45, 0x10, 0x03, 0x2a, 0xa9, 0x01, 0x0a, 0x0d, + 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, + 0x1a, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x49, 0x4c, 0x4c, + 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x42, 0x49, 0x4c, 0x4c, 0x49, 0x4e, 0x47, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x90, 0x02, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x21, 0x41, 0x43, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x2b, 0x0a, 0x27, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x27, 0x0a, + 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, - 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, - 0x49, 0x41, 0x4c, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, - 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, - 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, - 0x10, 0x02, 0x2a, 0x24, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, - 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x2a, 0x26, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, - 0x45, 0x44, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, - 0x2a, 0x9f, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, - 0x0a, 0x12, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, - 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x56, 0x45, 0x4c, - 0x4f, 0x50, 0x45, 0x52, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, - 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x45, - 0x52, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, - 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, - 0x10, 0x04, 0x32, 0xf8, 0x16, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, - 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, - 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x5f, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, + 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x2a, 0x24, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x43, + 0x45, 0x45, 0x44, 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x4d, + 0x49, 0x54, 0x2a, 0x26, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x45, 0x58, 0x43, + 0x45, 0x45, 0x44, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x2a, 0x9f, 0x01, 0x0a, 0x0b, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, + 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, + 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x44, 0x45, 0x56, 0x45, 0x4c, 0x4f, 0x50, 0x45, 0x52, 0x10, 0x02, + 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, + 0x5f, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x45, 0x52, 0x10, 0x03, 0x12, 0x1d, 0x0a, + 0x19, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4a, 0x4f, + 0x42, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xf8, 0x16, 0x0a, + 0x12, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4a, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x25, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, - 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x89, 0x01, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x32, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, - 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, - 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, - 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x49, 0x73, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, - 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x89, 0x01, 0x0a, + 0x1c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, + 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x54, + 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0f, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x53, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, - 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, + 0x67, 0x12, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6f, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x7a, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, - 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x83, 0x01, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x54, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x74, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, + 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x74, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, + 0x1a, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x30, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x6e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, - 0x02, 0x01, 0x12, 0x74, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, + 0x22, 0x00, 0x12, 0x68, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x74, 0x0a, 0x14, + 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, + 0x02, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, + 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x8f, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x61, - 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, - 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, - 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, - 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcc, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, - 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, - 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, - 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, - 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, - 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, - 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x71, 0x0a, 0x14, + 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, + 0x65, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x65, 0x72, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x21, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xcc, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, + 0x63, 0x6c, 0x65, 0x75, 0x73, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x67, 0x6d, 0x74, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x67, 0x6d, 0x74, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x67, 0x6d, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3663,7 +3749,7 @@ func file_mgmt_v1alpha1_user_account_proto_rawDescGZIP() []byte { } var file_mgmt_v1alpha1_user_account_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_mgmt_v1alpha1_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 55) +var file_mgmt_v1alpha1_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 56) var file_mgmt_v1alpha1_user_account_proto_goTypes = []any{ (UserAccountType)(0), // 0: mgmt.v1alpha1.UserAccountType (BillingStatus)(0), // 1: mgmt.v1alpha1.BillingStatus @@ -3705,26 +3791,27 @@ var file_mgmt_v1alpha1_user_account_proto_goTypes = []any{ (*AcceptTeamAccountInviteResponse)(nil), // 37: mgmt.v1alpha1.AcceptTeamAccountInviteResponse (*GetSystemInformationRequest)(nil), // 38: mgmt.v1alpha1.GetSystemInformationRequest (*GetSystemInformationResponse)(nil), // 39: mgmt.v1alpha1.GetSystemInformationResponse - (*GetAccountOnboardingConfigRequest)(nil), // 40: mgmt.v1alpha1.GetAccountOnboardingConfigRequest - (*GetAccountOnboardingConfigResponse)(nil), // 41: mgmt.v1alpha1.GetAccountOnboardingConfigResponse - (*SetAccountOnboardingConfigRequest)(nil), // 42: mgmt.v1alpha1.SetAccountOnboardingConfigRequest - (*SetAccountOnboardingConfigResponse)(nil), // 43: mgmt.v1alpha1.SetAccountOnboardingConfigResponse - (*AccountOnboardingConfig)(nil), // 44: mgmt.v1alpha1.AccountOnboardingConfig - (*GetAccountStatusRequest)(nil), // 45: mgmt.v1alpha1.GetAccountStatusRequest - (*GetAccountStatusResponse)(nil), // 46: mgmt.v1alpha1.GetAccountStatusResponse - (*IsAccountStatusValidRequest)(nil), // 47: mgmt.v1alpha1.IsAccountStatusValidRequest - (*IsAccountStatusValidResponse)(nil), // 48: mgmt.v1alpha1.IsAccountStatusValidResponse - (*GetAccountBillingCheckoutSessionRequest)(nil), // 49: mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest - (*GetAccountBillingCheckoutSessionResponse)(nil), // 50: mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse - (*GetAccountBillingPortalSessionRequest)(nil), // 51: mgmt.v1alpha1.GetAccountBillingPortalSessionRequest - (*GetAccountBillingPortalSessionResponse)(nil), // 52: mgmt.v1alpha1.GetAccountBillingPortalSessionResponse - (*GetBillingAccountsRequest)(nil), // 53: mgmt.v1alpha1.GetBillingAccountsRequest - (*GetBillingAccountsResponse)(nil), // 54: mgmt.v1alpha1.GetBillingAccountsResponse - (*SetBillingMeterEventRequest)(nil), // 55: mgmt.v1alpha1.SetBillingMeterEventRequest - (*SetBillingMeterEventResponse)(nil), // 56: mgmt.v1alpha1.SetBillingMeterEventResponse - (*SetUserRoleRequest)(nil), // 57: mgmt.v1alpha1.SetUserRoleRequest - (*SetUserRoleResponse)(nil), // 58: mgmt.v1alpha1.SetUserRoleResponse - (*timestamppb.Timestamp)(nil), // 59: google.protobuf.Timestamp + (*SystemLicense)(nil), // 40: mgmt.v1alpha1.SystemLicense + (*GetAccountOnboardingConfigRequest)(nil), // 41: mgmt.v1alpha1.GetAccountOnboardingConfigRequest + (*GetAccountOnboardingConfigResponse)(nil), // 42: mgmt.v1alpha1.GetAccountOnboardingConfigResponse + (*SetAccountOnboardingConfigRequest)(nil), // 43: mgmt.v1alpha1.SetAccountOnboardingConfigRequest + (*SetAccountOnboardingConfigResponse)(nil), // 44: mgmt.v1alpha1.SetAccountOnboardingConfigResponse + (*AccountOnboardingConfig)(nil), // 45: mgmt.v1alpha1.AccountOnboardingConfig + (*GetAccountStatusRequest)(nil), // 46: mgmt.v1alpha1.GetAccountStatusRequest + (*GetAccountStatusResponse)(nil), // 47: mgmt.v1alpha1.GetAccountStatusResponse + (*IsAccountStatusValidRequest)(nil), // 48: mgmt.v1alpha1.IsAccountStatusValidRequest + (*IsAccountStatusValidResponse)(nil), // 49: mgmt.v1alpha1.IsAccountStatusValidResponse + (*GetAccountBillingCheckoutSessionRequest)(nil), // 50: mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest + (*GetAccountBillingCheckoutSessionResponse)(nil), // 51: mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse + (*GetAccountBillingPortalSessionRequest)(nil), // 52: mgmt.v1alpha1.GetAccountBillingPortalSessionRequest + (*GetAccountBillingPortalSessionResponse)(nil), // 53: mgmt.v1alpha1.GetAccountBillingPortalSessionResponse + (*GetBillingAccountsRequest)(nil), // 54: mgmt.v1alpha1.GetBillingAccountsRequest + (*GetBillingAccountsResponse)(nil), // 55: mgmt.v1alpha1.GetBillingAccountsResponse + (*SetBillingMeterEventRequest)(nil), // 56: mgmt.v1alpha1.SetBillingMeterEventRequest + (*SetBillingMeterEventResponse)(nil), // 57: mgmt.v1alpha1.SetBillingMeterEventResponse + (*SetUserRoleRequest)(nil), // 58: mgmt.v1alpha1.SetUserRoleRequest + (*SetUserRoleResponse)(nil), // 59: mgmt.v1alpha1.SetUserRoleResponse + (*timestamppb.Timestamp)(nil), // 60: google.protobuf.Timestamp } var file_mgmt_v1alpha1_user_account_proto_depIdxs = []int32{ 10, // 0: mgmt.v1alpha1.GetUserAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount @@ -3735,77 +3822,79 @@ var file_mgmt_v1alpha1_user_account_proto_depIdxs = []int32{ 3, // 5: mgmt.v1alpha1.AccountUser.role:type_name -> mgmt.v1alpha1.AccountRole 24, // 6: mgmt.v1alpha1.GetTeamAccountMembersResponse.users:type_name -> mgmt.v1alpha1.AccountUser 3, // 7: mgmt.v1alpha1.InviteUserToTeamAccountRequest.role:type_name -> mgmt.v1alpha1.AccountRole - 59, // 8: mgmt.v1alpha1.AccountInvite.created_at:type_name -> google.protobuf.Timestamp - 59, // 9: mgmt.v1alpha1.AccountInvite.updated_at:type_name -> google.protobuf.Timestamp - 59, // 10: mgmt.v1alpha1.AccountInvite.expires_at:type_name -> google.protobuf.Timestamp + 60, // 8: mgmt.v1alpha1.AccountInvite.created_at:type_name -> google.protobuf.Timestamp + 60, // 9: mgmt.v1alpha1.AccountInvite.updated_at:type_name -> google.protobuf.Timestamp + 60, // 10: mgmt.v1alpha1.AccountInvite.expires_at:type_name -> google.protobuf.Timestamp 3, // 11: mgmt.v1alpha1.AccountInvite.role:type_name -> mgmt.v1alpha1.AccountRole 30, // 12: mgmt.v1alpha1.InviteUserToTeamAccountResponse.invite:type_name -> mgmt.v1alpha1.AccountInvite 30, // 13: mgmt.v1alpha1.GetTeamAccountInvitesResponse.invites:type_name -> mgmt.v1alpha1.AccountInvite 10, // 14: mgmt.v1alpha1.AcceptTeamAccountInviteResponse.account:type_name -> mgmt.v1alpha1.UserAccount - 59, // 15: mgmt.v1alpha1.GetSystemInformationResponse.build_date:type_name -> google.protobuf.Timestamp - 44, // 16: mgmt.v1alpha1.GetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 44, // 17: mgmt.v1alpha1.SetAccountOnboardingConfigRequest.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 44, // 18: mgmt.v1alpha1.SetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig - 1, // 19: mgmt.v1alpha1.GetAccountStatusResponse.subscription_status:type_name -> mgmt.v1alpha1.BillingStatus - 2, // 20: mgmt.v1alpha1.IsAccountStatusValidResponse.account_status:type_name -> mgmt.v1alpha1.AccountStatus - 59, // 21: mgmt.v1alpha1.IsAccountStatusValidResponse.trial_expires_at:type_name -> google.protobuf.Timestamp - 10, // 22: mgmt.v1alpha1.GetBillingAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount - 3, // 23: mgmt.v1alpha1.SetUserRoleRequest.role:type_name -> mgmt.v1alpha1.AccountRole - 4, // 24: mgmt.v1alpha1.UserAccountService.GetUser:input_type -> mgmt.v1alpha1.GetUserRequest - 6, // 25: mgmt.v1alpha1.UserAccountService.SetUser:input_type -> mgmt.v1alpha1.SetUserRequest - 8, // 26: mgmt.v1alpha1.UserAccountService.GetUserAccounts:input_type -> mgmt.v1alpha1.GetUserAccountsRequest - 13, // 27: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:input_type -> mgmt.v1alpha1.SetPersonalAccountRequest - 11, // 28: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:input_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest - 22, // 29: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:input_type -> mgmt.v1alpha1.CreateTeamAccountRequest - 15, // 30: mgmt.v1alpha1.UserAccountService.IsUserInAccount:input_type -> mgmt.v1alpha1.IsUserInAccountRequest - 17, // 31: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:input_type -> mgmt.v1alpha1.GetAccountTemporalConfigRequest - 19, // 32: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:input_type -> mgmt.v1alpha1.SetAccountTemporalConfigRequest - 25, // 33: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:input_type -> mgmt.v1alpha1.GetTeamAccountMembersRequest - 27, // 34: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:input_type -> mgmt.v1alpha1.RemoveTeamAccountMemberRequest - 29, // 35: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:input_type -> mgmt.v1alpha1.InviteUserToTeamAccountRequest - 32, // 36: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:input_type -> mgmt.v1alpha1.GetTeamAccountInvitesRequest - 34, // 37: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:input_type -> mgmt.v1alpha1.RemoveTeamAccountInviteRequest - 36, // 38: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:input_type -> mgmt.v1alpha1.AcceptTeamAccountInviteRequest - 38, // 39: mgmt.v1alpha1.UserAccountService.GetSystemInformation:input_type -> mgmt.v1alpha1.GetSystemInformationRequest - 40, // 40: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.GetAccountOnboardingConfigRequest - 42, // 41: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.SetAccountOnboardingConfigRequest - 45, // 42: mgmt.v1alpha1.UserAccountService.GetAccountStatus:input_type -> mgmt.v1alpha1.GetAccountStatusRequest - 47, // 43: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:input_type -> mgmt.v1alpha1.IsAccountStatusValidRequest - 49, // 44: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:input_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest - 51, // 45: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:input_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionRequest - 53, // 46: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:input_type -> mgmt.v1alpha1.GetBillingAccountsRequest - 55, // 47: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:input_type -> mgmt.v1alpha1.SetBillingMeterEventRequest - 57, // 48: mgmt.v1alpha1.UserAccountService.SetUserRole:input_type -> mgmt.v1alpha1.SetUserRoleRequest - 5, // 49: mgmt.v1alpha1.UserAccountService.GetUser:output_type -> mgmt.v1alpha1.GetUserResponse - 7, // 50: mgmt.v1alpha1.UserAccountService.SetUser:output_type -> mgmt.v1alpha1.SetUserResponse - 9, // 51: mgmt.v1alpha1.UserAccountService.GetUserAccounts:output_type -> mgmt.v1alpha1.GetUserAccountsResponse - 14, // 52: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:output_type -> mgmt.v1alpha1.SetPersonalAccountResponse - 12, // 53: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:output_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse - 23, // 54: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:output_type -> mgmt.v1alpha1.CreateTeamAccountResponse - 16, // 55: mgmt.v1alpha1.UserAccountService.IsUserInAccount:output_type -> mgmt.v1alpha1.IsUserInAccountResponse - 18, // 56: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:output_type -> mgmt.v1alpha1.GetAccountTemporalConfigResponse - 20, // 57: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:output_type -> mgmt.v1alpha1.SetAccountTemporalConfigResponse - 26, // 58: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:output_type -> mgmt.v1alpha1.GetTeamAccountMembersResponse - 28, // 59: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:output_type -> mgmt.v1alpha1.RemoveTeamAccountMemberResponse - 31, // 60: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:output_type -> mgmt.v1alpha1.InviteUserToTeamAccountResponse - 33, // 61: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:output_type -> mgmt.v1alpha1.GetTeamAccountInvitesResponse - 35, // 62: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:output_type -> mgmt.v1alpha1.RemoveTeamAccountInviteResponse - 37, // 63: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:output_type -> mgmt.v1alpha1.AcceptTeamAccountInviteResponse - 39, // 64: mgmt.v1alpha1.UserAccountService.GetSystemInformation:output_type -> mgmt.v1alpha1.GetSystemInformationResponse - 41, // 65: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.GetAccountOnboardingConfigResponse - 43, // 66: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.SetAccountOnboardingConfigResponse - 46, // 67: mgmt.v1alpha1.UserAccountService.GetAccountStatus:output_type -> mgmt.v1alpha1.GetAccountStatusResponse - 48, // 68: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:output_type -> mgmt.v1alpha1.IsAccountStatusValidResponse - 50, // 69: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:output_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse - 52, // 70: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:output_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionResponse - 54, // 71: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:output_type -> mgmt.v1alpha1.GetBillingAccountsResponse - 56, // 72: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:output_type -> mgmt.v1alpha1.SetBillingMeterEventResponse - 58, // 73: mgmt.v1alpha1.UserAccountService.SetUserRole:output_type -> mgmt.v1alpha1.SetUserRoleResponse - 49, // [49:74] is the sub-list for method output_type - 24, // [24:49] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 60, // 15: mgmt.v1alpha1.GetSystemInformationResponse.build_date:type_name -> google.protobuf.Timestamp + 40, // 16: mgmt.v1alpha1.GetSystemInformationResponse.license:type_name -> mgmt.v1alpha1.SystemLicense + 60, // 17: mgmt.v1alpha1.SystemLicense.expires_at:type_name -> google.protobuf.Timestamp + 45, // 18: mgmt.v1alpha1.GetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 45, // 19: mgmt.v1alpha1.SetAccountOnboardingConfigRequest.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 45, // 20: mgmt.v1alpha1.SetAccountOnboardingConfigResponse.config:type_name -> mgmt.v1alpha1.AccountOnboardingConfig + 1, // 21: mgmt.v1alpha1.GetAccountStatusResponse.subscription_status:type_name -> mgmt.v1alpha1.BillingStatus + 2, // 22: mgmt.v1alpha1.IsAccountStatusValidResponse.account_status:type_name -> mgmt.v1alpha1.AccountStatus + 60, // 23: mgmt.v1alpha1.IsAccountStatusValidResponse.trial_expires_at:type_name -> google.protobuf.Timestamp + 10, // 24: mgmt.v1alpha1.GetBillingAccountsResponse.accounts:type_name -> mgmt.v1alpha1.UserAccount + 3, // 25: mgmt.v1alpha1.SetUserRoleRequest.role:type_name -> mgmt.v1alpha1.AccountRole + 4, // 26: mgmt.v1alpha1.UserAccountService.GetUser:input_type -> mgmt.v1alpha1.GetUserRequest + 6, // 27: mgmt.v1alpha1.UserAccountService.SetUser:input_type -> mgmt.v1alpha1.SetUserRequest + 8, // 28: mgmt.v1alpha1.UserAccountService.GetUserAccounts:input_type -> mgmt.v1alpha1.GetUserAccountsRequest + 13, // 29: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:input_type -> mgmt.v1alpha1.SetPersonalAccountRequest + 11, // 30: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:input_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest + 22, // 31: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:input_type -> mgmt.v1alpha1.CreateTeamAccountRequest + 15, // 32: mgmt.v1alpha1.UserAccountService.IsUserInAccount:input_type -> mgmt.v1alpha1.IsUserInAccountRequest + 17, // 33: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:input_type -> mgmt.v1alpha1.GetAccountTemporalConfigRequest + 19, // 34: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:input_type -> mgmt.v1alpha1.SetAccountTemporalConfigRequest + 25, // 35: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:input_type -> mgmt.v1alpha1.GetTeamAccountMembersRequest + 27, // 36: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:input_type -> mgmt.v1alpha1.RemoveTeamAccountMemberRequest + 29, // 37: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:input_type -> mgmt.v1alpha1.InviteUserToTeamAccountRequest + 32, // 38: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:input_type -> mgmt.v1alpha1.GetTeamAccountInvitesRequest + 34, // 39: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:input_type -> mgmt.v1alpha1.RemoveTeamAccountInviteRequest + 36, // 40: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:input_type -> mgmt.v1alpha1.AcceptTeamAccountInviteRequest + 38, // 41: mgmt.v1alpha1.UserAccountService.GetSystemInformation:input_type -> mgmt.v1alpha1.GetSystemInformationRequest + 41, // 42: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.GetAccountOnboardingConfigRequest + 43, // 43: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:input_type -> mgmt.v1alpha1.SetAccountOnboardingConfigRequest + 46, // 44: mgmt.v1alpha1.UserAccountService.GetAccountStatus:input_type -> mgmt.v1alpha1.GetAccountStatusRequest + 48, // 45: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:input_type -> mgmt.v1alpha1.IsAccountStatusValidRequest + 50, // 46: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:input_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest + 52, // 47: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:input_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionRequest + 54, // 48: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:input_type -> mgmt.v1alpha1.GetBillingAccountsRequest + 56, // 49: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:input_type -> mgmt.v1alpha1.SetBillingMeterEventRequest + 58, // 50: mgmt.v1alpha1.UserAccountService.SetUserRole:input_type -> mgmt.v1alpha1.SetUserRoleRequest + 5, // 51: mgmt.v1alpha1.UserAccountService.GetUser:output_type -> mgmt.v1alpha1.GetUserResponse + 7, // 52: mgmt.v1alpha1.UserAccountService.SetUser:output_type -> mgmt.v1alpha1.SetUserResponse + 9, // 53: mgmt.v1alpha1.UserAccountService.GetUserAccounts:output_type -> mgmt.v1alpha1.GetUserAccountsResponse + 14, // 54: mgmt.v1alpha1.UserAccountService.SetPersonalAccount:output_type -> mgmt.v1alpha1.SetPersonalAccountResponse + 12, // 55: mgmt.v1alpha1.UserAccountService.ConvertPersonalToTeamAccount:output_type -> mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse + 23, // 56: mgmt.v1alpha1.UserAccountService.CreateTeamAccount:output_type -> mgmt.v1alpha1.CreateTeamAccountResponse + 16, // 57: mgmt.v1alpha1.UserAccountService.IsUserInAccount:output_type -> mgmt.v1alpha1.IsUserInAccountResponse + 18, // 58: mgmt.v1alpha1.UserAccountService.GetAccountTemporalConfig:output_type -> mgmt.v1alpha1.GetAccountTemporalConfigResponse + 20, // 59: mgmt.v1alpha1.UserAccountService.SetAccountTemporalConfig:output_type -> mgmt.v1alpha1.SetAccountTemporalConfigResponse + 26, // 60: mgmt.v1alpha1.UserAccountService.GetTeamAccountMembers:output_type -> mgmt.v1alpha1.GetTeamAccountMembersResponse + 28, // 61: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountMember:output_type -> mgmt.v1alpha1.RemoveTeamAccountMemberResponse + 31, // 62: mgmt.v1alpha1.UserAccountService.InviteUserToTeamAccount:output_type -> mgmt.v1alpha1.InviteUserToTeamAccountResponse + 33, // 63: mgmt.v1alpha1.UserAccountService.GetTeamAccountInvites:output_type -> mgmt.v1alpha1.GetTeamAccountInvitesResponse + 35, // 64: mgmt.v1alpha1.UserAccountService.RemoveTeamAccountInvite:output_type -> mgmt.v1alpha1.RemoveTeamAccountInviteResponse + 37, // 65: mgmt.v1alpha1.UserAccountService.AcceptTeamAccountInvite:output_type -> mgmt.v1alpha1.AcceptTeamAccountInviteResponse + 39, // 66: mgmt.v1alpha1.UserAccountService.GetSystemInformation:output_type -> mgmt.v1alpha1.GetSystemInformationResponse + 42, // 67: mgmt.v1alpha1.UserAccountService.GetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.GetAccountOnboardingConfigResponse + 44, // 68: mgmt.v1alpha1.UserAccountService.SetAccountOnboardingConfig:output_type -> mgmt.v1alpha1.SetAccountOnboardingConfigResponse + 47, // 69: mgmt.v1alpha1.UserAccountService.GetAccountStatus:output_type -> mgmt.v1alpha1.GetAccountStatusResponse + 49, // 70: mgmt.v1alpha1.UserAccountService.IsAccountStatusValid:output_type -> mgmt.v1alpha1.IsAccountStatusValidResponse + 51, // 71: mgmt.v1alpha1.UserAccountService.GetAccountBillingCheckoutSession:output_type -> mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse + 53, // 72: mgmt.v1alpha1.UserAccountService.GetAccountBillingPortalSession:output_type -> mgmt.v1alpha1.GetAccountBillingPortalSessionResponse + 55, // 73: mgmt.v1alpha1.UserAccountService.GetBillingAccounts:output_type -> mgmt.v1alpha1.GetBillingAccountsResponse + 57, // 74: mgmt.v1alpha1.UserAccountService.SetBillingMeterEvent:output_type -> mgmt.v1alpha1.SetBillingMeterEventResponse + 59, // 75: mgmt.v1alpha1.UserAccountService.SetUserRole:output_type -> mgmt.v1alpha1.SetUserRoleResponse + 51, // [51:76] is the sub-list for method output_type + 26, // [26:51] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_mgmt_v1alpha1_user_account_proto_init() } @@ -3817,17 +3906,17 @@ func file_mgmt_v1alpha1_user_account_proto_init() { file_mgmt_v1alpha1_user_account_proto_msgTypes[8].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[19].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[25].OneofWrappers = []any{} - file_mgmt_v1alpha1_user_account_proto_msgTypes[42].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[43].OneofWrappers = []any{} file_mgmt_v1alpha1_user_account_proto_msgTypes[44].OneofWrappers = []any{} - file_mgmt_v1alpha1_user_account_proto_msgTypes[51].OneofWrappers = []any{} + file_mgmt_v1alpha1_user_account_proto_msgTypes[45].OneofWrappers = []any{} + file_mgmt_v1alpha1_user_account_proto_msgTypes[52].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_v1alpha1_user_account_proto_rawDesc, NumEnums: 4, - NumMessages: 55, + NumMessages: 56, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go index d20e7714d1..3a311e35eb 100644 --- a/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go +++ b/backend/gen/go/protos/mgmt/v1alpha1/user_account.pb.json.go @@ -367,6 +367,16 @@ func (msg *GetSystemInformationResponse) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } +// MarshalJSON implements json.Marshaler +func (msg *SystemLicense) MarshalJSON() ([]byte, error) { + return protojson.MarshalOptions{}.Marshal(msg) +} + +// UnmarshalJSON implements json.Unmarshaler +func (msg *SystemLicense) UnmarshalJSON(b []byte) error { + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) +} + // MarshalJSON implements json.Marshaler func (msg *GetAccountOnboardingConfigRequest) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) diff --git a/backend/internal/auth/apikey/client.go b/backend/internal/auth/apikey/client.go index d6849f81c1..bd79ab4e85 100644 --- a/backend/internal/auth/apikey/client.go +++ b/backend/internal/auth/apikey/client.go @@ -11,6 +11,7 @@ import ( db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" "github.com/nucleuscloud/neosync/backend/internal/apikey" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" + "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" "github.com/nucleuscloud/neosync/backend/internal/utils" pkg_utils "github.com/nucleuscloud/neosync/backend/pkg/utils" ) @@ -62,8 +63,10 @@ func (c *Client) InjectTokenCtx(ctx context.Context, header http.Header, spec co token, ) apiKey, err := c.q.GetAccountApiKeyByKeyValue(ctx, c.db, hashedKeyValue) - if err != nil { + if err != nil && !neosyncdb.IsNoRows(err) { return nil, err + } else if err != nil && neosyncdb.IsNoRows(err) { + return nil, InvalidApiKeyErr } if time.Now().After(apiKey.ExpiresAt.Time) { diff --git a/backend/internal/cmds/mgmt/serve/connect/cmd.go b/backend/internal/cmds/mgmt/serve/connect/cmd.go index 8adc3c432f..2626764608 100644 --- a/backend/internal/cmds/mgmt/serve/connect/cmd.go +++ b/backend/internal/cmds/mgmt/serve/connect/cmd.go @@ -481,7 +481,7 @@ func serve(ctx context.Context) error { IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: ncloudlicense.IsValid(), DefaultMaxAllowedRecords: getDefaultMaxAllowedRecords(), - }, db, temporalConfigProvider, authclient, authadminclient, billingClient, rbacclient) + }, db, temporalConfigProvider, authclient, authadminclient, billingClient, rbacclient, cascadelicense) api.Handle( mgmtv1alpha1connect.NewUserAccountServiceHandler( useraccountService, @@ -491,7 +491,7 @@ func serve(ctx context.Context) error { connect.WithRecover(recoverHandler), ), ) - userdataclient := userdata.NewClient(useraccountService, rbacclient) + userdataclient := userdata.NewClient(useraccountService, rbacclient, cascadelicense) apiKeyService := v1alpha1_apikeyservice.New(&v1alpha1_apikeyservice.Config{ IsAuthEnabled: isAuthEnabled, diff --git a/backend/internal/ee/rbac/policy.go b/backend/internal/ee/rbac/policy.go index 72053fc0c0..03c5ca4aee 100644 --- a/backend/internal/ee/rbac/policy.go +++ b/backend/internal/ee/rbac/policy.go @@ -328,7 +328,7 @@ func (r *Rbac) EnforceJob( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s job", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s job", action)) } return nil } @@ -355,7 +355,7 @@ func (r *Rbac) EnforceConnection( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s connection", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s connection", action)) } return nil } @@ -380,7 +380,7 @@ func (r *Rbac) EnforceAccount( return err } if !ok { - return nucleuserrors.NewForbidden(fmt.Sprintf("user does not have permission to %s account", action)) + return nucleuserrors.NewUnauthorized(fmt.Sprintf("user does not have permission to %s account", action)) } return nil } diff --git a/backend/internal/errors/errors.go b/backend/internal/errors/errors.go index 1df913067e..7a4a173e9c 100644 --- a/backend/internal/errors/errors.go +++ b/backend/internal/errors/errors.go @@ -37,17 +37,17 @@ func NewAlreadyExists(message string) error { return connect.NewError(connect.CodeAlreadyExists, errors.New(message)) } +// Identical to NewUnauthorized func NewForbidden(message string) error { - return connect.NewError(connect.CodePermissionDenied, errors.New(message)) + return NewUnauthorized(message) } func NewUnauthenticated(message string) error { return connect.NewError(connect.CodeUnauthenticated, errors.New(message)) } -// Identical to NewUnauthenticated func NewUnauthorized(message string) error { - return NewUnauthenticated(message) + return connect.NewError(connect.CodePermissionDenied, errors.New(message)) } func NewNotImplemented(message string) error { diff --git a/backend/internal/userdata/client.go b/backend/internal/userdata/client.go index a2f53581e1..ff3c5f4ea3 100644 --- a/backend/internal/userdata/client.go +++ b/backend/internal/userdata/client.go @@ -9,6 +9,7 @@ import ( auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type UserServiceClient interface { @@ -19,6 +20,7 @@ type UserServiceClient interface { type Client struct { userServiceClient UserServiceClient enforcer rbac.EntityEnforcer + license license.EEInterface } type Interface interface { @@ -32,10 +34,12 @@ type GetUserResponse struct { func NewClient( userServiceClient UserServiceClient, enforcer rbac.EntityEnforcer, + eeLicense license.EEInterface, ) *Client { return &Client{ userServiceClient: userServiceClient, enforcer: enforcer, + license: eeLicense, } } @@ -55,12 +59,13 @@ func (c *Client) GetUser(ctx context.Context) (*User, error) { id: pguuid, apiKeyData: apiKeyData, userAccountServiceClient: c.userServiceClient, + license: c.license, } user.EntityEnforcer = &UserEntityEnforcer{ enforcer: c.enforcer, user: rbac.NewUserIdEntity(resp.Msg.GetUserId()), enforceAccountAccess: func(ctx context.Context, accountId string) error { - return EnforceAccountAccess(ctx, user, accountId) + return enforceAccountAccess(ctx, user, accountId) }, isApiKey: user.IsApiKey(), } diff --git a/backend/internal/userdata/user.go b/backend/internal/userdata/user.go index 70fc1d157e..ee1edb5be0 100644 --- a/backend/internal/userdata/user.go +++ b/backend/internal/userdata/user.go @@ -11,6 +11,7 @@ import ( auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type UserAccountServiceClient interface { @@ -25,6 +26,8 @@ type User struct { userAccountServiceClient UserAccountServiceClient EntityEnforcer + + license license.EEInterface } func (u *User) Id() string { @@ -42,7 +45,39 @@ func (u *User) IsApiKey() bool { return u.apiKeyData != nil } -func EnforceAccountAccess(ctx context.Context, user *User, accountId string) error { +func (u *User) EnforceAccountAccess(ctx context.Context, accountId string) error { + return enforceAccountAccess(ctx, u, accountId) +} + +func (u *User) EnforceLicense(ctx context.Context, accountId string) error { + ok, err := u.IsLicensed(ctx, accountId) + if err != nil { + return err + } + if !ok { + return nucleuserrors.NewUnauthorized("account does not have an active license") + } + return nil +} + +func (u *User) IsLicensed(ctx context.Context, accountId string) (bool, error) { + if err := u.EnforceAccountAccess(ctx, accountId); err != nil { + return false, err + } + + // todo: check account type for Neosync Cloud Cloud? + // if: personal, then check if free trial is active + // if: pro, then no? or maybe still do a trial check? + // if: enterprise, then check for valid license + + if u.license == nil { + return false, nil + } + + return u.license.IsValid(), nil +} + +func enforceAccountAccess(ctx context.Context, user *User, accountId string) error { if user.IsApiKey() { if user.IsWorkerApiKey() { return nil @@ -50,7 +85,7 @@ func EnforceAccountAccess(ctx context.Context, user *User, accountId string) err // We first want to check to make sure the api key is valid and that it says it's in the account // However, we still want to make a DB request to ensure the DB still says it's in the account if user.apiKeyData.ApiKey == nil || neosyncdb.UUIDString(user.apiKeyData.ApiKey.AccountID) != accountId { - return nucleuserrors.NewForbidden("api key is not valid for account") + return nucleuserrors.NewUnauthorized("api key is not valid for account") } } @@ -60,7 +95,7 @@ func EnforceAccountAccess(ctx context.Context, user *User, accountId string) err return fmt.Errorf("unable to check if user is in account: %w", err) } if !inAccountResp.Msg.GetOk() { - return nucleuserrors.NewForbidden("user is not in account") + return nucleuserrors.NewUnauthorized("user is not in account") } return nil } diff --git a/backend/pkg/integration-test/clients.go b/backend/pkg/integration-test/clients.go new file mode 100644 index 0000000000..a33810a1b0 --- /dev/null +++ b/backend/pkg/integration-test/clients.go @@ -0,0 +1,75 @@ +package integrationtests_test + +import ( + "net/http" + + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + http_client "github.com/nucleuscloud/neosync/internal/http/client" +) + +type NeosyncClients struct { + httpUrl string +} + +func newNeosyncClients(httpUrl string) *NeosyncClients { + return &NeosyncClients{ + httpUrl: httpUrl, + } +} + +type clientConfig struct { + userId string +} + +type ClientConfigOption func(*clientConfig) + +func WithUserId(userId string) ClientConfigOption { + return func(c *clientConfig) { + c.userId = userId + } +} + +func (s *NeosyncClients) Users(opts ...ClientConfigOption) mgmtv1alpha1connect.UserAccountServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewUserAccountServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Connections(opts ...ClientConfigOption) mgmtv1alpha1connect.ConnectionServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewConnectionServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Anonymize(opts ...ClientConfigOption) mgmtv1alpha1connect.AnonymizationServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewAnonymizationServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Jobs(opts ...ClientConfigOption) mgmtv1alpha1connect.JobServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewJobServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) Transformers(opts ...ClientConfigOption) mgmtv1alpha1connect.TransformersServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewTransformersServiceClient(getHttpClient(config), s.httpUrl) +} + +func (s *NeosyncClients) ConnectionData(opts ...ClientConfigOption) mgmtv1alpha1connect.ConnectionDataServiceClient { + config := getHydratedClientConfig(opts...) + return mgmtv1alpha1connect.NewConnectionDataServiceClient(getHttpClient(config), s.httpUrl) +} + +func getHydratedClientConfig(opts ...ClientConfigOption) *clientConfig { + config := &clientConfig{} + for _, opt := range opts { + opt(config) + } + return config +} + +func getHttpClient(config *clientConfig) *http.Client { + if config.userId != "" { + return http_client.WithBearerAuth(&http.Client{}, &config.userId) + } + return &http.Client{} +} diff --git a/backend/pkg/integration-test/integration-test.go b/backend/pkg/integration-test/integration-test.go index 0d448acb5e..097c694163 100644 --- a/backend/pkg/integration-test/integration-test.go +++ b/backend/pkg/integration-test/integration-test.go @@ -7,61 +7,22 @@ import ( "net/http/httptest" "testing" - "connectrpc.com/connect" - "github.com/jackc/pgx/v5/stdlib" db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" - mysql_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/mysql" pg_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/postgresql" - "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" - "github.com/nucleuscloud/neosync/backend/internal/apikey" - auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" auth_client "github.com/nucleuscloud/neosync/backend/internal/auth/client" - auth_jwt "github.com/nucleuscloud/neosync/backend/internal/auth/jwt" "github.com/nucleuscloud/neosync/backend/internal/authmgmt" - auth_interceptor "github.com/nucleuscloud/neosync/backend/internal/connect/interceptors/auth" - jobhooks "github.com/nucleuscloud/neosync/backend/internal/ee/hooks/jobs" - "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" - "github.com/nucleuscloud/neosync/backend/internal/ee/rbac/enforcer" - neosync_gcp "github.com/nucleuscloud/neosync/backend/internal/gcp" - "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" clientmanager "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" - "github.com/nucleuscloud/neosync/backend/internal/userdata" - "github.com/nucleuscloud/neosync/backend/internal/utils" - "github.com/nucleuscloud/neosync/backend/pkg/mongoconnect" - "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" "github.com/nucleuscloud/neosync/backend/pkg/sqlmanager" - v1alpha_anonymizationservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/anonymization-service" - v1alpha1_connectiondataservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-data-service" - v1alpha1_connectionservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-service" - v1alpha1_jobservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/job-service" - v1alpha1_transformersservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/transformers-service" - v1alpha1_useraccountservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/user-account-service" - awsmanager "github.com/nucleuscloud/neosync/internal/aws" "github.com/nucleuscloud/neosync/internal/billing" connectionmanager "github.com/nucleuscloud/neosync/internal/connection-manager" presidioapi "github.com/nucleuscloud/neosync/internal/ee/presidio" - http_client "github.com/nucleuscloud/neosync/internal/http/client" neomigrate "github.com/nucleuscloud/neosync/internal/migrate" promapiv1mock "github.com/nucleuscloud/neosync/internal/mocks/github.com/prometheus/client_golang/api/prometheus/v1" - neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" "github.com/nucleuscloud/neosync/internal/testutil" tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" "github.com/stretchr/testify/mock" ) -var ( - validAuthUser = &authmgmt.User{Name: "foo", Email: "bar", Picture: "baz"} -) - -type UnauthdClients struct { - Users mgmtv1alpha1connect.UserAccountServiceClient - Transformers mgmtv1alpha1connect.TransformersServiceClient - Connections mgmtv1alpha1connect.ConnectionServiceClient - ConnectionData mgmtv1alpha1connect.ConnectionDataServiceClient - Jobs mgmtv1alpha1connect.JobServiceClient - Anonymize mgmtv1alpha1connect.AnonymizationServiceClient -} - type Mocks struct { TemporalClientManager *clientmanager.MockInterface TemporalConfigProvider *clientmanager.MockConfigProvider @@ -87,9 +48,14 @@ type NeosyncApiTestClient struct { httpsrv *httptest.Server - UnauthdClients *UnauthdClients - NeosyncCloudClients *NeosyncCloudClients - AuthdClients *AuthdClients + // OSS, Unauthenticated, Licensed + OSSUnauthenticatedLicensedClients *NeosyncClients + // OSS, Authenticated, Licensed + OSSAuthenticatedLicensedClients *NeosyncClients + // OSS, Unauthenticated, Unlicensed + OSSUnauthenticatedUnlicensedClients *NeosyncClients + // NeoCloud, Authenticated, Licensed + NeosyncCloudAuthenticatedLicensedClients *NeosyncClients Mocks *Mocks } @@ -118,39 +84,6 @@ func WithMigrationsDirectory(directoryPath string) Option { } } -type NeosyncCloudClients struct { - httpsrv *httptest.Server - basepath string -} - -func (s *NeosyncCloudClients) GetUserClient(authUserId string) mgmtv1alpha1connect.UserAccountServiceClient { - return mgmtv1alpha1connect.NewUserAccountServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetConnectionClient(authUserId string) mgmtv1alpha1connect.ConnectionServiceClient { - return mgmtv1alpha1connect.NewConnectionServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetAnonymizeClient(authUserId string) mgmtv1alpha1connect.AnonymizationServiceClient { - return mgmtv1alpha1connect.NewAnonymizationServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -func (s *NeosyncCloudClients) GetJobClient(authUserId string) mgmtv1alpha1connect.JobServiceClient { - return mgmtv1alpha1connect.NewJobServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+s.basepath) -} - -type AuthdClients struct { - httpsrv *httptest.Server -} - -func (s *AuthdClients) GetUserClient(authUserId string) mgmtv1alpha1connect.UserAccountServiceClient { - return mgmtv1alpha1connect.NewUserAccountServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+"/auth") -} - -func (s *AuthdClients) GetConnectionClient(authUserId string) mgmtv1alpha1connect.ConnectionServiceClient { - return mgmtv1alpha1connect.NewConnectionServiceClient(http_client.WithBearerAuth(&http.Client{}, &authUserId), s.httpsrv.URL+"/auth") -} - func (s *NeosyncApiTestClient) Setup(ctx context.Context, t testing.TB) error { pgcontainer, err := tcpostgres.NewPostgresTestContainer(ctx) if err != nil { @@ -180,253 +113,45 @@ func (s *NeosyncApiTestClient) Setup(ctx context.Context, t testing.TB) error { return err } - permissiveRbacClient := rbac.NewAllowAllClient() + rootmux := http.NewServeMux() - rbacenforcer, err := enforcer.NewActiveEnforcer(ctx, stdlib.OpenDBFromPool(pgcontainer.DB), "neosync_api.casbin_rule") + logger := testutil.GetConcurrentTestLogger(t) + + ossUnauthLicensedMux, err := s.setupOssUnauthenticatedLicensedMux(ctx, pgcontainer, logger) if err != nil { - return fmt.Errorf("unable to create rbac enforcer: %w", err) + return fmt.Errorf("unable to setup oss unauthenticated licensed mux: %w", err) } - rbacenforcer.EnableAutoSave(true) - err = rbacenforcer.LoadPolicy() + rootmux.Handle(openSourceUnauthenticatedLicensedPostfix+"/", http.StripPrefix(openSourceUnauthenticatedLicensedPostfix, ossUnauthLicensedMux)) + + ossAuthLicensedMux, err := s.setupOssLicensedAuthMux(ctx, pgcontainer, logger) if err != nil { - return fmt.Errorf("unable to load rbac policies: %w", err) + return fmt.Errorf("unable to setup oss authenticated licensed mux: %w", err) } - enforcedRbacClient := rbac.New(rbacenforcer) - - maxAllowed := int64(10000) - unauthdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: false, IsNeosyncCloud: false, DefaultMaxAllowedRecords: &maxAllowed}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - nil, // billing client - permissiveRbacClient, // rbac client - ) - unauthdUserClient := userdata.NewClient(unauthdUserService, permissiveRbacClient) - - authdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: true, IsNeosyncCloud: false}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - nil, // billing client - enforcedRbacClient, // rbac client - ) - - sqlmanagerclient := NewTestSqlManagerClient() - - authdUserDataClient := userdata.NewClient(authdUserService, enforcedRbacClient) - - authdConnectionService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - authdUserDataClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - - neoCloudAuthdUserService := v1alpha1_useraccountservice.New( - &v1alpha1_useraccountservice.Config{IsAuthEnabled: true, IsNeosyncCloud: true}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalConfigProvider, - s.Mocks.Authclient, - s.Mocks.Authmanagerclient, - s.Mocks.Billingclient, - enforcedRbacClient, // rbac client - ) - neoCloudUserDataClient := userdata.NewClient(neoCloudAuthdUserService, enforcedRbacClient) - neoCloudAuthdAnonymizeService := v1alpha_anonymizationservice.New( - &v1alpha_anonymizationservice.Config{IsAuthEnabled: true, IsNeosyncCloud: true, IsPresidioEnabled: false}, - nil, // meter - neoCloudUserDataClient, - neoCloudAuthdUserService, - s.Mocks.Presidio.Analyzer, - s.Mocks.Presidio.Anonymizer, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - ) - - neoCloudConnectionService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - neoCloudUserDataClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - neoCloudJobHookService := jobhooks.New( - neosyncdb.New(pgcontainer.DB, db_queries.New()), - neoCloudUserDataClient, - jobhooks.WithEnabled(), - ) - neoCloudJobService := v1alpha1_jobservice.New( - &v1alpha1_jobservice.Config{IsNeosyncCloud: true, IsAuthEnabled: true}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalClientManager, - neoCloudConnectionService, - sqlmanagerclient, - neoCloudJobHookService, - neoCloudUserDataClient, - ) - - unauthdTransformersService := v1alpha1_transformersservice.New( - &v1alpha1_transformersservice.Config{ - IsPresidioEnabled: true, - IsNeosyncCloud: false, - }, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.Presidio.Entities, - unauthdUserClient, - ) - - unauthdConnectionsService := v1alpha1_connectionservice.New( - &v1alpha1_connectionservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - unauthdUserClient, - mongoconnect.NewConnector(), - awsmanager.New(), - sqlmanagerclient, - &sqlconnect.SqlOpenConnector{}, - ) - - unAuthdjobhookService := jobhooks.New( - neosyncdb.New(pgcontainer.DB, db_queries.New()), - unauthdUserClient, - ) - - unauthdJobsService := v1alpha1_jobservice.New( - &v1alpha1_jobservice.Config{}, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - s.Mocks.TemporalClientManager, - unauthdConnectionsService, - sqlmanagerclient, - unAuthdjobhookService, - unauthdUserClient, - ) - - neosynctyperegistry := neosynctypes.NewTypeRegistry(testutil.GetTestLogger(t)) - unauthdConnectionDataService := v1alpha1_connectiondataservice.New( - &v1alpha1_connectiondataservice.Config{}, - unauthdConnectionsService, - unauthdJobsService, - awsmanager.New(), - &sqlconnect.SqlOpenConnector{}, - pg_queries.New(), - mysql_queries.New(), - mongoconnect.NewConnector(), - sqlmanagerclient, - neosync_gcp.NewManager(), - neosynctyperegistry, - ) - - var presAnalyzeClient presidioapi.AnalyzeInterface - var presAnonClient presidioapi.AnonymizeInterface + rootmux.Handle(openSourceAuthenticatedLicensedPostfix+"/", http.StripPrefix(openSourceAuthenticatedLicensedPostfix, ossAuthLicensedMux)) - unauthdAnonymizationService := v1alpha_anonymizationservice.New( - &v1alpha_anonymizationservice.Config{IsPresidioEnabled: false}, - nil, // meter - unauthdUserClient, - unauthdUserService, - presAnalyzeClient, presAnonClient, - neosyncdb.New(pgcontainer.DB, db_queries.New()), - ) - - rootmux := http.NewServeMux() - - unauthmux := http.NewServeMux() - unauthmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - unauthdUserService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewTransformersServiceHandler( - unauthdTransformersService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - unauthdConnectionsService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( - unauthdJobsService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( - unauthdAnonymizationService, - )) - unauthmux.Handle(mgmtv1alpha1connect.NewConnectionDataServiceHandler( - unauthdConnectionDataService, - )) - rootmux.Handle("/unauth/", http.StripPrefix("/unauth", unauthmux)) - - authinterceptors := connect.WithInterceptors( - auth_interceptor.NewInterceptor(func(ctx context.Context, header http.Header, spec connect.Spec) (context.Context, error) { - // will need to further fill this out as the tests grow - authuserid, err := utils.GetBearerTokenFromHeader(header, "Authorization") - if err != nil { - return nil, err - } - if apikey.IsValidV1WorkerKey(authuserid) { - return auth_apikey.SetTokenData(ctx, &auth_apikey.TokenContextData{ - RawToken: authuserid, - ApiKey: nil, - ApiKeyType: apikey.WorkerApiKey, - }), nil - } - return auth_jwt.SetTokenData(ctx, &auth_jwt.TokenContextData{ - AuthUserId: authuserid, - Claims: &auth_jwt.CustomClaims{Email: &validAuthUser.Email}, - }), nil - }), - ) - - authmux := http.NewServeMux() - authmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - authdUserService, - authinterceptors, - )) - authmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - authdConnectionService, - authinterceptors, - )) - rootmux.Handle("/auth/", http.StripPrefix("/auth", authmux)) + ossUnauthUnlicensedMux, err := s.setupOssUnlicensedMux(pgcontainer, logger) + if err != nil { + return fmt.Errorf("unable to setup oss unauthenticated unlicensed mux: %w", err) + } + rootmux.Handle(openSourceUnauthenticatedUnlicensedPostfix+"/", http.StripPrefix(openSourceUnauthenticatedUnlicensedPostfix, ossUnauthUnlicensedMux)) - ncauthmux := http.NewServeMux() - ncauthmux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( - neoCloudAuthdUserService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( - neoCloudAuthdAnonymizeService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( - neoCloudConnectionService, - authinterceptors, - )) - ncauthmux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( - neoCloudJobService, - authinterceptors, - )) - rootmux.Handle("/ncauth/", http.StripPrefix("/ncauth", ncauthmux)) + neoCloudAuthdMux, err := s.setupNeoCloudMux(ctx, pgcontainer, logger) + if err != nil { + return fmt.Errorf("unable to setup neo cloud authenticated mux: %w", err) + } + rootmux.Handle(neoCloudAuthenticatedLicensedPostfix+"/", http.StripPrefix(neoCloudAuthenticatedLicensedPostfix, neoCloudAuthdMux)) s.httpsrv = startHTTPServer(t, rootmux) + rootmux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + t.Logf("404 for URL: %s\n", r.URL.Path) + http.NotFound(w, r) + }) - s.UnauthdClients = &UnauthdClients{ - Users: mgmtv1alpha1connect.NewUserAccountServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Transformers: mgmtv1alpha1connect.NewTransformersServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Connections: mgmtv1alpha1connect.NewConnectionServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - ConnectionData: mgmtv1alpha1connect.NewConnectionDataServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Jobs: mgmtv1alpha1connect.NewJobServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - Anonymize: mgmtv1alpha1connect.NewAnonymizationServiceClient(s.httpsrv.Client(), s.httpsrv.URL+"/unauth"), - } + s.OSSUnauthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceUnauthenticatedLicensedPostfix) + s.OSSAuthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceAuthenticatedLicensedPostfix) + s.OSSUnauthenticatedUnlicensedClients = newNeosyncClients(s.httpsrv.URL + openSourceUnauthenticatedUnlicensedPostfix) + s.NeosyncCloudAuthenticatedLicensedClients = newNeosyncClients(s.httpsrv.URL + neoCloudAuthenticatedLicensedPostfix) - s.AuthdClients = &AuthdClients{ - httpsrv: s.httpsrv, - } - s.NeosyncCloudClients = &NeosyncCloudClients{ - httpsrv: s.httpsrv, - basepath: "/ncauth", - } return nil } diff --git a/backend/pkg/integration-test/mux.go b/backend/pkg/integration-test/mux.go new file mode 100644 index 0000000000..62da17f2f0 --- /dev/null +++ b/backend/pkg/integration-test/mux.go @@ -0,0 +1,279 @@ +package integrationtests_test + +import ( + "context" + "fmt" + "log/slog" + "net/http" + + "connectrpc.com/connect" + "github.com/jackc/pgx/v5/stdlib" + db_queries "github.com/nucleuscloud/neosync/backend/gen/go/db" + mysql_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/mysql" + pg_queries "github.com/nucleuscloud/neosync/backend/gen/go/db/dbschemas/postgresql" + "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + "github.com/nucleuscloud/neosync/backend/internal/apikey" + auth_apikey "github.com/nucleuscloud/neosync/backend/internal/auth/apikey" + auth_jwt "github.com/nucleuscloud/neosync/backend/internal/auth/jwt" + "github.com/nucleuscloud/neosync/backend/internal/authmgmt" + auth_interceptor "github.com/nucleuscloud/neosync/backend/internal/connect/interceptors/auth" + jobhooks "github.com/nucleuscloud/neosync/backend/internal/ee/hooks/jobs" + "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" + "github.com/nucleuscloud/neosync/backend/internal/ee/rbac/enforcer" + neosync_gcp "github.com/nucleuscloud/neosync/backend/internal/gcp" + "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" + "github.com/nucleuscloud/neosync/backend/internal/userdata" + "github.com/nucleuscloud/neosync/backend/internal/utils" + "github.com/nucleuscloud/neosync/backend/pkg/mongoconnect" + "github.com/nucleuscloud/neosync/backend/pkg/sqlconnect" + v1alpha_anonymizationservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/anonymization-service" + v1alpha1_connectiondataservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-data-service" + v1alpha1_connectionservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-service" + v1alpha1_jobservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/job-service" + v1alpha1_transformersservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/transformers-service" + v1alpha1_useraccountservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/user-account-service" + awsmanager "github.com/nucleuscloud/neosync/internal/aws" + "github.com/nucleuscloud/neosync/internal/billing" + presidioapi "github.com/nucleuscloud/neosync/internal/ee/presidio" + neosynctypes "github.com/nucleuscloud/neosync/internal/neosync-types" + "github.com/nucleuscloud/neosync/internal/testutil" + tcpostgres "github.com/nucleuscloud/neosync/internal/testutil/testcontainers/postgres" +) + +var ( + validAuthUser = &authmgmt.User{Name: "foo", Email: "bar", Picture: "baz"} + + authinterceptor = auth_interceptor.NewInterceptor(func(ctx context.Context, header http.Header, spec connect.Spec) (context.Context, error) { + // will need to further fill this out as the tests grow + authuserid, err := utils.GetBearerTokenFromHeader(header, "Authorization") + if err != nil { + return nil, err + } + if apikey.IsValidV1WorkerKey(authuserid) { + return auth_apikey.SetTokenData(ctx, &auth_apikey.TokenContextData{ + RawToken: authuserid, + ApiKey: nil, + ApiKeyType: apikey.WorkerApiKey, + }), nil + } + return auth_jwt.SetTokenData(ctx, &auth_jwt.TokenContextData{ + AuthUserId: authuserid, + Claims: &auth_jwt.CustomClaims{Email: &validAuthUser.Email}, + }), nil + }) +) + +const ( + // OSS, Unauthenticated, Licensed + openSourceUnauthenticatedLicensedPostfix = "/oss-unauthenticated-licensed" + // OSS, Authenticated, Licensed + openSourceAuthenticatedLicensedPostfix = "/oss-authenticated-licensed" + // OSS, Unauthenticated, Unlicensed + openSourceUnauthenticatedUnlicensedPostfix = "/oss-unauthenticated-unlicensed" + // NeoCloud, Licensed, Authenticated + neoCloudAuthenticatedLicensedPostfix = "/neosynccloud-authenticated" +) + +func (s *NeosyncApiTestClient) setupOssUnauthenticatedLicensedMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := false + isNeosyncCloud := false + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupOssLicensedAuthMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := true + isNeosyncCloud := false + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupOssUnlicensedMux(pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := false + isAuthEnabled := false + isNeosyncCloud := false + permissiveRbacClient := rbac.NewAllowAllClient() + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, permissiveRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupNeoCloudMux(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer, logger *slog.Logger) (*http.ServeMux, error) { + isLicensed := true + isAuthEnabled := true + isNeosyncCloud := true + enforcedRbacClient, err := s.getEnforcedRbacClient(ctx, pgcontainer) + if err != nil { + return nil, fmt.Errorf("unable to get enforced rbac client: %w", err) + } + return s.setupMux(pgcontainer, isAuthEnabled, isLicensed, isNeosyncCloud, enforcedRbacClient, logger) +} + +func (s *NeosyncApiTestClient) setupMux( + pgcontainer *tcpostgres.PostgresTestContainer, + isAuthEnabled bool, + isLicensed bool, + isNeosyncCloud bool, + rbacClient rbac.Interface, + logger *slog.Logger, +) (*http.ServeMux, error) { + isPresidioEnabled := false + if isLicensed || isNeosyncCloud { + isPresidioEnabled = true + } + + maxAllowed := int64(10000) + var license *testutil.FakeEELicense + if isLicensed { + license = testutil.NewFakeEELicense(testutil.WithIsValid()) + } else { + license = testutil.NewFakeEELicense() + } + + neosyncDb := neosyncdb.New(pgcontainer.DB, db_queries.New()) + + var billingclient billing.Interface + if isNeosyncCloud { + billingclient = s.Mocks.Billingclient + } else { + billingclient = nil + } + + userService := v1alpha1_useraccountservice.New( + &v1alpha1_useraccountservice.Config{IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud, DefaultMaxAllowedRecords: &maxAllowed}, + neosyncdb.New(pgcontainer.DB, db_queries.New()), + s.Mocks.TemporalConfigProvider, + s.Mocks.Authclient, + s.Mocks.Authmanagerclient, + billingclient, + rbacClient, // rbac client + license, + ) + userclient := userdata.NewClient(userService, rbacClient, license) + + transformerService := v1alpha1_transformersservice.New( + &v1alpha1_transformersservice.Config{ + IsPresidioEnabled: isPresidioEnabled, + IsNeosyncCloud: isNeosyncCloud, + }, + neosyncdb.New(pgcontainer.DB, db_queries.New()), + s.Mocks.Presidio.Entities, + userclient, + ) + + sqlmanagerclient := NewTestSqlManagerClient() + + connectionService := v1alpha1_connectionservice.New( + &v1alpha1_connectionservice.Config{}, + neosyncDb, + userclient, + mongoconnect.NewConnector(), + awsmanager.New(), + sqlmanagerclient, + &sqlconnect.SqlOpenConnector{}, + ) + + var jobhookService *jobhooks.Service + if isLicensed { + jobhookService = jobhooks.New( + neosyncDb, + userclient, + jobhooks.WithEnabled(), + ) + } else { + jobhookService = jobhooks.New( + neosyncDb, + userclient, + ) + } + + jobService := v1alpha1_jobservice.New( + &v1alpha1_jobservice.Config{IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud}, + neosyncDb, + s.Mocks.TemporalClientManager, + connectionService, + sqlmanagerclient, + jobhookService, + userclient, + ) + + var presAnalyzeClient presidioapi.AnalyzeInterface + var presAnonClient presidioapi.AnonymizeInterface + + anonymizationService := v1alpha_anonymizationservice.New( + &v1alpha_anonymizationservice.Config{IsPresidioEnabled: isPresidioEnabled, IsAuthEnabled: isAuthEnabled, IsNeosyncCloud: isNeosyncCloud}, + nil, // meter + userclient, + userService, + presAnalyzeClient, presAnonClient, + neosyncDb, + ) + + connectionDataService := v1alpha1_connectiondataservice.New( + &v1alpha1_connectiondataservice.Config{}, + connectionService, + jobService, + awsmanager.New(), + &sqlconnect.SqlOpenConnector{}, + pg_queries.New(), + mysql_queries.New(), + mongoconnect.NewConnector(), + sqlmanagerclient, + neosync_gcp.NewManager(), + neosynctypes.NewTypeRegistry(logger), + ) + + mux := http.NewServeMux() + + interceptors := []connect.Interceptor{} + + if isAuthEnabled { + interceptors = append(interceptors, authinterceptor) + } + + mux.Handle(mgmtv1alpha1connect.NewUserAccountServiceHandler( + userService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewTransformersServiceHandler( + transformerService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewConnectionServiceHandler( + connectionService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewJobServiceHandler( + jobService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewAnonymizationServiceHandler( + anonymizationService, + connect.WithInterceptors(interceptors...), + )) + mux.Handle(mgmtv1alpha1connect.NewConnectionDataServiceHandler( + connectionDataService, + connect.WithInterceptors(interceptors...), + )) + + return mux, nil +} + +func (s *NeosyncApiTestClient) getEnforcedRbacClient(ctx context.Context, pgcontainer *tcpostgres.PostgresTestContainer) (rbac.Interface, error) { + rbacenforcer, err := enforcer.NewActiveEnforcer(ctx, stdlib.OpenDBFromPool(pgcontainer.DB), "neosync_api.casbin_rule") + if err != nil { + return nil, fmt.Errorf("unable to create rbac enforcer: %w", err) + } + rbacenforcer.EnableAutoSave(true) + err = rbacenforcer.LoadPolicy() + if err != nil { + return nil, fmt.Errorf("unable to load rbac policies: %w", err) + } + return rbac.New(rbacenforcer), nil +} diff --git a/backend/protos/mgmt/v1alpha1/user_account.proto b/backend/protos/mgmt/v1alpha1/user_account.proto index 957897b16f..dda504d4b2 100644 --- a/backend/protos/mgmt/v1alpha1/user_account.proto +++ b/backend/protos/mgmt/v1alpha1/user_account.proto @@ -175,7 +175,19 @@ message GetSystemInformationResponse { string compiler = 3; // The Go platform flag that was used to build this version of Neosync string platform = 4; + // The time when the build was created google.protobuf.Timestamp build_date = 5; + // The license information for the system + SystemLicense license = 6; +} + +message SystemLicense { + // Whether or not a valid license was found + bool is_valid = 1; + // The time when the license expires + google.protobuf.Timestamp expires_at = 2; + // Whether or not the license is for NeosyncCloud + bool is_neosync_cloud = 3; } message GetAccountOnboardingConfigRequest { diff --git a/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go b/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go index 3765c362c0..264a083e6c 100644 --- a/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go +++ b/backend/services/mgmt/v1alpha1/anonymization-service/anonymization.go @@ -12,7 +12,6 @@ import ( "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" - "github.com/nucleuscloud/neosync/backend/internal/userdata" "github.com/nucleuscloud/neosync/backend/pkg/metrics" jsonanonymizer "github.com/nucleuscloud/neosync/internal/json-anonymizer" "go.opentelemetry.io/otel/attribute" @@ -40,7 +39,7 @@ func (s *Service) AnonymizeMany( if err != nil { return nil, err } - err = userdata.EnforceAccountAccess(ctx, user, req.Msg.GetAccountId()) + err = user.EnforceAccountAccess(ctx, req.Msg.GetAccountId()) if err != nil { return nil, err } @@ -140,7 +139,7 @@ func (s *Service) AnonymizeSingle( if err != nil { return nil, err } - err = userdata.EnforceAccountAccess(ctx, user, req.Msg.GetAccountId()) + err = user.EnforceAccountAccess(ctx, req.Msg.GetAccountId()) if err != nil { return nil, err } diff --git a/backend/services/mgmt/v1alpha1/connection-service/connection.go b/backend/services/mgmt/v1alpha1/connection-service/connection.go index 1ff26c4033..0c46f2246b 100644 --- a/backend/services/mgmt/v1alpha1/connection-service/connection.go +++ b/backend/services/mgmt/v1alpha1/connection-service/connection.go @@ -342,7 +342,7 @@ func (s *Service) CreateConnection( req *connect.Request[mgmtv1alpha1.CreateConnectionRequest], ) (*connect.Response[mgmtv1alpha1.CreateConnectionResponse], error) { cc := &pg_models.ConnectionConfig{} - if err := cc.FromDto(req.Msg.ConnectionConfig); err != nil { + if err := cc.FromDto(req.Msg.GetConnectionConfig()); err != nil { return nil, err } @@ -350,6 +350,14 @@ func (s *Service) CreateConnection( if err != nil { return nil, err } + + switch req.Msg.GetConnectionConfig().GetConfig().(type) { + case *mgmtv1alpha1.ConnectionConfig_AwsS3Config, *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: + if err := user.EnforceLicense(ctx, req.Msg.GetAccountId()); err != nil { + return nil, err + } + } + accountUuid, err := neosyncdb.ToUuid(req.Msg.GetAccountId()) if err != nil { return nil, err @@ -360,7 +368,7 @@ func (s *Service) CreateConnection( connection, err := s.db.Q.CreateConnection(ctx, s.db.Db, db_queries.CreateConnectionParams{ AccountID: accountUuid, - Name: req.Msg.Name, + Name: req.Msg.GetName(), ConnectionConfig: cc, CreatedByID: user.PgId(), UpdatedByID: user.PgId(), @@ -396,6 +404,12 @@ func (s *Service) UpdateConnection( if err != nil { return nil, err } + switch req.Msg.GetConnectionConfig().GetConfig().(type) { + case *mgmtv1alpha1.ConnectionConfig_AwsS3Config, *mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig: + if err := user.EnforceLicense(ctx, neosyncdb.UUIDString(connection.AccountID)); err != nil { + return nil, err + } + } if err := user.EnforceConnection(ctx, userdata.NewDbDomainEntity(connection.AccountID, connection.ID), rbac.ConnectionAction_Edit); err != nil { return nil, err @@ -461,13 +475,13 @@ func (s *Service) CheckSqlQuery( req *connect.Request[mgmtv1alpha1.CheckSqlQueryRequest], ) (*connect.Response[mgmtv1alpha1.CheckSqlQueryResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - logger = logger.With("connectionId", req.Msg.Id) - connection, err := s.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{Id: req.Msg.Id})) + logger = logger.With("connectionId", req.Msg.GetId()) + connection, err := s.GetConnection(ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{Id: req.Msg.GetId()})) if err != nil { return nil, err } - conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.Msg.Connection.ConnectionConfig, logger, sqlconnect.WithConnectionTimeout(10)) + conn, err := s.sqlConnector.NewDbFromConnectionConfig(connection.Msg.GetConnection().GetConnectionConfig(), logger, sqlconnect.WithConnectionTimeout(10)) if err != nil { return nil, err } @@ -487,7 +501,7 @@ func (s *Service) CheckSqlQuery( } defer neosyncdb.HandleSqlRollback(tx, logger) - _, err = tx.PrepareContext(ctx, req.Msg.Query) + _, err = tx.PrepareContext(ctx, req.Msg.GetQuery()) var errorMsg *string if err != nil { msg := err.Error() diff --git a/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go index cd841063d5..5abdd7779e 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/anonymization-service_integration_test.go @@ -8,6 +8,7 @@ import ( "connectrpc.com/connect" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/nucleuscloud/neosync/internal/gotypeutil" "github.com/stretchr/testify/require" "github.com/stripe/stripe-go/v79" @@ -17,10 +18,10 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { t := s.T() t.Run("OSS-fail", func(t *testing.T) { - userclient := s.UnauthdClients.Users + userclient := s.OSSUnauthenticatedLicensedClients.Users() s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) - resp, err := s.UnauthdClients.Anonymize.AnonymizeMany( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeMany( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeManyRequest{ AccountId: accountId, @@ -35,8 +36,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { }) t.Run("cloud-personal-fail", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) resp, err := anonclient.AnonymizeMany( @@ -87,8 +88,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeMany() { }`, } - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createBilledTeamAccount(s.ctx, userclient, "team1", "foo") @@ -170,8 +171,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle() { "sports": ["basketball", "golf", "swimming"] }` - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -228,11 +229,11 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr t := s.T() t.Run("OSS", func(t *testing.T) { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) t.Run("transformpiitext", func(t *testing.T) { t.Run("mappings", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -252,7 +253,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr t.Run("defaults", func(t *testing.T) { t.Run("Bool", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -268,7 +269,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr requireConnectError(t, err, connect.CodePermissionDenied) }) t.Run("S", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -284,7 +285,7 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr requireConnectError(t, err, connect.CodePermissionDenied) }) t.Run("N", func(t *testing.T) { - resp, err := s.UnauthdClients.Anonymize.AnonymizeSingle( + resp, err := s.OSSUnauthenticatedLicensedClients.Anonymize().AnonymizeSingle( s.ctx, connect.NewRequest(&mgmtv1alpha1.AnonymizeSingleRequest{ AccountId: accountId, @@ -304,8 +305,8 @@ func (s *IntegrationTestSuite) Test_AnonymizeService_AnonymizeSingle_ForbiddenTr }) t.Run("cloud-personal", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) - anonclient := s.NeosyncCloudClients.GetAnonymizeClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + anonclient := s.NeosyncCloudAuthenticatedLicensedClients.Anonymize(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) diff --git a/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go index fee2e210da..2554568e8b 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/connection-service_integration_test.go @@ -4,14 +4,16 @@ import ( "testing" "connectrpc.com/connect" + "github.com/google/uuid" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/stretchr/testify/require" ) func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_Available() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Connections.IsConnectionNameAvailable( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().IsConnectionNameAvailable( s.ctx, connect.NewRequest(&mgmtv1alpha1.IsConnectionNameAvailableRequest{ AccountId: accountId, @@ -23,10 +25,10 @@ func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_ } func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_NotAvailable() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", "test-url") + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", "test-url") - resp, err := s.UnauthdClients.Connections.IsConnectionNameAvailable( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().IsConnectionNameAvailable( s.ctx, connect.NewRequest(&mgmtv1alpha1.IsConnectionNameAvailableRequest{ AccountId: accountId, @@ -39,14 +41,14 @@ func (s *IntegrationTestSuite) Test_ConnectionService_IsConnectionNameAvailable_ func (s *IntegrationTestSuite) Test_ConnectionService_CheckConnectionConfig() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) t.Run("valid-pg-connstr", func(t *testing.T) { t.Parallel() - resp, err := s.UnauthdClients.Connections.CheckConnectionConfig( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().CheckConnectionConfig( s.ctx, connect.NewRequest(&mgmtv1alpha1.CheckConnectionConfigRequest{ ConnectionConfig: conn.GetConnectionConfig(), @@ -60,40 +62,233 @@ func (s *IntegrationTestSuite) Test_ConnectionService_CheckConnectionConfig() { func (s *IntegrationTestSuite) Test_ConnectionService_CreateConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - t.Run("postgres-success", func(t *testing.T) { - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + t.Run("OSS Unauthenticated Licensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + client := s.OSSUnauthenticatedLicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + }) + t.Run("OSS Authenticated Licensed", func(t *testing.T) { + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + integrationtests_test.SetUser(s.ctx, t, userclient) + accountId := s.createPersonalAccount(s.ctx, userclient) + client := s.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + }) + t.Run("OSS Unauthenticated Unlicensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedUnlicensedClients.Users()) + client := s.OSSUnauthenticatedUnlicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_PgConfig{ + PgConfig: &mgmtv1alpha1.PostgresConnectionConfig{ + ConnectionConfig: &mgmtv1alpha1.PostgresConnectionConfig_Url{ + Url: s.Pgcontainer.URL, + }, + }, + }, + }, + }), + ) + requireNoErrResp(t, resp, err) + }) + t.Run("aws-s3-failure", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_AwsS3Config{ + AwsS3Config: &mgmtv1alpha1.AwsS3ConnectionConfig{ + Bucket: "foo", + }, + }, + }, + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) + t.Run("gcp-cloudstorage-failure", func(t *testing.T) { + resp, err := client.CreateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.CreateConnectionRequest{ + AccountId: accountId, + Name: uuid.NewString(), + ConnectionConfig: &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig{ + GcpCloudstorageConfig: &mgmtv1alpha1.GcpCloudStorageConnectionConfig{ + Bucket: "foo", + }, + }, + }, + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) }) } func (s *IntegrationTestSuite) Test_ConnectionService_UpdateConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - t.Run("postgres-success", func(t *testing.T) { - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + t.Run("OSS Unauthenticated Licensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + client := s.OSSUnauthenticatedLicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.UpdateConnection( - s.ctx, - connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ - Id: conn.GetId(), - Name: "foo2", - ConnectionConfig: conn.GetConnectionConfig(), - }), - ) - requireNoErrResp(t, resp, err) - require.Equal(t, "foo2", resp.Msg.GetConnection().GetName()) + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + }) + + t.Run("OSS Authenticated Licensed", func(t *testing.T) { + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + integrationtests_test.SetUser(s.ctx, t, userclient) + accountId := s.createPersonalAccount(s.ctx, userclient) + client := s.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + }) + + t.Run("OSS Unauthenticated Unlicensed", func(t *testing.T) { + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedUnlicensedClients.Users()) + client := s.OSSUnauthenticatedUnlicensedClients.Connections() + t.Run("postgres-success", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + updatedName := uuid.NewString() + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + Name: updatedName, + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireNoErrResp(t, resp, err) + require.Equal(t, updatedName, resp.Msg.GetConnection().GetName()) + }) + + t.Run("aws-s3-failure", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + conn.ConnectionConfig = &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_AwsS3Config{ + AwsS3Config: &mgmtv1alpha1.AwsS3ConnectionConfig{ + Bucket: "foo", + }, + }, + } + + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) + + t.Run("aws-gcp-cloudstorage-failure", func(t *testing.T) { + conn := s.createPostgresConnection(client, accountId, uuid.NewString(), s.Pgcontainer.URL) + + conn.ConnectionConfig = &mgmtv1alpha1.ConnectionConfig{ + Config: &mgmtv1alpha1.ConnectionConfig_GcpCloudstorageConfig{ + GcpCloudstorageConfig: &mgmtv1alpha1.GcpCloudStorageConnectionConfig{ + Bucket: "foo", + }, + }, + } + + resp, err := client.UpdateConnection( + s.ctx, + connect.NewRequest(&mgmtv1alpha1.UpdateConnectionRequest{ + Id: conn.GetId(), + ConnectionConfig: conn.GetConnectionConfig(), + }), + ) + requireErrResp(t, resp, err) + requireConnectError(t, err, connect.CodePermissionDenied) + }) }) } func (s *IntegrationTestSuite) Test_ConnectionService_GetConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnection( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionRequest{ Id: conn.GetId(), @@ -105,11 +300,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_GetConnection() { func (s *IntegrationTestSuite) Test_ConnectionService_GetConnections() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnections( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnections( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionsRequest{ AccountId: accountId, @@ -121,11 +316,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_GetConnections() { func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.GetConnections( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().GetConnections( s.ctx, connect.NewRequest(&mgmtv1alpha1.GetConnectionsRequest{ AccountId: accountId, @@ -134,7 +329,7 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { requireNoErrResp(t, resp, err) require.NotEmpty(t, resp.Msg.GetConnections()) - resp2, err := s.UnauthdClients.Connections.DeleteConnection( + resp2, err := s.OSSUnauthenticatedLicensedClients.Connections().DeleteConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.DeleteConnectionRequest{ Id: conn.GetId(), @@ -143,7 +338,7 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { requireNoErrResp(t, resp2, err) // again to test idempotency - resp2, err = s.UnauthdClients.Connections.DeleteConnection( + resp2, err = s.OSSUnauthenticatedLicensedClients.Connections().DeleteConnection( s.ctx, connect.NewRequest(&mgmtv1alpha1.DeleteConnectionRequest{ Id: conn.GetId(), @@ -154,11 +349,11 @@ func (s *IntegrationTestSuite) Test_ConnectionService_DeleteConnection() { func (s *IntegrationTestSuite) Test_ConnectionService_CheckSqlQuery() { t := s.T() - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - conn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "foo", s.Pgcontainer.URL) + conn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "foo", s.Pgcontainer.URL) - resp, err := s.UnauthdClients.Connections.CheckSqlQuery( + resp, err := s.OSSUnauthenticatedLicensedClients.Connections().CheckSqlQuery( s.ctx, connect.NewRequest(&mgmtv1alpha1.CheckSqlQueryRequest{ Id: conn.GetId(), diff --git a/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go index 1b4b2e6d9d..20dee84211 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/jobs-service_integration_test.go @@ -9,13 +9,14 @@ import ( "github.com/google/uuid" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1/mgmtv1alpha1connect" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/stretchr/testify/require" ) func (s *IntegrationTestSuite) Test_GetJobs_Empty() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Jobs.GetJobs(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetJobsRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Jobs().GetJobs(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetJobsRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) @@ -24,13 +25,13 @@ func (s *IntegrationTestSuite) Test_GetJobs_Empty() { } func (s *IntegrationTestSuite) Test_CreateJob_Ok() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - srcconn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "source", "test") - destconn := s.createPostgresConnection(s.UnauthdClients.Connections, accountId, "dest", "test2") + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + srcconn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "source", "test") + destconn := s.createPostgresConnection(s.OSSUnauthenticatedLicensedClients.Connections(), accountId, "dest", "test2") s.MockTemporalForCreateJob("test-id") - resp, err := s.UnauthdClients.Jobs.CreateJob(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Jobs().CreateJob(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ AccountId: accountId, JobName: "test", Mappings: []*mgmtv1alpha1.JobMapping{}, @@ -62,8 +63,8 @@ func (s *IntegrationTestSuite) Test_JobService_JobHooks() { t := s.T() ctx := s.ctx - t.Run("OSS-unimplemented", func(t *testing.T) { - client := s.UnauthdClients.Jobs + t.Run("OSS-unlicensed-unimplemented", func(t *testing.T) { + client := s.OSSUnauthenticatedUnlicensedClients.Jobs() t.Run("GetJobHooks", func(t *testing.T) { resp, err := client.GetJobHooks(ctx, connect.NewRequest(&mgmtv1alpha1.GetJobHooksRequest{})) requireErrResp(t, resp, err) @@ -102,12 +103,12 @@ func (s *IntegrationTestSuite) Test_JobService_JobHooks() { }) t.Run("Cloud", func(t *testing.T) { - client := s.NeosyncCloudClients.GetJobClient(testAuthUserId) - s.setUser(ctx, s.NeosyncCloudClients.GetUserClient(testAuthUserId)) - accountId := s.createPersonalAccount(ctx, s.NeosyncCloudClients.GetUserClient(testAuthUserId)) + client := s.NeosyncCloudAuthenticatedLicensedClients.Jobs(integrationtests_test.WithUserId(testAuthUserId)) + s.setUser(ctx, s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId))) + accountId := s.createPersonalAccount(ctx, s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId))) - srcconn := s.createPostgresConnection(s.NeosyncCloudClients.GetConnectionClient(testAuthUserId), accountId, "source", "test") - destconn := s.createPostgresConnection(s.NeosyncCloudClients.GetConnectionClient(testAuthUserId), accountId, "dest", "test2") + srcconn := s.createPostgresConnection(s.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)), accountId, "source", "test") + destconn := s.createPostgresConnection(s.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)), accountId, "dest", "test2") s.MockTemporalForCreateJob("test-id") jobResp, err := client.CreateJob(ctx, connect.NewRequest(&mgmtv1alpha1.CreateJobRequest{ diff --git a/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go index 65fdd83285..deb4fef818 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/transformers-service_integration_test.go @@ -11,7 +11,7 @@ import ( ) func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformers() { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformersRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformersRequest{})) requireNoErrResp(s.T(), resp, err) require.NotEmpty(s.T(), resp.Msg.GetTransformers()) } @@ -19,7 +19,7 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformers() func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformersBySource() { t := s.T() t.Run("ok", func(t *testing.T) { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_BOOL, })) requireNoErrResp(t, resp, err) @@ -28,7 +28,7 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetSystemTransformersByS require.Equal(t, transformer.GetSource(), mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_GENERATE_BOOL) }) t.Run("not_found", func(t *testing.T) { - resp, err := s.UnauthdClients.Transformers.GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetSystemTransformerBySource(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemTransformerBySourceRequest{ Source: mgmtv1alpha1.TransformerSource_TRANSFORMER_SOURCE_UNSPECIFIED, })) requireErrResp(t, resp, err) @@ -47,8 +47,8 @@ func (s *IntegrationTestSuite) Test_TransformersService_GetTransformPiiRecognize JSON200: &allowed, }, nil) - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Transformers.GetTransformPiiEntities(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTransformPiiEntitiesRequest{ + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Transformers().GetTransformPiiEntities(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTransformPiiEntitiesRequest{ AccountId: accountId, })) requireNoErrResp(t, resp, err) diff --git a/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go b/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go index 2981cbec78..9282a64179 100644 --- a/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go +++ b/backend/services/mgmt/v1alpha1/integration_tests/user-account-service_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/nucleuscloud/neosync/backend/internal/authmgmt" nucleuserrors "github.com/nucleuscloud/neosync/backend/internal/errors" "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" pg_models "github.com/nucleuscloud/neosync/backend/sql/postgresql/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -28,9 +29,9 @@ var ( ) func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: accountId})) requireNoErrResp(s.T(), resp, err) onboardingConfig := resp.Msg.GetConfig() require.NotNil(s.T(), onboardingConfig) @@ -39,21 +40,21 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfi } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountOnboardingConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountOnboardingConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: uuid.NewString(), Config: &mgmtv1alpha1.AccountOnboardingConfig{}})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: uuid.NewString(), Config: &mgmtv1alpha1.AccountOnboardingConfig{}})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig_NoConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: accountId, Config: nil})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{AccountId: accountId, Config: nil})) requireNoErrResp(s.T(), resp, err) onboardingConfig := resp.Msg.GetConfig() require.NotNil(s.T(), onboardingConfig) @@ -62,9 +63,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfi } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountOnboardingConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountOnboardingConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountOnboardingConfigRequest{ AccountId: accountId, Config: &mgmtv1alpha1.AccountOnboardingConfig{ HasCompletedOnboarding: true, }}, @@ -91,12 +92,12 @@ var ( ) func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: accountId})) requireNoErrResp(s.T(), resp, err) tc := resp.Msg.GetConfig() @@ -108,13 +109,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig( } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_NeosyncCloud() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -124,13 +125,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NoAccount() { - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NeosyncCloud() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -140,12 +141,12 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_NoConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: accountId, Config: nil})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{AccountId: accountId, Config: nil})) requireNoErrResp(s.T(), resp, err) tc := resp.Msg.GetConfig() @@ -157,13 +158,13 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig_ } func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) // kind of a bad test since we are mocking this client wholesale, but it at least verifies we can write the config s.Mocks.TemporalConfigProvider.On("GetConfig", mock.Anything, mock.Anything). Return(validTemporalConfig, nil) - resp, err := s.UnauthdClients.Users.SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetAccountTemporalConfig(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetAccountTemporalConfigRequest{ AccountId: accountId, Config: &mgmtv1alpha1.AccountTemporalConfig{ Url: "test", Namespace: "test", @@ -180,7 +181,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetAccountTemporalConfig( } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth() { - client := s.AuthdClients.GetUserClient("test-user1") + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId("test-user1")) userId := s.setUser(s.ctx, client) resp, err := client.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) @@ -189,21 +190,21 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser_Auth_NotFound() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId("test-user1")) resp, err := client.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodeNotFound) } func (s *IntegrationTestSuite) Test_UserAccountService_SetUser_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) userId := s.setUser(s.ctx, client) require.NotEmpty(s.T(), userId) require.NotEqual(s.T(), "00000000-0000-0000-0000-000000000000", userId) } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, client) resp, err := client.CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) @@ -212,7 +213,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Auth() } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_NeosyncCloud() { - client := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + client := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, client) s.Mocks.Billingclient.On("NewCustomer", mock.Anything).Once(). @@ -227,7 +228,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_Neosync } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountMembers_Auth() { - client := s.AuthdClients.GetUserClient(testAuthUserId) + client := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) userId := s.setUser(s.ctx, client) accountId := s.createTeamAccount(s.ctx, client, "test-team") @@ -261,7 +262,7 @@ func (s *IntegrationTestSuite) createTeamAccount(ctx context.Context, client mgm } func (s *IntegrationTestSuite) Test_UserAccountService_GetUser() { - resp, err := s.UnauthdClients.Users.GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserRequest{})) requireNoErrResp(s.T(), resp, err) userId := resp.Msg.GetUserId() @@ -269,7 +270,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetUser() { } func (s *IntegrationTestSuite) Test_UserAccountService_SetUser() { - resp, err := s.UnauthdClients.Users.SetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetUserRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetUser(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetUserRequest{})) requireNoErrResp(s.T(), resp, err) userId := resp.Msg.UserId @@ -278,7 +279,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetUser() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_Empty() { - resp, err := s.UnauthdClients.Users.GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) requireNoErrResp(s.T(), resp, err) accounts := resp.Msg.GetAccounts() @@ -286,7 +287,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_Empty() { } func (s *IntegrationTestSuite) Test_UserAccountService_SetPersonalAccount() { - resp, err := s.UnauthdClients.Users.SetPersonalAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetPersonalAccountRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().SetPersonalAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.SetPersonalAccountRequest{})) requireNoErrResp(s.T(), resp, err) accountId := resp.Msg.GetAccountId() @@ -294,9 +295,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_SetPersonalAccount() { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_NotEmpty() { - s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - accResp, err := s.UnauthdClients.Users.GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) + accResp, err := s.OSSUnauthenticatedLicensedClients.Users().GetUserAccounts(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetUserAccountsRequest{})) requireNoErrResp(s.T(), accResp, err) accounts := accResp.Msg.GetAccounts() @@ -305,15 +306,15 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccounts_NotEmpty() { } func (s *IntegrationTestSuite) Test_UserAccountService_IsUserInAccount() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) require.True(s.T(), resp.Msg.GetOk()) - resp, err = s.UnauthdClients.Users.IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ + resp, err = s.OSSUnauthenticatedLicensedClients.Users().IsUserInAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.IsUserInAccountRequest{ AccountId: uuid.NewString(), })) requireNoErrResp(s.T(), resp, err) @@ -321,63 +322,63 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsUserInAccount() { } func (s *IntegrationTestSuite) Test_UserAccountService_CreateTeamAccount_NoAuth() { - s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().CreateTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.CreateTeamAccountRequest{Name: "test-name"})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountMembers_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetTeamAccountMembers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountMembersRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetTeamAccountMembers(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountMembersRequest{AccountId: accountId})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_RemoveTeamAccountMember_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.RemoveTeamAccountMember(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountMemberRequest{AccountId: accountId, UserId: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().RemoveTeamAccountMember(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountMemberRequest{AccountId: accountId, UserId: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_InviteUserToTeamAccount_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.InviteUserToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.InviteUserToTeamAccountRequest{AccountId: accountId, Email: "test@example.com"})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().InviteUserToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.InviteUserToTeamAccountRequest{AccountId: accountId, Email: "test@example.com"})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_GetTeamAccountInvites_NoAuth_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetTeamAccountInvites(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountInvitesRequest{AccountId: accountId})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetTeamAccountInvites(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetTeamAccountInvitesRequest{AccountId: accountId})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodePermissionDenied) } func (s *IntegrationTestSuite) Test_UserAccountService_RemoveTeamAccountInvite_NoAuth_Personal() { - resp, err := s.UnauthdClients.Users.RemoveTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountInviteRequest{Id: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().RemoveTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.RemoveTeamAccountInviteRequest{Id: uuid.NewString()})) requireNoErrResp(s.T(), resp, err) } func (s *IntegrationTestSuite) Test_UserAccountService_AcceptTeamAccountInvite_NoAuth_Personal() { - resp, err := s.UnauthdClients.Users.AcceptTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.AcceptTeamAccountInviteRequest{Token: uuid.NewString()})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().AcceptTeamAccountInvite(s.ctx, connect.NewRequest(&mgmtv1alpha1.AcceptTeamAccountInviteRequest{Token: uuid.NewString()})) requireErrResp(s.T(), resp, err) requireConnectError(s.T(), err, connect.CodeUnauthenticated) } func (s *IntegrationTestSuite) Test_UserAccountService_GetSystemInformation() { - resp, err := s.UnauthdClients.Users.GetSystemInformation(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemInformationRequest{})) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetSystemInformation(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetSystemInformationRequest{})) requireNoErrResp(s.T(), resp, err) } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncCloud_Personal() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -407,7 +408,7 @@ func (t *testSubscriptionIter) Err() error { } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncCloud_Billed() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -449,9 +450,9 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_NeosyncC } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_OSS_Personal() { - accountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + accountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) - resp, err := s.UnauthdClients.Users.GetAccountStatus(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountStatusRequest{ + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountStatus(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountStatusRequest{ AccountId: accountId, })) requireNoErrResp(s.T(), resp, err) @@ -460,7 +461,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountStatus_OSS_Pers } func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_NeosyncCloud_Personal() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -475,7 +476,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_Neos } func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_NeosyncCloud_Billed() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -564,7 +565,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_IsAccountStatusValid_Neos } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckoutSession() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -591,7 +592,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckout }) t.Run("non-neosynccloud - disallowed", func(t *testing.T) { - personalAccountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) + personalAccountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) resp, err := userclient.GetAccountBillingCheckoutSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingCheckoutSessionRequest{ AccountId: personalAccountId, })) @@ -600,7 +601,7 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingCheckout } func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingPortalSession() { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) t := s.T() @@ -627,8 +628,8 @@ func (s *IntegrationTestSuite) Test_UserAccountService_GetAccountBillingPortalSe }) t.Run("non-neosynccloud - disallowed", func(t *testing.T) { - personalAccountId := s.createPersonalAccount(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Users.GetAccountBillingPortalSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingPortalSessionRequest{ + personalAccountId := s.createPersonalAccount(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().GetAccountBillingPortalSession(s.ctx, connect.NewRequest(&mgmtv1alpha1.GetAccountBillingPortalSessionRequest{ AccountId: personalAccountId, })) requireErrResp(s.T(), resp, err) @@ -644,14 +645,14 @@ func (s *IntegrationTestSuite) createBilledTeamAccount(ctx context.Context, clie } func (s *IntegrationTestSuite) Test_GetBillingAccounts() { - userclient1 := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient1 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient1) - userclient2 := s.NeosyncCloudClients.GetUserClient(testAuthUserId2) + userclient2 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId2)) s.setUser(s.ctx, userclient2) workerapikey := apikey.NewV1WorkerKey() - workeruserclient := s.NeosyncCloudClients.GetUserClient(workerapikey) + workeruserclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(workerapikey)) t := s.T() @@ -697,8 +698,8 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { t := s.T() t.Run("OSS unauth", func(t *testing.T) { - s.setUser(s.ctx, s.UnauthdClients.Users) - resp, err := s.UnauthdClients.Users.ConvertPersonalToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.ConvertPersonalToTeamAccountRequest{ + s.setUser(s.ctx, s.OSSUnauthenticatedLicensedClients.Users()) + resp, err := s.OSSUnauthenticatedLicensedClients.Users().ConvertPersonalToTeamAccount(s.ctx, connect.NewRequest(&mgmtv1alpha1.ConvertPersonalToTeamAccountRequest{ Name: "unauthteamname", })) requireErrResp(t, resp, err) @@ -706,7 +707,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("OSS auth success", func(t *testing.T) { - userclient := s.AuthdClients.GetUserClient(testAuthUserId) + userclient := s.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -719,7 +720,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("cloud billing success", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) accountId := s.createPersonalAccount(s.ctx, userclient) @@ -737,7 +738,7 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { }) t.Run("cloud success unspecified account", func(t *testing.T) { - userclient := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient) stripeCustomerId := "foo" @@ -753,11 +754,11 @@ func (s *IntegrationTestSuite) Test_ConvertPersonalToTeamAccount() { } func (s *IntegrationTestSuite) Test_SetBillingMeterEvent() { - userclient1 := s.NeosyncCloudClients.GetUserClient(testAuthUserId) + userclient1 := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) s.setUser(s.ctx, userclient1) workerapikey := apikey.NewV1WorkerKey() - workeruserclient := s.NeosyncCloudClients.GetUserClient(workerapikey) + workeruserclient := s.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(workerapikey)) t := s.T() diff --git a/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go b/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go index 36d7720e94..d1881c0f24 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/account-onboarding.go @@ -16,7 +16,7 @@ func (s *Service) GetAccountOnboardingConfig( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetAccountOnboardingConfigRequest], ) (*connect.Response[mgmtv1alpha1.GetAccountOnboardingConfigResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -45,7 +45,7 @@ func (s *Service) SetAccountOnboardingConfig( ctx context.Context, req *connect.Request[mgmtv1alpha1.SetAccountOnboardingConfigRequest], ) (*connect.Response[mgmtv1alpha1.SetAccountOnboardingConfigResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go b/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go index 8c50a81179..8efe9769a4 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/account-temporal-config.go @@ -20,7 +20,7 @@ func (s *Service) GetAccountTemporalConfig( if s.cfg.IsNeosyncCloud { return nil, nucleuserrors.NewNotImplemented("not enabled in Neosync Cloud") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -47,7 +47,7 @@ func (s *Service) SetAccountTemporalConfig( if s.cfg.IsNeosyncCloud { return nil, nucleuserrors.NewNotImplemented("not enabled in Neosync Cloud") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/billing.go b/backend/services/mgmt/v1alpha1/user-account-service/billing.go index 0fe63dd5f2..681c3aa100 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/billing.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/billing.go @@ -34,7 +34,7 @@ func (s *Service) GetAccountStatus( ) (*connect.Response[mgmtv1alpha1.GetAccountStatusResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -225,7 +225,7 @@ func (s *Service) GetAccountBillingCheckoutSession( return nil, nucleuserrors.NewNotImplemented(fmt.Sprintf("%s is not implemented", strings.TrimPrefix(mgmtv1alpha1connect.UserAccountServiceGetAccountBillingCheckoutSessionProcedure, "/"))) } logger = logger.With("accountId", req.Msg.GetAccountId()) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -275,7 +275,7 @@ func (s *Service) GetAccountBillingPortalSession( if !s.cfg.IsNeosyncCloud || s.billingclient == nil { return nil, nucleuserrors.NewNotImplemented(fmt.Sprintf("%s is not implemented", strings.TrimPrefix(mgmtv1alpha1connect.UserAccountServiceGetAccountBillingPortalSessionProcedure, "/"))) } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -312,7 +312,7 @@ func (s *Service) GetBillingAccounts( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetBillingAccountsRequest], ) (*connect.Response[mgmtv1alpha1.GetBillingAccountsResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -350,7 +350,7 @@ func (s *Service) SetBillingMeterEvent( if s.billingclient == nil { return nil, nucleuserrors.NewUnauthorized("billing is not currently enabled") } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err diff --git a/backend/services/mgmt/v1alpha1/user-account-service/service.go b/backend/services/mgmt/v1alpha1/user-account-service/service.go index e401ea2d67..6b79b858a2 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/service.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/service.go @@ -6,7 +6,9 @@ import ( "github.com/nucleuscloud/neosync/backend/internal/ee/rbac" "github.com/nucleuscloud/neosync/backend/internal/neosyncdb" "github.com/nucleuscloud/neosync/backend/internal/temporal/clientmanager" + "github.com/nucleuscloud/neosync/backend/internal/userdata" "github.com/nucleuscloud/neosync/internal/billing" + "github.com/nucleuscloud/neosync/internal/ee/license" ) type Service struct { @@ -17,6 +19,7 @@ type Service struct { authadminclient authmgmt.Interface billingclient billing.Interface rbacClient rbac.Interface + licenseclient license.EEInterface } type Config struct { @@ -33,6 +36,7 @@ func New( authadminclient authmgmt.Interface, billingclient billing.Interface, rbacClient rbac.Interface, + licenseclient license.EEInterface, ) *Service { return &Service{ cfg: cfg, @@ -42,5 +46,10 @@ func New( authadminclient: authadminclient, billingclient: billingclient, rbacClient: rbacClient, + licenseclient: licenseclient, } } + +func (s *Service) UserDataClient() userdata.Interface { + return userdata.NewClient(s, s.rbacClient, s.licenseclient) +} diff --git a/backend/services/mgmt/v1alpha1/user-account-service/users.go b/backend/services/mgmt/v1alpha1/user-account-service/users.go index e126300ffd..8b112b2943 100644 --- a/backend/services/mgmt/v1alpha1/user-account-service/users.go +++ b/backend/services/mgmt/v1alpha1/user-account-service/users.go @@ -455,7 +455,7 @@ func (s *Service) GetTeamAccountMembers( ) (*connect.Response[mgmtv1alpha1.GetTeamAccountMembersResponse], error) { logger := logger_interceptor.GetLoggerFromContextOrDefault(ctx) - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -532,7 +532,7 @@ func (s *Service) RemoveTeamAccountMember( ctx context.Context, req *connect.Request[mgmtv1alpha1.RemoveTeamAccountMemberRequest], ) (*connect.Response[mgmtv1alpha1.RemoveTeamAccountMemberResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -572,7 +572,7 @@ func (s *Service) InviteUserToTeamAccount( ctx context.Context, req *connect.Request[mgmtv1alpha1.InviteUserToTeamAccountRequest], ) (*connect.Response[mgmtv1alpha1.InviteUserToTeamAccountResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -615,7 +615,7 @@ func (s *Service) GetTeamAccountInvites( ctx context.Context, req *connect.Request[mgmtv1alpha1.GetTeamAccountInvitesRequest], ) (*connect.Response[mgmtv1alpha1.GetTeamAccountInvitesResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := userdata.NewClient(s, s.rbacClient, s.licenseclient) user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -667,7 +667,7 @@ func (s *Service) RemoveTeamAccountInvite( return connect.NewResponse(&mgmtv1alpha1.RemoveTeamAccountInviteResponse{}), nil } - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -754,7 +754,7 @@ func (s *Service) SetUserRole( ctx context.Context, req *connect.Request[mgmtv1alpha1.SetUserRoleRequest], ) (*connect.Response[mgmtv1alpha1.SetUserRoleResponse], error) { - userdataclient := userdata.NewClient(s, s.rbacClient) + userdataclient := s.UserDataClient() user, err := userdataclient.GetUser(ctx) if err != nil { return nil, err @@ -808,7 +808,7 @@ func (s *Service) GetSystemInformation(ctx context.Context, req *connect.Request versionInfo := version.Get() builtDate, err := time.Parse(time.RFC3339, versionInfo.BuildDate) if err != nil { - return nil, err + return nil, fmt.Errorf("unable to parse build date: %w", err) } return connect.NewResponse(&mgmtv1alpha1.GetSystemInformationResponse{ Version: versionInfo.GitVersion, @@ -816,5 +816,10 @@ func (s *Service) GetSystemInformation(ctx context.Context, req *connect.Request Compiler: versionInfo.Compiler, Platform: versionInfo.Platform, BuildDate: timestamppb.New(builtDate), + License: &mgmtv1alpha1.SystemLicense{ + IsValid: s.licenseclient.IsValid(), + ExpiresAt: timestamppb.New(s.licenseclient.ExpiresAt()), + IsNeosyncCloud: s.cfg.IsNeosyncCloud, + }, }), nil } diff --git a/cli/internal/cmds/neosync/connections/connections_integration_test.go b/cli/internal/cmds/neosync/connections/connections_integration_test.go index a194c071cf..c0de902e9d 100644 --- a/cli/internal/cmds/neosync/connections/connections_integration_test.go +++ b/cli/internal/cmds/neosync/connections/connections_integration_test.go @@ -5,6 +5,7 @@ import ( "testing" mgmtv1alpha1 "github.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1" + integrationtests_test "github.com/nucleuscloud/neosync/backend/pkg/integration-test" tcneosyncapi "github.com/nucleuscloud/neosync/backend/pkg/integration-test" "github.com/nucleuscloud/neosync/internal/testutil" "github.com/stretchr/testify/require" @@ -27,19 +28,19 @@ func Test_Connections(t *testing.T) { postgresUrl := "postgresql://postgres:foofar@localhost:5434/neosync" t.Run("list_unauthed", func(t *testing.T) { - accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.UnauthdClients.Users) - conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "conn1", postgresUrl) - conn2 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "conn2", postgresUrl) + accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Users()) + conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "conn1", postgresUrl) + conn2 := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "conn2", postgresUrl) conns := []*mgmtv1alpha1.Connection{conn1, conn2} - connections, err := getConnections(ctx, neosyncApi.UnauthdClients.Connections, accountId) + connections, err := getConnections(ctx, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId) require.NoError(t, err) require.Len(t, connections, len(conns)) }) t.Run("list_auth", func(t *testing.T) { testAuthUserId := "c3b32842-9b70-4f4e-ad45-9cab26c6f2f1" - userclient := neosyncApi.AuthdClients.GetUserClient(testAuthUserId) - connclient := neosyncApi.AuthdClients.GetConnectionClient(testAuthUserId) + userclient := neosyncApi.OSSAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + connclient := neosyncApi.OSSAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) tcneosyncapi.SetUser(ctx, t, userclient) accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, userclient) conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "conn1", postgresUrl) @@ -52,8 +53,8 @@ func Test_Connections(t *testing.T) { t.Run("list_cloud", func(t *testing.T) { testAuthUserId := "34f3e404-c995-452b-89e4-9c486b491dab" - userclient := neosyncApi.NeosyncCloudClients.GetUserClient(testAuthUserId) - connclient := neosyncApi.NeosyncCloudClients.GetConnectionClient(testAuthUserId) + userclient := neosyncApi.NeosyncCloudAuthenticatedLicensedClients.Users(integrationtests_test.WithUserId(testAuthUserId)) + connclient := neosyncApi.NeosyncCloudAuthenticatedLicensedClients.Connections(integrationtests_test.WithUserId(testAuthUserId)) tcneosyncapi.SetUser(ctx, t, userclient) accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, userclient) conn1 := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "conn1", postgresUrl) diff --git a/cli/internal/cmds/neosync/sync/sync_integration_test.go b/cli/internal/cmds/neosync/sync/sync_integration_test.go index e82dd4828e..340599a82a 100644 --- a/cli/internal/cmds/neosync/sync/sync_integration_test.go +++ b/cli/internal/cmds/neosync/sync/sync_integration_test.go @@ -40,14 +40,14 @@ func Test_Sync(t *testing.T) { t.Fatal(err) } - connclient := neosyncApi.UnauthdClients.Connections - conndataclient := neosyncApi.UnauthdClients.ConnectionData - jobclient := neosyncApi.UnauthdClients.Jobs + connclient := neosyncApi.OSSUnauthenticatedLicensedClients.Connections() + conndataclient := neosyncApi.OSSUnauthenticatedLicensedClients.ConnectionData() + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() dbManagers := tcworkflow.NewTestDatabaseManagers(t) connmanager := dbManagers.SqlConnManager sqlmanagerclient := dbManagers.SqlManager - accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.UnauthdClients.Users) + accountId := tcneosyncapi.CreatePersonalAccount(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Users()) awsS3Config := testutil.GetTestAwsS3Config() s3Conn := tcneosyncapi.CreateS3Connection( ctx, @@ -68,7 +68,7 @@ func Test_Sync(t *testing.T) { } testdataFolder := "../../../../../internal/testutil/testdata/postgres" - sourceConn := tcneosyncapi.CreatePostgresConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "postgres-source", postgres.Source.URL) + sourceConn := tcneosyncapi.CreatePostgresConnection(ctx, t, connclient, accountId, "postgres-source", postgres.Source.URL) t.Run("postgres_sync", func(t *testing.T) { // can't be run in parallel yet @@ -277,7 +277,7 @@ func Test_Sync(t *testing.T) { } testdataFolder := "../../../../../internal/testutil/testdata/mysql" - sourceConn := tcneosyncapi.CreateMysqlConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "mysql-source", mysql.Source.URL) + sourceConn := tcneosyncapi.CreateMysqlConnection(ctx, t, connclient, accountId, "mysql-source", mysql.Source.URL) t.Run("mysql_sync", func(t *testing.T) { // can't be run in parallel yet @@ -455,7 +455,7 @@ func Test_Sync(t *testing.T) { t.Fatal(err) } - sourceConn := tcneosyncapi.CreateDynamoDBConnection(ctx, t, neosyncApi.UnauthdClients.Connections, accountId, "dynamo-source", dynamo.Source.URL, dynamo.Source.Credentials) + sourceConn := tcneosyncapi.CreateDynamoDBConnection(ctx, t, neosyncApi.OSSUnauthenticatedLicensedClients.Connections(), accountId, "dynamo-source", dynamo.Source.URL, dynamo.Source.Credentials) t.Run("dynamodb_sync", func(t *testing.T) { t.Parallel() diff --git a/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml b/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml index 68c286ae53..ef7e54311e 100644 --- a/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml +++ b/docs/openapi/mgmt/v1alpha1/user_account.openapi.yaml @@ -1389,7 +1389,13 @@ components: buildDate: allOf: - title: build_date + description: The time when the build was created - $ref: '#/components/schemas/google.protobuf.Timestamp' + license: + allOf: + - title: license + description: The license information for the system + - $ref: '#/components/schemas/mgmt.v1alpha1.SystemLicense' title: GetSystemInformationResponse additionalProperties: false mgmt.v1alpha1.GetTeamAccountInvitesRequest: @@ -1760,6 +1766,24 @@ components: type: object title: SetUserRoleResponse additionalProperties: false + mgmt.v1alpha1.SystemLicense: + type: object + properties: + isValid: + type: boolean + title: is_valid + description: Whether or not a valid license was found + expiresAt: + allOf: + - title: expires_at + description: The time when the license expires + - $ref: '#/components/schemas/google.protobuf.Timestamp' + isNeosyncCloud: + type: boolean + title: is_neosync_cloud + description: Whether or not the license is for NeosyncCloud + title: SystemLicense + additionalProperties: false mgmt.v1alpha1.UserAccount: type: object properties: diff --git a/docs/openapi/neosync.mgmt.v1alpha1.yaml b/docs/openapi/neosync.mgmt.v1alpha1.yaml index c4aa82ef19..71e9786060 100644 --- a/docs/openapi/neosync.mgmt.v1alpha1.yaml +++ b/docs/openapi/neosync.mgmt.v1alpha1.yaml @@ -12357,7 +12357,13 @@ components: buildDate: allOf: - title: build_date + description: The time when the build was created - $ref: '#/components/schemas/google.protobuf.Timestamp' + license: + allOf: + - title: license + description: The license information for the system + - $ref: '#/components/schemas/mgmt.v1alpha1.SystemLicense' title: GetSystemInformationResponse additionalProperties: false mgmt.v1alpha1.GetTeamAccountInvitesRequest: @@ -12734,6 +12740,24 @@ components: type: object title: SetUserRoleResponse additionalProperties: false + mgmt.v1alpha1.SystemLicense: + type: object + properties: + isValid: + type: boolean + title: is_valid + description: Whether or not a valid license was found + expiresAt: + allOf: + - title: expires_at + description: The time when the license expires + - $ref: '#/components/schemas/google.protobuf.Timestamp' + isNeosyncCloud: + type: boolean + title: is_neosync_cloud + description: Whether or not the license is for NeosyncCloud + title: SystemLicense + additionalProperties: false mgmt.v1alpha1.UserAccount: type: object properties: diff --git a/docs/protos/mgmt/v1alpha1/user_account.proto.mdx b/docs/protos/mgmt/v1alpha1/user_account.proto.mdx index ce6aaef263..a282f50a7a 100644 --- a/docs/protos/mgmt/v1alpha1/user_account.proto.mdx +++ b/docs/protos/mgmt/v1alpha1/user_account.proto.mdx @@ -110,7 +110,7 @@ _**package** mgmt.v1alpha1_ ### `GetSystemInformationResponse` - + ### `GetTeamAccountInvitesRequest` @@ -233,8 +233,12 @@ _**package** mgmt.v1alpha1_ +### `SystemLicense` + + + ### `UserAccount` - + --- ## Enums diff --git a/docs/protos/proto_docs.json b/docs/protos/proto_docs.json index e9f70ceba0..c51e37cd1e 100644 --- a/docs/protos/proto_docs.json +++ b/docs/protos/proto_docs.json @@ -16148,7 +16148,7 @@ }, { "name": "build_date", - "description": "", + "description": "The time when the build was created", "label": "", "type": "Timestamp", "longType": "google.protobuf.Timestamp", @@ -16157,6 +16157,18 @@ "isoneof": false, "oneofdecl": "", "defaultValue": "" + }, + { + "name": "license", + "description": "The license information for the system", + "label": "", + "type": "SystemLicense", + "longType": "SystemLicense", + "fullType": "mgmt.v1alpha1.SystemLicense", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" } ] }, @@ -16968,6 +16980,54 @@ "extensions": [], "fields": [] }, + { + "name": "SystemLicense", + "longName": "SystemLicense", + "fullName": "mgmt.v1alpha1.SystemLicense", + "description": "", + "hasExtensions": false, + "hasFields": true, + "hasOneofs": false, + "extensions": [], + "fields": [ + { + "name": "is_valid", + "description": "Whether or not a valid license was found", + "label": "", + "type": "bool", + "longType": "bool", + "fullType": "bool", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "expires_at", + "description": "The time when the license expires", + "label": "", + "type": "Timestamp", + "longType": "google.protobuf.Timestamp", + "fullType": "google.protobuf.Timestamp", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + }, + { + "name": "is_neosync_cloud", + "description": "Whether or not the license is for NeosyncCloud", + "label": "", + "type": "bool", + "longType": "bool", + "fullType": "bool", + "ismap": false, + "isoneof": false, + "oneofdecl": "", + "defaultValue": "" + } + ] + }, { "name": "UserAccount", "longName": "UserAccount", diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx index c0b267e76e..aaadc0fb1a 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/AwsS3Form.tsx @@ -2,6 +2,7 @@ import ButtonText from '@/components/ButtonText'; import { PasswordInput } from '@/components/PasswordComponent'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import SwitchCard from '@/components/switches/SwitchCard'; @@ -18,8 +19,7 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { - AWSFormValues, - AWS_FORM_SCHEMA, + AwsFormValues, EditConnectionFormContext, } from '@/yup-validations/connections'; import { create } from '@bufbuild/protobuf'; @@ -36,7 +36,7 @@ import { buildConnectionConfigAwsS3 } from '../../util'; interface Props { connectionId: string; - defaultValues: AWSFormValues; + defaultValues: AwsFormValues; onSaved(updatedConnectionResp: UpdateConnectionResponse): void; onSaveFailed(err: unknown): void; } @@ -47,8 +47,8 @@ export default function AwsS3Form(props: Props) { const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( ConnectionService.method.isConnectionNameAvailable ); - const form = useForm({ - resolver: yupResolver(AWS_FORM_SCHEMA), + const form = useForm({ + resolver: yupResolver(AwsFormValues), defaultValues: { connectionName: '', s3: {}, @@ -64,7 +64,7 @@ export default function AwsS3Form(props: Props) { ConnectionService.method.updateConnection ); - async function onSubmit(values: AWSFormValues) { + async function onSubmit(values: AwsFormValues) { try { const connectionResp = await mutateAsync( create(UpdateConnectionRequestSchema, { @@ -81,6 +81,7 @@ export default function AwsS3Form(props: Props) { } return (
+
diff --git a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/GcpCloudStorageForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/GcpCloudStorageForm.tsx index 7384544806..b537429384 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/GcpCloudStorageForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/connections/[id]/components/GcpCloudStorageForm.tsx @@ -1,6 +1,7 @@ 'use client'; import ButtonText from '@/components/ButtonText'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import { Button } from '@/components/ui/button'; @@ -73,6 +74,7 @@ export default function GcpCloudStorageForm(props: Props): ReactElement { return (
+ +): ConnectionMeta[] { + const { data: systemAppConfigData } = useGetSystemAppConfig(); + + return getConnectionsMetadata( + allowedConnectionTypes, + systemAppConfigData?.isGcpCloudStorageConnectionsEnabled ?? false + ); +} + +function getConnectionsMetadata( connectionTypes: Set, isGcpCloudStorageConnectionsEnabled: boolean ): ConnectionMeta[] { @@ -325,7 +340,7 @@ export function buildConnectionConfigDynamoDB( } export function buildConnectionConfigAwsS3( - values: AWSFormValues + values: AwsFormValues ): ConnectionConfig { return create(ConnectionConfigSchema, { config: { diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx index 50e2c2fddb..4f47340bdc 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/aws-s3/AwsS3Form.tsx @@ -2,6 +2,7 @@ import ButtonText from '@/components/ButtonText'; import { PasswordInput } from '@/components/PasswordComponent'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import SkeletonForm from '@/components/skeleton/SkeletonForm'; @@ -20,14 +21,21 @@ import { import { Input } from '@/components/ui/input'; import { getErrorMessage } from '@/util/util'; import { - AWSFormValues, - AWS_FORM_SCHEMA, + AwsFormValues, CreateConnectionFormContext, } from '@/yup-validations/connections'; import { create } from '@bufbuild/protobuf'; -import { createConnectQueryKey, useMutation } from '@connectrpc/connect-query'; +import { + createConnectQueryKey, + useMutation, + useQuery, +} from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { ConnectionService, GetConnectionResponseSchema } from '@neosync/sdk'; +import { + ConnectionService, + GetConnectionResponseSchema, + UserAccountService, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import { useRouter, useSearchParams } from 'next/navigation'; import { useEffect, useState } from 'react'; @@ -45,8 +53,8 @@ export default function AwsS3Form() { const { mutateAsync: isConnectionNameAvailableAsync } = useMutation( ConnectionService.method.isConnectionNameAvailable ); - const form = useForm({ - resolver: yupResolver(AWS_FORM_SCHEMA), + const form = useForm({ + resolver: yupResolver(AwsFormValues), defaultValues: { connectionName: '', s3: { @@ -65,8 +73,11 @@ export default function AwsS3Form() { const { mutateAsync: getAwsS3Connection } = useMutation( ConnectionService.method.getConnection ); + const { data: systemInfo, isLoading: isSystemInfoLoading } = useQuery( + UserAccountService.method.getSystemInformation + ); - async function onSubmit(values: AWSFormValues) { + async function onSubmit(values: AwsFormValues) { if (!account) { return; } @@ -155,9 +166,12 @@ the hook in the useEffect conditionally. This is used to retrieve the values for fetchData(); }, [account?.id]); - if (isLoading || !account?.id) { + if (isLoading || !account?.id || isSystemInfoLoading) { return ; } + if (!systemInfo?.license?.isValid) { + return ; + } return ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx index ea499cf28d..9c3ad7c5da 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/components/ConnectionCard.tsx @@ -8,6 +8,9 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; +import { cn } from '@/libs/utils'; +import { useQuery } from '@connectrpc/connect-query'; +import { UserAccountService } from '@neosync/sdk'; import { useRouter, useSearchParams } from 'next/navigation'; import { ReactElement } from 'react'; import { ConnectionMeta } from '../../../connections/util'; @@ -21,16 +24,29 @@ export default function ConnectionCard(props: Props): ReactElement { const router = useRouter(); const { account } = useAccount(); const searchParams = useSearchParams(); + const { data: systemInfo } = useQuery( + UserAccountService.method.getSystemInformation + ); + const hasValidLicense = systemInfo?.license?.isValid ?? false; + const isClickable = + !connection.isLicenseOnly || (connection.isLicenseOnly && hasValidLicense); return ( + onClick={() => { + if (!isClickable) { + return; + } router.push( `/${account?.name}/new/connection/${ connection.urlSlug }?${searchParams.toString()}` - ) - } - className="cursor-pointer hover:border hover:border-gray-500 dark:border-gray-700 dark:hover:border-gray-600" + ); + }} + className={cn( + 'cursor-pointer hover:border hover:border-gray-500 dark:border-gray-700 dark:hover:border-gray-600', + !isClickable && 'opacity-50', + !isClickable && 'cursor-not-allowed' + )} > @@ -41,6 +57,7 @@ export default function ConnectionCard(props: Props): ReactElement { />

{connection.name}

{connection.isExperimental ? Experimental : null} + {connection.isLicenseOnly ? Enterprise : null}
{connection.description} diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/gcp-cloud-storage/GcpCloudStorageForm.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/gcp-cloud-storage/GcpCloudStorageForm.tsx index aecbaadded..456ea4dc32 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/gcp-cloud-storage/GcpCloudStorageForm.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/gcp-cloud-storage/GcpCloudStorageForm.tsx @@ -1,6 +1,7 @@ 'use client'; import ButtonText from '@/components/ButtonText'; import Spinner from '@/components/Spinner'; +import SystemLicenseAlert from '@/components/SystemLicenseAlert'; import RequiredLabel from '@/components/labels/RequiredLabel'; import { useAccount } from '@/components/providers/account-provider'; import SkeletonForm from '@/components/skeleton/SkeletonForm'; @@ -23,9 +24,17 @@ import { GcpCloudStorageFormValues, } from '@/yup-validations/connections'; import { create } from '@bufbuild/protobuf'; -import { createConnectQueryKey, useMutation } from '@connectrpc/connect-query'; +import { + createConnectQueryKey, + useMutation, + useQuery, +} from '@connectrpc/connect-query'; import { yupResolver } from '@hookform/resolvers/yup'; -import { ConnectionService, GetConnectionResponseSchema } from '@neosync/sdk'; +import { + ConnectionService, + GetConnectionResponseSchema, + UserAccountService, +} from '@neosync/sdk'; import { useQueryClient } from '@tanstack/react-query'; import Error from 'next/error'; import { useRouter, useSearchParams } from 'next/navigation'; @@ -153,12 +162,24 @@ export default function GcpCloudStorageForm(): ReactElement { fetchData(); }, [account?.id]); - if (isLoading || !account?.id || isSystemAppConfigLoading) { + const { data: systemInfo, isLoading: isSystemInfoLoading } = useQuery( + UserAccountService.method.getSystemInformation + ); + + if ( + isLoading || + !account?.id || + isSystemAppConfigLoading || + isSystemInfoLoading + ) { return ; } if (!systemAppConfig?.isGcpCloudStorageConnectionsEnabled) { return ; } + if (!systemInfo?.license?.isValid) { + return ; + } return ( diff --git a/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx b/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx index 160424024d..d2eb290186 100644 --- a/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx +++ b/frontend/apps/web/app/(mgmt)/[account]/new/connection/page.tsx @@ -1,21 +1,16 @@ 'use client'; import OverviewContainer from '@/components/containers/OverviewContainer'; import PageHeader from '@/components/headers/PageHeader'; -import { useGetSystemAppConfig } from '@/libs/hooks/useGetSystemAppConfig'; import { useSearchParams } from 'next/navigation'; import { ReactElement } from 'react'; -import { getConnectionsMetadata } from '../../connections/util'; +import { useGetConnectionsMetadata } from '../../connections/util'; import ConnectionCard from './components/ConnectionCard'; export default function NewConnectionPage(): ReactElement { const searchParams = useSearchParams(); - const { data: systemAppConfigData } = useGetSystemAppConfig(); const connectionTypes = new Set(searchParams.getAll('connectionType')); - const connections = getConnectionsMetadata( - connectionTypes, - systemAppConfigData?.isGcpCloudStorageConnectionsEnabled ?? false - ); + const connections = useGetConnectionsMetadata(connectionTypes); return ( +
+ + {title} +
+ {description} +
+ ); +} diff --git a/frontend/apps/web/yup-validations/connections.ts b/frontend/apps/web/yup-validations/connections.ts index 5101615642..9a17a6b1fd 100644 --- a/frontend/apps/web/yup-validations/connections.ts +++ b/frontend/apps/web/yup-validations/connections.ts @@ -247,7 +247,7 @@ export type AwsCredentialsFormValues = Yup.InferType< typeof AwsCredentialsFormValues >; -export const AWS_FORM_SCHEMA = Yup.object({ +export const AwsFormValues = Yup.object({ connectionName: connectionNameSchema, s3: Yup.object({ bucket: Yup.string().required('The Bucket name is required.'), @@ -258,7 +258,7 @@ export const AWS_FORM_SCHEMA = Yup.object({ }).required('The AWS form fields are required.'), }); -export type AWSFormValues = Yup.InferType; +export type AwsFormValues = Yup.InferType; export const DynamoDbFormValues = Yup.object({ connectionName: connectionNameSchema, diff --git a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts index 0013e41a6a..421a323396 100644 --- a/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts +++ b/frontend/packages/sdk/src/client/mgmt/v1alpha1/user_account_pb.ts @@ -13,7 +13,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file mgmt/v1alpha1/user_account.proto. */ export const file_mgmt_v1alpha1_user_account: GenFile = /*@__PURE__*/ - fileDesc("CiBtZ210L3YxYWxwaGExL3VzZXJfYWNjb3VudC5wcm90bxINbWdtdC52MWFscGhhMSIQCg5HZXRVc2VyUmVxdWVzdCIiCg9HZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIQCg5TZXRVc2VyUmVxdWVzdCIiCg9TZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIYChZHZXRVc2VyQWNjb3VudHNSZXF1ZXN0IkcKF0dldFVzZXJBY2NvdW50c1Jlc3BvbnNlEiwKCGFjY291bnRzGAEgAygLMhoubWdtdC52MWFscGhhMS5Vc2VyQWNjb3VudCJ1CgtVc2VyQWNjb3VudBIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEiwKBHR5cGUYAyABKA4yHi5tZ210LnYxYWxwaGExLlVzZXJBY2NvdW50VHlwZRIeChZoYXNfc3RyaXBlX2N1c3RvbWVyX2lkGAQgASgIIoABCiNDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEiEKCmFjY291bnRfaWQYAiABKAlCCLpIBXIDsAEBSACIAQFCDQoLX2FjY291bnRfaWQilwEKJENvbnZlcnRQZXJzb25hbFRvVGVhbUFjY291bnRSZXNwb25zZRISCgphY2NvdW50X2lkGAEgASgJEiEKFGNoZWNrb3V0X3Nlc3Npb25fdXJsGAIgASgJSACIAQESHwoXbmV3X3BlcnNvbmFsX2FjY291bnRfaWQYAyABKAlCFwoVX2NoZWNrb3V0X3Nlc3Npb25fdXJsIhsKGVNldFBlcnNvbmFsQWNjb3VudFJlcXVlc3QiMAoaU2V0UGVyc29uYWxBY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCSI2ChZJc1VzZXJJbkFjY291bnRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIiUKF0lzVXNlckluQWNjb3VudFJlc3BvbnNlEgoKAm9rGAEgASgIIj8KH0dldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiWAogR2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVzcG9uc2USNAoGY29uZmlnGAEgASgLMiQubWdtdC52MWFscGhhMS5BY2NvdW50VGVtcG9yYWxDb25maWcidQofU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARI0CgZjb25maWcYAiABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJYCiBTZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZRI0CgZjb25maWcYASABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJvChVBY2NvdW50VGVtcG9yYWxDb25maWcSFAoDdXJsGAEgASgJQge6SARyAhABEhoKCW5hbWVzcGFjZRgCIAEoCUIHukgEcgIQARIkChNzeW5jX2pvYl9xdWV1ZV9uYW1lGAMgASgJQge6SARyAhABIkMKGENyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kImsKGUNyZWF0ZVRlYW1BY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCRIhChRjaGVja291dF9zZXNzaW9uX3VybBgCIAEoCUgAiAEBQhcKFV9jaGVja291dF9zZXNzaW9uX3VybCJvCgtBY2NvdW50VXNlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEg0KBWltYWdlGAMgASgJEg0KBWVtYWlsGAQgASgJEigKBHJvbGUYBSABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIjwKHEdldFRlYW1BY2NvdW50TWVtYmVyc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiSgodR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2USKQoFdXNlcnMYASADKAsyGi5tZ210LnYxYWxwaGExLkFjY291bnRVc2VyIlkKHlJlbW92ZVRlYW1BY2NvdW50TWVtYmVyUmVxdWVzdBIZCgd1c2VyX2lkGAEgASgJQgi6SAVyA7ABARIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASIhCh9SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIo4BCh5JbnZpdGVVc2VyVG9UZWFtQWNjb3VudFJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESFgoFZW1haWwYAiABKAlCB7pIBHICEAESLQoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGVIAIgBAUIHCgVfcm9sZSKxAgoNQWNjb3VudEludml0ZRIKCgJpZBgBIAEoCRISCgphY2NvdW50X2lkGAIgASgJEhYKDnNlbmRlcl91c2VyX2lkGAMgASgJEg0KBWVtYWlsGAQgASgJEg0KBXRva2VuGAUgASgJEhAKCGFjY2VwdGVkGAYgASgIEi4KCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmV4cGlyZXNfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEigKBHJvbGUYCiABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIk8KH0ludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVzcG9uc2USLAoGaW52aXRlGAEgASgLMhwubWdtdC52MWFscGhhMS5BY2NvdW50SW52aXRlIjwKHEdldFRlYW1BY2NvdW50SW52aXRlc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiTgodR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2USLQoHaW52aXRlcxgBIAMoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEludml0ZSI2Ch5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIiEKH1JlbW92ZVRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2UiOAoeQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0EhYKBXRva2VuGAEgASgJQge6SARyAhABIk4KH0FjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2USKwoHYWNjb3VudBgBIAEoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQiHQobR2V0U3lzdGVtSW5mb3JtYXRpb25SZXF1ZXN0IpMBChxHZXRTeXN0ZW1JbmZvcm1hdGlvblJlc3BvbnNlEg8KB3ZlcnNpb24YASABKAkSDgoGY29tbWl0GAIgASgJEhAKCGNvbXBpbGVyGAMgASgJEhAKCHBsYXRmb3JtGAQgASgJEi4KCmJ1aWxkX2RhdGUYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIkEKIUdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJcCiJHZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlEjYKBmNvbmZpZxgBIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWcieQohU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEjYKBmNvbmZpZxgCIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWciXAoiU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZRI2CgZjb25maWcYASABKAsyJi5tZ210LnYxYWxwaGExLkFjY291bnRPbmJvYXJkaW5nQ29uZmlnIlMKF0FjY291bnRPbmJvYXJkaW5nQ29uZmlnEiAKGGhhc19jb21wbGV0ZWRfb25ib2FyZGluZxgFIAEoCEoECAEQAkoECAIQA0oECAMQBEoECAQQBSI3ChdHZXRBY2NvdW50U3RhdHVzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASKsAQoYR2V0QWNjb3VudFN0YXR1c1Jlc3BvbnNlEhkKEXVzZWRfcmVjb3JkX2NvdW50GAEgASgEEiEKFGFsbG93ZWRfcmVjb3JkX2NvdW50GAIgASgESACIAQESOQoTc3Vic2NyaXB0aW9uX3N0YXR1cxgDIAEoDjIcLm1nbXQudjFhbHBoYTEuQmlsbGluZ1N0YXR1c0IXChVfYWxsb3dlZF9yZWNvcmRfY291bnQiewobSXNBY2NvdW50U3RhdHVzVmFsaWRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEiMKFnJlcXVlc3RlZF9yZWNvcmRfY291bnQYAiABKARIAIgBAUIZChdfcmVxdWVzdGVkX3JlY29yZF9jb3VudCL3AQocSXNBY2NvdW50U3RhdHVzVmFsaWRSZXNwb25zZRIQCghpc192YWxpZBgBIAEoCBITCgZyZWFzb24YAiABKAlIAIgBARITCgtzaG91bGRfcG9sbBgDIAEoCBI0Cg5hY2NvdW50X3N0YXR1cxgGIAEoDjIcLm1nbXQudjFhbHBoYTEuQWNjb3VudFN0YXR1cxI5ChB0cmlhbF9leHBpcmVzX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgBiAEBQgkKB19yZWFzb25CEwoRX3RyaWFsX2V4cGlyZXNfYXRKBAgEEAVKBAgFEAYiRwonR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkgKKEdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVzcG9uc2USHAoUY2hlY2tvdXRfc2Vzc2lvbl91cmwYASABKAkiRQolR2V0QWNjb3VudEJpbGxpbmdQb3J0YWxTZXNzaW9uUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJECiZHZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb25SZXNwb25zZRIaChJwb3J0YWxfc2Vzc2lvbl91cmwYASABKAkiMAoZR2V0QmlsbGluZ0FjY291bnRzUmVxdWVzdBITCgthY2NvdW50X2lkcxgBIAMoCSJKChpHZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZRIsCghhY2NvdW50cxgBIAMoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQisQEKG1NldEJpbGxpbmdNZXRlckV2ZW50UmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARIbCgpldmVudF9uYW1lGAIgASgJQge6SARyAhABEhYKBXZhbHVlGAMgASgJQge6SARyAhABEhkKCGV2ZW50X2lkGAQgASgJQge6SARyAhABEhYKCXRpbWVzdGFtcBgFIAEoBEgAiAEBQgwKCl90aW1lc3RhbXAiHgocU2V0QmlsbGluZ01ldGVyRXZlbnRSZXNwb25zZSJ3ChJTZXRVc2VyUm9sZVJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESGQoHdXNlcl9pZBgCIAEoCUIIukgFcgOwAQESKAoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGUiFQoTU2V0VXNlclJvbGVSZXNwb25zZSqSAQoPVXNlckFjY291bnRUeXBlEiEKHVVTRVJfQUNDT1VOVF9UWVBFX1VOU1BFQ0lGSUVEEAASHgoaVVNFUl9BQ0NPVU5UX1RZUEVfUEVSU09OQUwQARIaChZVU0VSX0FDQ09VTlRfVFlQRV9URUFNEAISIAocVVNFUl9BQ0NPVU5UX1RZUEVfRU5URVJQUklTRRADKqkBCg1CaWxsaW5nU3RhdHVzEh4KGkJJTExJTkdfU1RBVFVTX1VOU1BFQ0lGSUVEEAASGQoVQklMTElOR19TVEFUVVNfQUNUSVZFEAESGgoWQklMTElOR19TVEFUVVNfRVhQSVJFRBACEh8KG0JJTExJTkdfU1RBVFVTX1RSSUFMX0FDVElWRRADEiAKHEJJTExJTkdfU1RBVFVTX1RSSUFMX0VYUElSRUQQBCqQAgoNQWNjb3VudFN0YXR1cxIlCiFBQ0NPVU5UX1NUQVRVU19SRUFTT05fVU5TUEVDSUZJRUQQABIrCidBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX0lOX0VYUElSRURfU1RBVEUQAxInCiNBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX1RSSUFMX0FDVElWRRAEEigKJEFDQ09VTlRfU1RBVFVTX0FDQ09VTlRfVFJJQUxfRVhQSVJFRBAFIgQIARABIgQIAhACKiRBQ0NPVU5UX1NUQVRVU19FWENFRURTX0FMTE9XRURfTElNSVQqJkFDQ09VTlRfU1RBVFVTX1JFUVVFU1RFRF9FWENFRURTX0xJTUlUKp8BCgtBY2NvdW50Um9sZRIcChhBQ0NPVU5UX1JPTEVfVU5TUEVDSUZJRUQQABIWChJBQ0NPVU5UX1JPTEVfQURNSU4QARIeChpBQ0NPVU5UX1JPTEVfSk9CX0RFVkVMT1BFUhACEhsKF0FDQ09VTlRfUk9MRV9KT0JfVklFV0VSEAMSHQoZQUNDT1VOVF9ST0xFX0pPQl9FWEVDVVRPUhAEMvgWChJVc2VyQWNjb3VudFNlcnZpY2USSgoHR2V0VXNlchIdLm1nbXQudjFhbHBoYTEuR2V0VXNlclJlcXVlc3QaHi5tZ210LnYxYWxwaGExLkdldFVzZXJSZXNwb25zZSIAEkoKB1NldFVzZXISHS5tZ210LnYxYWxwaGExLlNldFVzZXJSZXF1ZXN0Gh4ubWdtdC52MWFscGhhMS5TZXRVc2VyUmVzcG9uc2UiABJiCg9HZXRVc2VyQWNjb3VudHMSJS5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1JlcXVlc3QaJi5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1Jlc3BvbnNlIgASawoSU2V0UGVyc29uYWxBY2NvdW50EigubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXF1ZXN0GikubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXNwb25zZSIAEokBChxDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50EjIubWdtdC52MWFscGhhMS5Db252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBozLm1nbXQudjFhbHBoYTEuQ29udmVydFBlcnNvbmFsVG9UZWFtQWNjb3VudFJlc3BvbnNlIgASaAoRQ3JlYXRlVGVhbUFjY291bnQSJy5tZ210LnYxYWxwaGExLkNyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBooLm1nbXQudjFhbHBoYTEuQ3JlYXRlVGVhbUFjY291bnRSZXNwb25zZSIAEmIKD0lzVXNlckluQWNjb3VudBIlLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVxdWVzdBomLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVzcG9uc2UiABJ9ChhHZXRBY2NvdW50VGVtcG9yYWxDb25maWcSLi5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QaLy5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1Jlc3BvbnNlIgASfQoYU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnEi4ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXF1ZXN0Gi8ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50TWVtYmVycxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudE1lbWJlchItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRNZW1iZXJSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIgASegoXSW52aXRlVXNlclRvVGVhbUFjY291bnQSLS5tZ210LnYxYWxwaGExLkludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVxdWVzdBouLm1nbXQudjFhbHBoYTEuSW52aXRlVXNlclRvVGVhbUFjY291bnRSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50SW52aXRlcxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudEludml0ZRItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlc3BvbnNlIgASegoXQWNjZXB0VGVhbUFjY291bnRJbnZpdGUSLS5tZ210LnYxYWxwaGExLkFjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVxdWVzdBouLm1nbXQudjFhbHBoYTEuQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXNwb25zZSIAEnQKFEdldFN5c3RlbUluZm9ybWF0aW9uEioubWdtdC52MWFscGhhMS5HZXRTeXN0ZW1JbmZvcm1hdGlvblJlcXVlc3QaKy5tZ210LnYxYWxwaGExLkdldFN5c3RlbUluZm9ybWF0aW9uUmVzcG9uc2UiA5ACARKDAQoaR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWcSMC5tZ210LnYxYWxwaGExLkdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBoxLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZSIAEoMBChpTZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZxIwLm1nbXQudjFhbHBoYTEuU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0GjEubWdtdC52MWFscGhhMS5TZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlIgASaAoQR2V0QWNjb3VudFN0YXR1cxImLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudFN0YXR1c1JlcXVlc3QaJy5tZ210LnYxYWxwaGExLkdldEFjY291bnRTdGF0dXNSZXNwb25zZSIDkAIBEnQKFElzQWNjb3VudFN0YXR1c1ZhbGlkEioubWdtdC52MWFscGhhMS5Jc0FjY291bnRTdGF0dXNWYWxpZFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLklzQWNjb3VudFN0YXR1c1ZhbGlkUmVzcG9uc2UiA5ACARKVAQogR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb24SNi5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVxdWVzdBo3Lm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXNwb25zZSIAEo8BCh5HZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb24SNC5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlcXVlc3QaNS5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlc3BvbnNlIgASbgoSR2V0QmlsbGluZ0FjY291bnRzEigubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXF1ZXN0GikubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZSIDkAIBEnEKFFNldEJpbGxpbmdNZXRlckV2ZW50EioubWdtdC52MWFscGhhMS5TZXRCaWxsaW5nTWV0ZXJFdmVudFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLlNldEJpbGxpbmdNZXRlckV2ZW50UmVzcG9uc2UiABJWCgtTZXRVc2VyUm9sZRIhLm1nbXQudjFhbHBoYTEuU2V0VXNlclJvbGVSZXF1ZXN0GiIubWdtdC52MWFscGhhMS5TZXRVc2VyUm9sZVJlc3BvbnNlIgBCzAEKEWNvbS5tZ210LnYxYWxwaGExQhBVc2VyQWNjb3VudFByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); + fileDesc("CiBtZ210L3YxYWxwaGExL3VzZXJfYWNjb3VudC5wcm90bxINbWdtdC52MWFscGhhMSIQCg5HZXRVc2VyUmVxdWVzdCIiCg9HZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIQCg5TZXRVc2VyUmVxdWVzdCIiCg9TZXRVc2VyUmVzcG9uc2USDwoHdXNlcl9pZBgBIAEoCSIYChZHZXRVc2VyQWNjb3VudHNSZXF1ZXN0IkcKF0dldFVzZXJBY2NvdW50c1Jlc3BvbnNlEiwKCGFjY291bnRzGAEgAygLMhoubWdtdC52MWFscGhhMS5Vc2VyQWNjb3VudCJ1CgtVc2VyQWNjb3VudBIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEiwKBHR5cGUYAyABKA4yHi5tZ210LnYxYWxwaGExLlVzZXJBY2NvdW50VHlwZRIeChZoYXNfc3RyaXBlX2N1c3RvbWVyX2lkGAQgASgIIoABCiNDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kEiEKCmFjY291bnRfaWQYAiABKAlCCLpIBXIDsAEBSACIAQFCDQoLX2FjY291bnRfaWQilwEKJENvbnZlcnRQZXJzb25hbFRvVGVhbUFjY291bnRSZXNwb25zZRISCgphY2NvdW50X2lkGAEgASgJEiEKFGNoZWNrb3V0X3Nlc3Npb25fdXJsGAIgASgJSACIAQESHwoXbmV3X3BlcnNvbmFsX2FjY291bnRfaWQYAyABKAlCFwoVX2NoZWNrb3V0X3Nlc3Npb25fdXJsIhsKGVNldFBlcnNvbmFsQWNjb3VudFJlcXVlc3QiMAoaU2V0UGVyc29uYWxBY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCSI2ChZJc1VzZXJJbkFjY291bnRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIiUKF0lzVXNlckluQWNjb3VudFJlc3BvbnNlEgoKAm9rGAEgASgIIj8KH0dldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiWAogR2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVzcG9uc2USNAoGY29uZmlnGAEgASgLMiQubWdtdC52MWFscGhhMS5BY2NvdW50VGVtcG9yYWxDb25maWcidQofU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARI0CgZjb25maWcYAiABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJYCiBTZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZRI0CgZjb25maWcYASABKAsyJC5tZ210LnYxYWxwaGExLkFjY291bnRUZW1wb3JhbENvbmZpZyJvChVBY2NvdW50VGVtcG9yYWxDb25maWcSFAoDdXJsGAEgASgJQge6SARyAhABEhoKCW5hbWVzcGFjZRgCIAEoCUIHukgEcgIQARIkChNzeW5jX2pvYl9xdWV1ZV9uYW1lGAMgASgJQge6SARyAhABIkMKGENyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBInCgRuYW1lGAEgASgJQhm6SBZyFDISXlthLXowLTktXXszLDEwMH0kImsKGUNyZWF0ZVRlYW1BY2NvdW50UmVzcG9uc2USEgoKYWNjb3VudF9pZBgBIAEoCRIhChRjaGVja291dF9zZXNzaW9uX3VybBgCIAEoCUgAiAEBQhcKFV9jaGVja291dF9zZXNzaW9uX3VybCJvCgtBY2NvdW50VXNlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEg0KBWltYWdlGAMgASgJEg0KBWVtYWlsGAQgASgJEigKBHJvbGUYBSABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIjwKHEdldFRlYW1BY2NvdW50TWVtYmVyc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiSgodR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2USKQoFdXNlcnMYASADKAsyGi5tZ210LnYxYWxwaGExLkFjY291bnRVc2VyIlkKHlJlbW92ZVRlYW1BY2NvdW50TWVtYmVyUmVxdWVzdBIZCgd1c2VyX2lkGAEgASgJQgi6SAVyA7ABARIcCgphY2NvdW50X2lkGAIgASgJQgi6SAVyA7ABASIhCh9SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIo4BCh5JbnZpdGVVc2VyVG9UZWFtQWNjb3VudFJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESFgoFZW1haWwYAiABKAlCB7pIBHICEAESLQoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGVIAIgBAUIHCgVfcm9sZSKxAgoNQWNjb3VudEludml0ZRIKCgJpZBgBIAEoCRISCgphY2NvdW50X2lkGAIgASgJEhYKDnNlbmRlcl91c2VyX2lkGAMgASgJEg0KBWVtYWlsGAQgASgJEg0KBXRva2VuGAUgASgJEhAKCGFjY2VwdGVkGAYgASgIEi4KCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmV4cGlyZXNfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEigKBHJvbGUYCiABKA4yGi5tZ210LnYxYWxwaGExLkFjY291bnRSb2xlIk8KH0ludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVzcG9uc2USLAoGaW52aXRlGAEgASgLMhwubWdtdC52MWFscGhhMS5BY2NvdW50SW52aXRlIjwKHEdldFRlYW1BY2NvdW50SW52aXRlc1JlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQEiTgodR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2USLQoHaW52aXRlcxgBIAMoCzIcLm1nbXQudjFhbHBoYTEuQWNjb3VudEludml0ZSI2Ch5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlcXVlc3QSFAoCaWQYASABKAlCCLpIBXIDsAEBIiEKH1JlbW92ZVRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2UiOAoeQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0EhYKBXRva2VuGAEgASgJQge6SARyAhABIk4KH0FjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVzcG9uc2USKwoHYWNjb3VudBgBIAEoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQiHQobR2V0U3lzdGVtSW5mb3JtYXRpb25SZXF1ZXN0IsIBChxHZXRTeXN0ZW1JbmZvcm1hdGlvblJlc3BvbnNlEg8KB3ZlcnNpb24YASABKAkSDgoGY29tbWl0GAIgASgJEhAKCGNvbXBpbGVyGAMgASgJEhAKCHBsYXRmb3JtGAQgASgJEi4KCmJ1aWxkX2RhdGUYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi0KB2xpY2Vuc2UYBiABKAsyHC5tZ210LnYxYWxwaGExLlN5c3RlbUxpY2Vuc2UiawoNU3lzdGVtTGljZW5zZRIQCghpc192YWxpZBgBIAEoCBIuCgpleHBpcmVzX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIYChBpc19uZW9zeW5jX2Nsb3VkGAMgASgIIkEKIUdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJcCiJHZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlEjYKBmNvbmZpZxgBIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWcieQohU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEjYKBmNvbmZpZxgCIAEoCzImLm1nbXQudjFhbHBoYTEuQWNjb3VudE9uYm9hcmRpbmdDb25maWciXAoiU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZRI2CgZjb25maWcYASABKAsyJi5tZ210LnYxYWxwaGExLkFjY291bnRPbmJvYXJkaW5nQ29uZmlnIlMKF0FjY291bnRPbmJvYXJkaW5nQ29uZmlnEiAKGGhhc19jb21wbGV0ZWRfb25ib2FyZGluZxgFIAEoCEoECAEQAkoECAIQA0oECAMQBEoECAQQBSI3ChdHZXRBY2NvdW50U3RhdHVzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASKsAQoYR2V0QWNjb3VudFN0YXR1c1Jlc3BvbnNlEhkKEXVzZWRfcmVjb3JkX2NvdW50GAEgASgEEiEKFGFsbG93ZWRfcmVjb3JkX2NvdW50GAIgASgESACIAQESOQoTc3Vic2NyaXB0aW9uX3N0YXR1cxgDIAEoDjIcLm1nbXQudjFhbHBoYTEuQmlsbGluZ1N0YXR1c0IXChVfYWxsb3dlZF9yZWNvcmRfY291bnQiewobSXNBY2NvdW50U3RhdHVzVmFsaWRSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBEiMKFnJlcXVlc3RlZF9yZWNvcmRfY291bnQYAiABKARIAIgBAUIZChdfcmVxdWVzdGVkX3JlY29yZF9jb3VudCL3AQocSXNBY2NvdW50U3RhdHVzVmFsaWRSZXNwb25zZRIQCghpc192YWxpZBgBIAEoCBITCgZyZWFzb24YAiABKAlIAIgBARITCgtzaG91bGRfcG9sbBgDIAEoCBI0Cg5hY2NvdW50X3N0YXR1cxgGIAEoDjIcLm1nbXQudjFhbHBoYTEuQWNjb3VudFN0YXR1cxI5ChB0cmlhbF9leHBpcmVzX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgBiAEBQgkKB19yZWFzb25CEwoRX3RyaWFsX2V4cGlyZXNfYXRKBAgEEAVKBAgFEAYiRwonR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkgKKEdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVzcG9uc2USHAoUY2hlY2tvdXRfc2Vzc2lvbl91cmwYASABKAkiRQolR2V0QWNjb3VudEJpbGxpbmdQb3J0YWxTZXNzaW9uUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJECiZHZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb25SZXNwb25zZRIaChJwb3J0YWxfc2Vzc2lvbl91cmwYASABKAkiMAoZR2V0QmlsbGluZ0FjY291bnRzUmVxdWVzdBITCgthY2NvdW50X2lkcxgBIAMoCSJKChpHZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZRIsCghhY2NvdW50cxgBIAMoCzIaLm1nbXQudjFhbHBoYTEuVXNlckFjY291bnQisQEKG1NldEJpbGxpbmdNZXRlckV2ZW50UmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABARIbCgpldmVudF9uYW1lGAIgASgJQge6SARyAhABEhYKBXZhbHVlGAMgASgJQge6SARyAhABEhkKCGV2ZW50X2lkGAQgASgJQge6SARyAhABEhYKCXRpbWVzdGFtcBgFIAEoBEgAiAEBQgwKCl90aW1lc3RhbXAiHgocU2V0QmlsbGluZ01ldGVyRXZlbnRSZXNwb25zZSJ3ChJTZXRVc2VyUm9sZVJlcXVlc3QSHAoKYWNjb3VudF9pZBgBIAEoCUIIukgFcgOwAQESGQoHdXNlcl9pZBgCIAEoCUIIukgFcgOwAQESKAoEcm9sZRgDIAEoDjIaLm1nbXQudjFhbHBoYTEuQWNjb3VudFJvbGUiFQoTU2V0VXNlclJvbGVSZXNwb25zZSqSAQoPVXNlckFjY291bnRUeXBlEiEKHVVTRVJfQUNDT1VOVF9UWVBFX1VOU1BFQ0lGSUVEEAASHgoaVVNFUl9BQ0NPVU5UX1RZUEVfUEVSU09OQUwQARIaChZVU0VSX0FDQ09VTlRfVFlQRV9URUFNEAISIAocVVNFUl9BQ0NPVU5UX1RZUEVfRU5URVJQUklTRRADKqkBCg1CaWxsaW5nU3RhdHVzEh4KGkJJTExJTkdfU1RBVFVTX1VOU1BFQ0lGSUVEEAASGQoVQklMTElOR19TVEFUVVNfQUNUSVZFEAESGgoWQklMTElOR19TVEFUVVNfRVhQSVJFRBACEh8KG0JJTExJTkdfU1RBVFVTX1RSSUFMX0FDVElWRRADEiAKHEJJTExJTkdfU1RBVFVTX1RSSUFMX0VYUElSRUQQBCqQAgoNQWNjb3VudFN0YXR1cxIlCiFBQ0NPVU5UX1NUQVRVU19SRUFTT05fVU5TUEVDSUZJRUQQABIrCidBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX0lOX0VYUElSRURfU1RBVEUQAxInCiNBQ0NPVU5UX1NUQVRVU19BQ0NPVU5UX1RSSUFMX0FDVElWRRAEEigKJEFDQ09VTlRfU1RBVFVTX0FDQ09VTlRfVFJJQUxfRVhQSVJFRBAFIgQIARABIgQIAhACKiRBQ0NPVU5UX1NUQVRVU19FWENFRURTX0FMTE9XRURfTElNSVQqJkFDQ09VTlRfU1RBVFVTX1JFUVVFU1RFRF9FWENFRURTX0xJTUlUKp8BCgtBY2NvdW50Um9sZRIcChhBQ0NPVU5UX1JPTEVfVU5TUEVDSUZJRUQQABIWChJBQ0NPVU5UX1JPTEVfQURNSU4QARIeChpBQ0NPVU5UX1JPTEVfSk9CX0RFVkVMT1BFUhACEhsKF0FDQ09VTlRfUk9MRV9KT0JfVklFV0VSEAMSHQoZQUNDT1VOVF9ST0xFX0pPQl9FWEVDVVRPUhAEMvgWChJVc2VyQWNjb3VudFNlcnZpY2USSgoHR2V0VXNlchIdLm1nbXQudjFhbHBoYTEuR2V0VXNlclJlcXVlc3QaHi5tZ210LnYxYWxwaGExLkdldFVzZXJSZXNwb25zZSIAEkoKB1NldFVzZXISHS5tZ210LnYxYWxwaGExLlNldFVzZXJSZXF1ZXN0Gh4ubWdtdC52MWFscGhhMS5TZXRVc2VyUmVzcG9uc2UiABJiCg9HZXRVc2VyQWNjb3VudHMSJS5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1JlcXVlc3QaJi5tZ210LnYxYWxwaGExLkdldFVzZXJBY2NvdW50c1Jlc3BvbnNlIgASawoSU2V0UGVyc29uYWxBY2NvdW50EigubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXF1ZXN0GikubWdtdC52MWFscGhhMS5TZXRQZXJzb25hbEFjY291bnRSZXNwb25zZSIAEokBChxDb252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50EjIubWdtdC52MWFscGhhMS5Db252ZXJ0UGVyc29uYWxUb1RlYW1BY2NvdW50UmVxdWVzdBozLm1nbXQudjFhbHBoYTEuQ29udmVydFBlcnNvbmFsVG9UZWFtQWNjb3VudFJlc3BvbnNlIgASaAoRQ3JlYXRlVGVhbUFjY291bnQSJy5tZ210LnYxYWxwaGExLkNyZWF0ZVRlYW1BY2NvdW50UmVxdWVzdBooLm1nbXQudjFhbHBoYTEuQ3JlYXRlVGVhbUFjY291bnRSZXNwb25zZSIAEmIKD0lzVXNlckluQWNjb3VudBIlLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVxdWVzdBomLm1nbXQudjFhbHBoYTEuSXNVc2VySW5BY2NvdW50UmVzcG9uc2UiABJ9ChhHZXRBY2NvdW50VGVtcG9yYWxDb25maWcSLi5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1JlcXVlc3QaLy5tZ210LnYxYWxwaGExLkdldEFjY291bnRUZW1wb3JhbENvbmZpZ1Jlc3BvbnNlIgASfQoYU2V0QWNjb3VudFRlbXBvcmFsQ29uZmlnEi4ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXF1ZXN0Gi8ubWdtdC52MWFscGhhMS5TZXRBY2NvdW50VGVtcG9yYWxDb25maWdSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50TWVtYmVycxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRNZW1iZXJzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudE1lbWJlchItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRNZW1iZXJSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudE1lbWJlclJlc3BvbnNlIgASegoXSW52aXRlVXNlclRvVGVhbUFjY291bnQSLS5tZ210LnYxYWxwaGExLkludml0ZVVzZXJUb1RlYW1BY2NvdW50UmVxdWVzdBouLm1nbXQudjFhbHBoYTEuSW52aXRlVXNlclRvVGVhbUFjY291bnRSZXNwb25zZSIAEnQKFUdldFRlYW1BY2NvdW50SW52aXRlcxIrLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVxdWVzdBosLm1nbXQudjFhbHBoYTEuR2V0VGVhbUFjY291bnRJbnZpdGVzUmVzcG9uc2UiABJ6ChdSZW1vdmVUZWFtQWNjb3VudEludml0ZRItLm1nbXQudjFhbHBoYTEuUmVtb3ZlVGVhbUFjY291bnRJbnZpdGVSZXF1ZXN0Gi4ubWdtdC52MWFscGhhMS5SZW1vdmVUZWFtQWNjb3VudEludml0ZVJlc3BvbnNlIgASegoXQWNjZXB0VGVhbUFjY291bnRJbnZpdGUSLS5tZ210LnYxYWxwaGExLkFjY2VwdFRlYW1BY2NvdW50SW52aXRlUmVxdWVzdBouLm1nbXQudjFhbHBoYTEuQWNjZXB0VGVhbUFjY291bnRJbnZpdGVSZXNwb25zZSIAEnQKFEdldFN5c3RlbUluZm9ybWF0aW9uEioubWdtdC52MWFscGhhMS5HZXRTeXN0ZW1JbmZvcm1hdGlvblJlcXVlc3QaKy5tZ210LnYxYWxwaGExLkdldFN5c3RlbUluZm9ybWF0aW9uUmVzcG9uc2UiA5ACARKDAQoaR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWcSMC5tZ210LnYxYWxwaGExLkdldEFjY291bnRPbmJvYXJkaW5nQ29uZmlnUmVxdWVzdBoxLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXNwb25zZSIAEoMBChpTZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZxIwLm1nbXQudjFhbHBoYTEuU2V0QWNjb3VudE9uYm9hcmRpbmdDb25maWdSZXF1ZXN0GjEubWdtdC52MWFscGhhMS5TZXRBY2NvdW50T25ib2FyZGluZ0NvbmZpZ1Jlc3BvbnNlIgASaAoQR2V0QWNjb3VudFN0YXR1cxImLm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudFN0YXR1c1JlcXVlc3QaJy5tZ210LnYxYWxwaGExLkdldEFjY291bnRTdGF0dXNSZXNwb25zZSIDkAIBEnQKFElzQWNjb3VudFN0YXR1c1ZhbGlkEioubWdtdC52MWFscGhhMS5Jc0FjY291bnRTdGF0dXNWYWxpZFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLklzQWNjb3VudFN0YXR1c1ZhbGlkUmVzcG9uc2UiA5ACARKVAQogR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb24SNi5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nQ2hlY2tvdXRTZXNzaW9uUmVxdWVzdBo3Lm1nbXQudjFhbHBoYTEuR2V0QWNjb3VudEJpbGxpbmdDaGVja291dFNlc3Npb25SZXNwb25zZSIAEo8BCh5HZXRBY2NvdW50QmlsbGluZ1BvcnRhbFNlc3Npb24SNC5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlcXVlc3QaNS5tZ210LnYxYWxwaGExLkdldEFjY291bnRCaWxsaW5nUG9ydGFsU2Vzc2lvblJlc3BvbnNlIgASbgoSR2V0QmlsbGluZ0FjY291bnRzEigubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXF1ZXN0GikubWdtdC52MWFscGhhMS5HZXRCaWxsaW5nQWNjb3VudHNSZXNwb25zZSIDkAIBEnEKFFNldEJpbGxpbmdNZXRlckV2ZW50EioubWdtdC52MWFscGhhMS5TZXRCaWxsaW5nTWV0ZXJFdmVudFJlcXVlc3QaKy5tZ210LnYxYWxwaGExLlNldEJpbGxpbmdNZXRlckV2ZW50UmVzcG9uc2UiABJWCgtTZXRVc2VyUm9sZRIhLm1nbXQudjFhbHBoYTEuU2V0VXNlclJvbGVSZXF1ZXN0GiIubWdtdC52MWFscGhhMS5TZXRVc2VyUm9sZVJlc3BvbnNlIgBCzAEKEWNvbS5tZ210LnYxYWxwaGExQhBVc2VyQWNjb3VudFByb3RvUAFaUGdpdGh1Yi5jb20vbnVjbGV1c2Nsb3VkL25lb3N5bmMvYmFja2VuZC9nZW4vZ28vcHJvdG9zL21nbXQvdjFhbHBoYTE7bWdtdHYxYWxwaGExogIDTVhYqgINTWdtdC5WMWFscGhhMcoCDU1nbXRcVjFhbHBoYTHiAhlNZ210XFYxYWxwaGExXEdQQk1ldGFkYXRh6gIOTWdtdDo6VjFhbHBoYTFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); /** * @generated from message mgmt.v1alpha1.GetUserRequest @@ -778,9 +778,18 @@ export type GetSystemInformationResponse = Message<"mgmt.v1alpha1.GetSystemInfor platform: string; /** + * The time when the build was created + * * @generated from field: google.protobuf.Timestamp build_date = 5; */ buildDate?: Timestamp; + + /** + * The license information for the system + * + * @generated from field: mgmt.v1alpha1.SystemLicense license = 6; + */ + license?: SystemLicense; }; /** @@ -790,6 +799,39 @@ export type GetSystemInformationResponse = Message<"mgmt.v1alpha1.GetSystemInfor export const GetSystemInformationResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_mgmt_v1alpha1_user_account, 35); +/** + * @generated from message mgmt.v1alpha1.SystemLicense + */ +export type SystemLicense = Message<"mgmt.v1alpha1.SystemLicense"> & { + /** + * Whether or not a valid license was found + * + * @generated from field: bool is_valid = 1; + */ + isValid: boolean; + + /** + * The time when the license expires + * + * @generated from field: google.protobuf.Timestamp expires_at = 2; + */ + expiresAt?: Timestamp; + + /** + * Whether or not the license is for NeosyncCloud + * + * @generated from field: bool is_neosync_cloud = 3; + */ + isNeosyncCloud: boolean; +}; + +/** + * Describes the message mgmt.v1alpha1.SystemLicense. + * Use `create(SystemLicenseSchema)` to create a new message. + */ +export const SystemLicenseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_mgmt_v1alpha1_user_account, 36); + /** * @generated from message mgmt.v1alpha1.GetAccountOnboardingConfigRequest */ @@ -805,7 +847,7 @@ export type GetAccountOnboardingConfigRequest = Message<"mgmt.v1alpha1.GetAccoun * Use `create(GetAccountOnboardingConfigRequestSchema)` to create a new message. */ export const GetAccountOnboardingConfigRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 36); + messageDesc(file_mgmt_v1alpha1_user_account, 37); /** * @generated from message mgmt.v1alpha1.GetAccountOnboardingConfigResponse @@ -822,7 +864,7 @@ export type GetAccountOnboardingConfigResponse = Message<"mgmt.v1alpha1.GetAccou * Use `create(GetAccountOnboardingConfigResponseSchema)` to create a new message. */ export const GetAccountOnboardingConfigResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 37); + messageDesc(file_mgmt_v1alpha1_user_account, 38); /** * @generated from message mgmt.v1alpha1.SetAccountOnboardingConfigRequest @@ -844,7 +886,7 @@ export type SetAccountOnboardingConfigRequest = Message<"mgmt.v1alpha1.SetAccoun * Use `create(SetAccountOnboardingConfigRequestSchema)` to create a new message. */ export const SetAccountOnboardingConfigRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 38); + messageDesc(file_mgmt_v1alpha1_user_account, 39); /** * @generated from message mgmt.v1alpha1.SetAccountOnboardingConfigResponse @@ -861,7 +903,7 @@ export type SetAccountOnboardingConfigResponse = Message<"mgmt.v1alpha1.SetAccou * Use `create(SetAccountOnboardingConfigResponseSchema)` to create a new message. */ export const SetAccountOnboardingConfigResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 39); + messageDesc(file_mgmt_v1alpha1_user_account, 40); /** * @generated from message mgmt.v1alpha1.AccountOnboardingConfig @@ -878,7 +920,7 @@ export type AccountOnboardingConfig = Message<"mgmt.v1alpha1.AccountOnboardingCo * Use `create(AccountOnboardingConfigSchema)` to create a new message. */ export const AccountOnboardingConfigSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 40); + messageDesc(file_mgmt_v1alpha1_user_account, 41); /** * @generated from message mgmt.v1alpha1.GetAccountStatusRequest @@ -895,7 +937,7 @@ export type GetAccountStatusRequest = Message<"mgmt.v1alpha1.GetAccountStatusReq * Use `create(GetAccountStatusRequestSchema)` to create a new message. */ export const GetAccountStatusRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 41); + messageDesc(file_mgmt_v1alpha1_user_account, 42); /** * @generated from message mgmt.v1alpha1.GetAccountStatusResponse @@ -929,7 +971,7 @@ export type GetAccountStatusResponse = Message<"mgmt.v1alpha1.GetAccountStatusRe * Use `create(GetAccountStatusResponseSchema)` to create a new message. */ export const GetAccountStatusResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 42); + messageDesc(file_mgmt_v1alpha1_user_account, 43); /** * @generated from message mgmt.v1alpha1.IsAccountStatusValidRequest @@ -953,7 +995,7 @@ export type IsAccountStatusValidRequest = Message<"mgmt.v1alpha1.IsAccountStatus * Use `create(IsAccountStatusValidRequestSchema)` to create a new message. */ export const IsAccountStatusValidRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 43); + messageDesc(file_mgmt_v1alpha1_user_account, 44); /** * @generated from message mgmt.v1alpha1.IsAccountStatusValidResponse @@ -998,7 +1040,7 @@ export type IsAccountStatusValidResponse = Message<"mgmt.v1alpha1.IsAccountStatu * Use `create(IsAccountStatusValidResponseSchema)` to create a new message. */ export const IsAccountStatusValidResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 44); + messageDesc(file_mgmt_v1alpha1_user_account, 45); /** * @generated from message mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest @@ -1015,7 +1057,7 @@ export type GetAccountBillingCheckoutSessionRequest = Message<"mgmt.v1alpha1.Get * Use `create(GetAccountBillingCheckoutSessionRequestSchema)` to create a new message. */ export const GetAccountBillingCheckoutSessionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 45); + messageDesc(file_mgmt_v1alpha1_user_account, 46); /** * @generated from message mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse @@ -1034,7 +1076,7 @@ export type GetAccountBillingCheckoutSessionResponse = Message<"mgmt.v1alpha1.Ge * Use `create(GetAccountBillingCheckoutSessionResponseSchema)` to create a new message. */ export const GetAccountBillingCheckoutSessionResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 46); + messageDesc(file_mgmt_v1alpha1_user_account, 47); /** * @generated from message mgmt.v1alpha1.GetAccountBillingPortalSessionRequest @@ -1051,7 +1093,7 @@ export type GetAccountBillingPortalSessionRequest = Message<"mgmt.v1alpha1.GetAc * Use `create(GetAccountBillingPortalSessionRequestSchema)` to create a new message. */ export const GetAccountBillingPortalSessionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 47); + messageDesc(file_mgmt_v1alpha1_user_account, 48); /** * @generated from message mgmt.v1alpha1.GetAccountBillingPortalSessionResponse @@ -1070,7 +1112,7 @@ export type GetAccountBillingPortalSessionResponse = Message<"mgmt.v1alpha1.GetA * Use `create(GetAccountBillingPortalSessionResponseSchema)` to create a new message. */ export const GetAccountBillingPortalSessionResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 48); + messageDesc(file_mgmt_v1alpha1_user_account, 49); /** * @generated from message mgmt.v1alpha1.GetBillingAccountsRequest @@ -1089,7 +1131,7 @@ export type GetBillingAccountsRequest = Message<"mgmt.v1alpha1.GetBillingAccount * Use `create(GetBillingAccountsRequestSchema)` to create a new message. */ export const GetBillingAccountsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 49); + messageDesc(file_mgmt_v1alpha1_user_account, 50); /** * @generated from message mgmt.v1alpha1.GetBillingAccountsResponse @@ -1106,7 +1148,7 @@ export type GetBillingAccountsResponse = Message<"mgmt.v1alpha1.GetBillingAccoun * Use `create(GetBillingAccountsResponseSchema)` to create a new message. */ export const GetBillingAccountsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 50); + messageDesc(file_mgmt_v1alpha1_user_account, 51); /** * @generated from message mgmt.v1alpha1.SetBillingMeterEventRequest @@ -1153,7 +1195,7 @@ export type SetBillingMeterEventRequest = Message<"mgmt.v1alpha1.SetBillingMeter * Use `create(SetBillingMeterEventRequestSchema)` to create a new message. */ export const SetBillingMeterEventRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 51); + messageDesc(file_mgmt_v1alpha1_user_account, 52); /** * @generated from message mgmt.v1alpha1.SetBillingMeterEventResponse @@ -1166,7 +1208,7 @@ export type SetBillingMeterEventResponse = Message<"mgmt.v1alpha1.SetBillingMete * Use `create(SetBillingMeterEventResponseSchema)` to create a new message. */ export const SetBillingMeterEventResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 52); + messageDesc(file_mgmt_v1alpha1_user_account, 53); /** * @generated from message mgmt.v1alpha1.SetUserRoleRequest @@ -1199,7 +1241,7 @@ export type SetUserRoleRequest = Message<"mgmt.v1alpha1.SetUserRoleRequest"> & { * Use `create(SetUserRoleRequestSchema)` to create a new message. */ export const SetUserRoleRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 53); + messageDesc(file_mgmt_v1alpha1_user_account, 54); /** * @generated from message mgmt.v1alpha1.SetUserRoleResponse @@ -1212,7 +1254,7 @@ export type SetUserRoleResponse = Message<"mgmt.v1alpha1.SetUserRoleResponse"> & * Use `create(SetUserRoleResponseSchema)` to create a new message. */ export const SetUserRoleResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mgmt_v1alpha1_user_account, 54); + messageDesc(file_mgmt_v1alpha1_user_account, 55); /** * @generated from enum mgmt.v1alpha1.UserAccountType diff --git a/internal/ee/cloud-license/license.go b/internal/ee/cloud-license/license.go index 405250de4d..7044724f30 100644 --- a/internal/ee/cloud-license/license.go +++ b/internal/ee/cloud-license/license.go @@ -25,6 +25,7 @@ type licenseFile struct { type Interface interface { IsValid() bool + ExpiresAt() time.Time } var _ Interface = (*CloudLicense)(nil) @@ -51,6 +52,13 @@ func (c *CloudLicense) IsValid() bool { return c.contents != nil && c.contents.IsValid() } +func (c *CloudLicense) ExpiresAt() time.Time { + if c.contents == nil { + return time.Now().UTC() + } + return c.contents.ExpiresAt +} + type licenseContents struct { Version string `json:"version"` Id string `json:"id"` diff --git a/internal/ee/license/cascade.go b/internal/ee/license/cascade.go index 39b88e364c..37a46316b1 100644 --- a/internal/ee/license/cascade.go +++ b/internal/ee/license/cascade.go @@ -1,21 +1,30 @@ package license +import "time" + type CascadeLicense struct { - isValid bool + isValid bool + expiresAt time.Time } // Checks multiple licenses in input order to see if any are valid func NewCascadeLicense(licenses ...EEInterface) *CascadeLicense { isValid := false + expiresAt := time.Time{} for _, l := range licenses { if l.IsValid() { isValid = true + expiresAt = l.ExpiresAt() break } } - return &CascadeLicense{isValid: isValid} + return &CascadeLicense{isValid: isValid, expiresAt: expiresAt} } func (c *CascadeLicense) IsValid() bool { return c.isValid } + +func (c *CascadeLicense) ExpiresAt() time.Time { + return c.expiresAt +} diff --git a/internal/ee/license/license.go b/internal/ee/license/license.go index 61571c5d95..1726340871 100644 --- a/internal/ee/license/license.go +++ b/internal/ee/license/license.go @@ -29,6 +29,7 @@ type licenseFile struct { type EEInterface interface { IsValid() bool + ExpiresAt() time.Time } var _ EEInterface = (*EELicense)(nil) @@ -41,6 +42,13 @@ func (e *EELicense) IsValid() bool { return e.contents != nil && e.contents.IsValid() } +func (e *EELicense) ExpiresAt() time.Time { + if e.contents == nil { + return time.Now().UTC() + } + return e.contents.ExpiresAt +} + // Retrieves the EE license from the environment // If not enabled, will still return valid struct. // Errors if not able to properly parse a provided EE license from the environment diff --git a/internal/testutil/utils.go b/internal/testutil/utils.go index b47b715089..c93fa2bd0b 100644 --- a/internal/testutil/utils.go +++ b/internal/testutil/utils.go @@ -12,6 +12,7 @@ import ( "path/filepath" "runtime" "testing" + "time" "github.com/neilotoole/slogt" "github.com/testcontainers/testcontainers-go" @@ -86,6 +87,10 @@ func (f *FakeEELicense) IsValid() bool { return f.isValid } +func (f *FakeEELicense) ExpiresAt() time.Time { + return time.Now().Add(time.Hour * 24 * 365) +} + func GetConcurrentTestLogger(t testing.TB) *slog.Logger { if testing.Verbose() { return slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{})) diff --git a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py index 3675daf42f..aba79643d5 100644 --- a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py +++ b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.py @@ -26,7 +26,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n mgmt/v1alpha1/user_account.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x10\n\x0eGetUserRequest\"*\n\x0fGetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x10\n\x0eSetUserRequest\"*\n\x0fSetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x18\n\x16GetUserAccountsRequest\"Q\n\x17GetUserAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\x9a\x01\n\x0bUserAccount\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x32\n\x04type\x18\x03 \x01(\x0e\x32\x1e.mgmt.v1alpha1.UserAccountTypeR\x04type\x12\x33\n\x16has_stripe_customer_id\x18\x04 \x01(\x08R\x13hasStripeCustomerId\"\x91\x01\n#ConvertPersonalToTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12,\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x88\x01\x01\x42\r\n\x0b_account_id\"\xcc\x01\n$ConvertPersonalToTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x12\x35\n\x17new_personal_account_id\x18\x03 \x01(\tR\x14newPersonalAccountIdB\x17\n\x15_checkout_session_url\"\x1b\n\x19SetPersonalAccountRequest\";\n\x1aSetPersonalAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\"A\n\x16IsUserInAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\")\n\x17IsUserInAccountResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\"J\n\x1fGetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"`\n GetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x88\x01\n\x1fSetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12<\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"`\n SetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x91\x01\n\x15\x41\x63\x63ountTemporalConfig\x12\x19\n\x03url\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x03url\x12%\n\tnamespace\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tnamespace\x12\x36\n\x13sync_job_queue_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x10syncJobQueueName\"I\n\x18\x43reateTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\"\x8a\x01\n\x19\x43reateTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x42\x17\n\x15_checkout_session_url\"\x8d\x01\n\x0b\x41\x63\x63ountUser\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05image\x18\x03 \x01(\tR\x05image\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12.\n\x04role\x18\x05 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"G\n\x1cGetTeamAccountMembersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"Q\n\x1dGetTeamAccountMembersResponse\x12\x30\n\x05users\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.AccountUserR\x05users\"l\n\x1eRemoveTeamAccountMemberRequest\x12!\n\x07user_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"!\n\x1fRemoveTeamAccountMemberResponse\"\xa6\x01\n\x1eInviteUserToTeamAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x1d\n\x05\x65mail\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05\x65mail\x12\x33\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleH\x00R\x04role\x88\x01\x01\x42\x07\n\x05_role\"\x8d\x03\n\rAccountInvite\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\naccount_id\x18\x02 \x01(\tR\taccountId\x12$\n\x0esender_user_id\x18\x03 \x01(\tR\x0csenderUserId\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12\x1a\n\x08\x61\x63\x63\x65pted\x18\x06 \x01(\x08R\x08\x61\x63\x63\x65pted\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x39\n\nexpires_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12.\n\x04role\x18\n \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"W\n\x1fInviteUserToTeamAccountResponse\x12\x34\n\x06invite\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x06invite\"G\n\x1cGetTeamAccountInvitesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n\x1dGetTeamAccountInvitesResponse\x12\x36\n\x07invites\x18\x01 \x03(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x07invites\":\n\x1eRemoveTeamAccountInviteRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"!\n\x1fRemoveTeamAccountInviteResponse\"?\n\x1e\x41\x63\x63\x65ptTeamAccountInviteRequest\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05token\"W\n\x1f\x41\x63\x63\x65ptTeamAccountInviteResponse\x12\x34\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x07\x61\x63\x63ount\"\x1d\n\x1bGetSystemInformationRequest\"\xc3\x01\n\x1cGetSystemInformationResponse\x12\x18\n\x07version\x18\x01 \x01(\tR\x07version\x12\x16\n\x06\x63ommit\x18\x02 \x01(\tR\x06\x63ommit\x12\x1a\n\x08\x63ompiler\x18\x03 \x01(\tR\x08\x63ompiler\x12\x1a\n\x08platform\x18\x04 \x01(\tR\x08platform\x12\x39\n\nbuild_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tbuildDate\"L\n!GetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"d\n\"GetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"\x8c\x01\n!SetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12>\n\x06\x63onfig\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"d\n\"SetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"k\n\x17\x41\x63\x63ountOnboardingConfig\x12\x38\n\x18has_completed_onboarding\x18\x05 \x01(\x08R\x16hasCompletedOnboardingJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"B\n\x17GetAccountStatusRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\xe5\x01\n\x18GetAccountStatusResponse\x12*\n\x11used_record_count\x18\x01 \x01(\x04R\x0fusedRecordCount\x12\x35\n\x14\x61llowed_record_count\x18\x02 \x01(\x04H\x00R\x12\x61llowedRecordCount\x88\x01\x01\x12M\n\x13subscription_status\x18\x03 \x01(\x0e\x32\x1c.mgmt.v1alpha1.BillingStatusR\x12subscriptionStatusB\x17\n\x15_allowed_record_count\"\x9c\x01\n\x1bIsAccountStatusValidRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x39\n\x16requested_record_count\x18\x02 \x01(\x04H\x00R\x14requestedRecordCount\x88\x01\x01\x42\x19\n\x17_requested_record_count\"\xb3\x02\n\x1cIsAccountStatusValidResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x1b\n\x06reason\x18\x02 \x01(\tH\x00R\x06reason\x88\x01\x01\x12\x1f\n\x0bshould_poll\x18\x03 \x01(\x08R\nshouldPoll\x12\x43\n\x0e\x61\x63\x63ount_status\x18\x06 \x01(\x0e\x32\x1c.mgmt.v1alpha1.AccountStatusR\raccountStatus\x12I\n\x10trial_expires_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01R\x0etrialExpiresAt\x88\x01\x01\x42\t\n\x07_reasonB\x13\n\x11_trial_expires_atJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\"R\n\'GetAccountBillingCheckoutSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n(GetAccountBillingCheckoutSessionResponse\x12\x30\n\x14\x63heckout_session_url\x18\x01 \x01(\tR\x12\x63heckoutSessionUrl\"P\n%GetAccountBillingPortalSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"V\n&GetAccountBillingPortalSessionResponse\x12,\n\x12portal_session_url\x18\x01 \x01(\tR\x10portalSessionUrl\"<\n\x19GetBillingAccountsRequest\x12\x1f\n\x0b\x61\x63\x63ount_ids\x18\x01 \x03(\tR\naccountIds\"T\n\x1aGetBillingAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\xe2\x01\n\x1bSetBillingMeterEventRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12&\n\nevent_name\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\teventName\x12\x1d\n\x05value\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12\"\n\x08\x65vent_id\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x07\x65ventId\x12!\n\ttimestamp\x18\x05 \x01(\x04H\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x1e\n\x1cSetBillingMeterEventResponse\"\x90\x01\n\x12SetUserRoleRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12!\n\x07user_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12.\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"\x15\n\x13SetUserRoleResponse*\x92\x01\n\x0fUserAccountType\x12!\n\x1dUSER_ACCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aUSER_ACCOUNT_TYPE_PERSONAL\x10\x01\x12\x1a\n\x16USER_ACCOUNT_TYPE_TEAM\x10\x02\x12 \n\x1cUSER_ACCOUNT_TYPE_ENTERPRISE\x10\x03*\xa9\x01\n\rBillingStatus\x12\x1e\n\x1a\x42ILLING_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x42ILLING_STATUS_ACTIVE\x10\x01\x12\x1a\n\x16\x42ILLING_STATUS_EXPIRED\x10\x02\x12\x1f\n\x1b\x42ILLING_STATUS_TRIAL_ACTIVE\x10\x03\x12 \n\x1c\x42ILLING_STATUS_TRIAL_EXPIRED\x10\x04*\x90\x02\n\rAccountStatus\x12%\n!ACCOUNT_STATUS_REASON_UNSPECIFIED\x10\x00\x12+\n\'ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE\x10\x03\x12\'\n#ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE\x10\x04\x12(\n$ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED\x10\x05\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02*$ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT*&ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT*\x9f\x01\n\x0b\x41\x63\x63ountRole\x12\x1c\n\x18\x41\x43\x43OUNT_ROLE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41\x43\x43OUNT_ROLE_ADMIN\x10\x01\x12\x1e\n\x1a\x41\x43\x43OUNT_ROLE_JOB_DEVELOPER\x10\x02\x12\x1b\n\x17\x41\x43\x43OUNT_ROLE_JOB_VIEWER\x10\x03\x12\x1d\n\x19\x41\x43\x43OUNT_ROLE_JOB_EXECUTOR\x10\x04\x32\xf8\x16\n\x12UserAccountService\x12J\n\x07GetUser\x12\x1d.mgmt.v1alpha1.GetUserRequest\x1a\x1e.mgmt.v1alpha1.GetUserResponse\"\x00\x12J\n\x07SetUser\x12\x1d.mgmt.v1alpha1.SetUserRequest\x1a\x1e.mgmt.v1alpha1.SetUserResponse\"\x00\x12\x62\n\x0fGetUserAccounts\x12%.mgmt.v1alpha1.GetUserAccountsRequest\x1a&.mgmt.v1alpha1.GetUserAccountsResponse\"\x00\x12k\n\x12SetPersonalAccount\x12(.mgmt.v1alpha1.SetPersonalAccountRequest\x1a).mgmt.v1alpha1.SetPersonalAccountResponse\"\x00\x12\x89\x01\n\x1c\x43onvertPersonalToTeamAccount\x12\x32.mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest\x1a\x33.mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse\"\x00\x12h\n\x11\x43reateTeamAccount\x12\'.mgmt.v1alpha1.CreateTeamAccountRequest\x1a(.mgmt.v1alpha1.CreateTeamAccountResponse\"\x00\x12\x62\n\x0fIsUserInAccount\x12%.mgmt.v1alpha1.IsUserInAccountRequest\x1a&.mgmt.v1alpha1.IsUserInAccountResponse\"\x00\x12}\n\x18GetAccountTemporalConfig\x12..mgmt.v1alpha1.GetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.GetAccountTemporalConfigResponse\"\x00\x12}\n\x18SetAccountTemporalConfig\x12..mgmt.v1alpha1.SetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.SetAccountTemporalConfigResponse\"\x00\x12t\n\x15GetTeamAccountMembers\x12+.mgmt.v1alpha1.GetTeamAccountMembersRequest\x1a,.mgmt.v1alpha1.GetTeamAccountMembersResponse\"\x00\x12z\n\x17RemoveTeamAccountMember\x12-.mgmt.v1alpha1.RemoveTeamAccountMemberRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountMemberResponse\"\x00\x12z\n\x17InviteUserToTeamAccount\x12-.mgmt.v1alpha1.InviteUserToTeamAccountRequest\x1a..mgmt.v1alpha1.InviteUserToTeamAccountResponse\"\x00\x12t\n\x15GetTeamAccountInvites\x12+.mgmt.v1alpha1.GetTeamAccountInvitesRequest\x1a,.mgmt.v1alpha1.GetTeamAccountInvitesResponse\"\x00\x12z\n\x17RemoveTeamAccountInvite\x12-.mgmt.v1alpha1.RemoveTeamAccountInviteRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountInviteResponse\"\x00\x12z\n\x17\x41\x63\x63\x65ptTeamAccountInvite\x12-.mgmt.v1alpha1.AcceptTeamAccountInviteRequest\x1a..mgmt.v1alpha1.AcceptTeamAccountInviteResponse\"\x00\x12t\n\x14GetSystemInformation\x12*.mgmt.v1alpha1.GetSystemInformationRequest\x1a+.mgmt.v1alpha1.GetSystemInformationResponse\"\x03\x90\x02\x01\x12\x83\x01\n\x1aGetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.GetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.GetAccountOnboardingConfigResponse\"\x00\x12\x83\x01\n\x1aSetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.SetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.SetAccountOnboardingConfigResponse\"\x00\x12h\n\x10GetAccountStatus\x12&.mgmt.v1alpha1.GetAccountStatusRequest\x1a\'.mgmt.v1alpha1.GetAccountStatusResponse\"\x03\x90\x02\x01\x12t\n\x14IsAccountStatusValid\x12*.mgmt.v1alpha1.IsAccountStatusValidRequest\x1a+.mgmt.v1alpha1.IsAccountStatusValidResponse\"\x03\x90\x02\x01\x12\x95\x01\n GetAccountBillingCheckoutSession\x12\x36.mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest\x1a\x37.mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse\"\x00\x12\x8f\x01\n\x1eGetAccountBillingPortalSession\x12\x34.mgmt.v1alpha1.GetAccountBillingPortalSessionRequest\x1a\x35.mgmt.v1alpha1.GetAccountBillingPortalSessionResponse\"\x00\x12n\n\x12GetBillingAccounts\x12(.mgmt.v1alpha1.GetBillingAccountsRequest\x1a).mgmt.v1alpha1.GetBillingAccountsResponse\"\x03\x90\x02\x01\x12q\n\x14SetBillingMeterEvent\x12*.mgmt.v1alpha1.SetBillingMeterEventRequest\x1a+.mgmt.v1alpha1.SetBillingMeterEventResponse\"\x00\x12V\n\x0bSetUserRole\x12!.mgmt.v1alpha1.SetUserRoleRequest\x1a\".mgmt.v1alpha1.SetUserRoleResponse\"\x00\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10UserAccountProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n mgmt/v1alpha1/user_account.proto\x12\rmgmt.v1alpha1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x10\n\x0eGetUserRequest\"*\n\x0fGetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x10\n\x0eSetUserRequest\"*\n\x0fSetUserResponse\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06userId\"\x18\n\x16GetUserAccountsRequest\"Q\n\x17GetUserAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\x9a\x01\n\x0bUserAccount\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x32\n\x04type\x18\x03 \x01(\x0e\x32\x1e.mgmt.v1alpha1.UserAccountTypeR\x04type\x12\x33\n\x16has_stripe_customer_id\x18\x04 \x01(\x08R\x13hasStripeCustomerId\"\x91\x01\n#ConvertPersonalToTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\x12,\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\taccountId\x88\x01\x01\x42\r\n\x0b_account_id\"\xcc\x01\n$ConvertPersonalToTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x12\x35\n\x17new_personal_account_id\x18\x03 \x01(\tR\x14newPersonalAccountIdB\x17\n\x15_checkout_session_url\"\x1b\n\x19SetPersonalAccountRequest\";\n\x1aSetPersonalAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\"A\n\x16IsUserInAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\")\n\x17IsUserInAccountResponse\x12\x0e\n\x02ok\x18\x01 \x01(\x08R\x02ok\"J\n\x1fGetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"`\n GetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x88\x01\n\x1fSetAccountTemporalConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12<\n\x06\x63onfig\x18\x02 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"`\n SetAccountTemporalConfigResponse\x12<\n\x06\x63onfig\x18\x01 \x01(\x0b\x32$.mgmt.v1alpha1.AccountTemporalConfigR\x06\x63onfig\"\x91\x01\n\x15\x41\x63\x63ountTemporalConfig\x12\x19\n\x03url\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x03url\x12%\n\tnamespace\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\tnamespace\x12\x36\n\x13sync_job_queue_name\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x10syncJobQueueName\"I\n\x18\x43reateTeamAccountRequest\x12-\n\x04name\x18\x01 \x01(\tB\x19\xbaH\x16r\x14\x32\x12^[a-z0-9-]{3,100}$R\x04name\"\x8a\x01\n\x19\x43reateTeamAccountResponse\x12\x1d\n\naccount_id\x18\x01 \x01(\tR\taccountId\x12\x35\n\x14\x63heckout_session_url\x18\x02 \x01(\tH\x00R\x12\x63heckoutSessionUrl\x88\x01\x01\x42\x17\n\x15_checkout_session_url\"\x8d\x01\n\x0b\x41\x63\x63ountUser\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n\x05image\x18\x03 \x01(\tR\x05image\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12.\n\x04role\x18\x05 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"G\n\x1cGetTeamAccountMembersRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"Q\n\x1dGetTeamAccountMembersResponse\x12\x30\n\x05users\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.AccountUserR\x05users\"l\n\x1eRemoveTeamAccountMemberRequest\x12!\n\x07user_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"!\n\x1fRemoveTeamAccountMemberResponse\"\xa6\x01\n\x1eInviteUserToTeamAccountRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x1d\n\x05\x65mail\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05\x65mail\x12\x33\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleH\x00R\x04role\x88\x01\x01\x42\x07\n\x05_role\"\x8d\x03\n\rAccountInvite\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\naccount_id\x18\x02 \x01(\tR\taccountId\x12$\n\x0esender_user_id\x18\x03 \x01(\tR\x0csenderUserId\x12\x14\n\x05\x65mail\x18\x04 \x01(\tR\x05\x65mail\x12\x14\n\x05token\x18\x05 \x01(\tR\x05token\x12\x1a\n\x08\x61\x63\x63\x65pted\x18\x06 \x01(\x08R\x08\x61\x63\x63\x65pted\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x39\n\nexpires_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12.\n\x04role\x18\n \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"W\n\x1fInviteUserToTeamAccountResponse\x12\x34\n\x06invite\x18\x01 \x01(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x06invite\"G\n\x1cGetTeamAccountInvitesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n\x1dGetTeamAccountInvitesResponse\x12\x36\n\x07invites\x18\x01 \x03(\x0b\x32\x1c.mgmt.v1alpha1.AccountInviteR\x07invites\":\n\x1eRemoveTeamAccountInviteRequest\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\"!\n\x1fRemoveTeamAccountInviteResponse\"?\n\x1e\x41\x63\x63\x65ptTeamAccountInviteRequest\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05token\"W\n\x1f\x41\x63\x63\x65ptTeamAccountInviteResponse\x12\x34\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x07\x61\x63\x63ount\"\x1d\n\x1bGetSystemInformationRequest\"\xfb\x01\n\x1cGetSystemInformationResponse\x12\x18\n\x07version\x18\x01 \x01(\tR\x07version\x12\x16\n\x06\x63ommit\x18\x02 \x01(\tR\x06\x63ommit\x12\x1a\n\x08\x63ompiler\x18\x03 \x01(\tR\x08\x63ompiler\x12\x1a\n\x08platform\x18\x04 \x01(\tR\x08platform\x12\x39\n\nbuild_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tbuildDate\x12\x36\n\x07license\x18\x06 \x01(\x0b\x32\x1c.mgmt.v1alpha1.SystemLicenseR\x07license\"\x8f\x01\n\rSystemLicense\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x39\n\nexpires_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12(\n\x10is_neosync_cloud\x18\x03 \x01(\x08R\x0eisNeosyncCloud\"L\n!GetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"d\n\"GetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"\x8c\x01\n!SetAccountOnboardingConfigRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12>\n\x06\x63onfig\x18\x02 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"d\n\"SetAccountOnboardingConfigResponse\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32&.mgmt.v1alpha1.AccountOnboardingConfigR\x06\x63onfig\"k\n\x17\x41\x63\x63ountOnboardingConfig\x12\x38\n\x18has_completed_onboarding\x18\x05 \x01(\x08R\x16hasCompletedOnboardingJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05\"B\n\x17GetAccountStatusRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\xe5\x01\n\x18GetAccountStatusResponse\x12*\n\x11used_record_count\x18\x01 \x01(\x04R\x0fusedRecordCount\x12\x35\n\x14\x61llowed_record_count\x18\x02 \x01(\x04H\x00R\x12\x61llowedRecordCount\x88\x01\x01\x12M\n\x13subscription_status\x18\x03 \x01(\x0e\x32\x1c.mgmt.v1alpha1.BillingStatusR\x12subscriptionStatusB\x17\n\x15_allowed_record_count\"\x9c\x01\n\x1bIsAccountStatusValidRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x39\n\x16requested_record_count\x18\x02 \x01(\x04H\x00R\x14requestedRecordCount\x88\x01\x01\x42\x19\n\x17_requested_record_count\"\xb3\x02\n\x1cIsAccountStatusValidResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid\x12\x1b\n\x06reason\x18\x02 \x01(\tH\x00R\x06reason\x88\x01\x01\x12\x1f\n\x0bshould_poll\x18\x03 \x01(\x08R\nshouldPoll\x12\x43\n\x0e\x61\x63\x63ount_status\x18\x06 \x01(\x0e\x32\x1c.mgmt.v1alpha1.AccountStatusR\raccountStatus\x12I\n\x10trial_expires_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01R\x0etrialExpiresAt\x88\x01\x01\x42\t\n\x07_reasonB\x13\n\x11_trial_expires_atJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\"R\n\'GetAccountBillingCheckoutSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n(GetAccountBillingCheckoutSessionResponse\x12\x30\n\x14\x63heckout_session_url\x18\x01 \x01(\tR\x12\x63heckoutSessionUrl\"P\n%GetAccountBillingPortalSessionRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"V\n&GetAccountBillingPortalSessionResponse\x12,\n\x12portal_session_url\x18\x01 \x01(\tR\x10portalSessionUrl\"<\n\x19GetBillingAccountsRequest\x12\x1f\n\x0b\x61\x63\x63ount_ids\x18\x01 \x03(\tR\naccountIds\"T\n\x1aGetBillingAccountsResponse\x12\x36\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x1a.mgmt.v1alpha1.UserAccountR\x08\x61\x63\x63ounts\"\xe2\x01\n\x1bSetBillingMeterEventRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12&\n\nevent_name\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\teventName\x12\x1d\n\x05value\x18\x03 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x05value\x12\"\n\x08\x65vent_id\x18\x04 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x07\x65ventId\x12!\n\ttimestamp\x18\x05 \x01(\x04H\x00R\ttimestamp\x88\x01\x01\x42\x0c\n\n_timestamp\"\x1e\n\x1cSetBillingMeterEventResponse\"\x90\x01\n\x12SetUserRoleRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12!\n\x07user_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x06userId\x12.\n\x04role\x18\x03 \x01(\x0e\x32\x1a.mgmt.v1alpha1.AccountRoleR\x04role\"\x15\n\x13SetUserRoleResponse*\x92\x01\n\x0fUserAccountType\x12!\n\x1dUSER_ACCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aUSER_ACCOUNT_TYPE_PERSONAL\x10\x01\x12\x1a\n\x16USER_ACCOUNT_TYPE_TEAM\x10\x02\x12 \n\x1cUSER_ACCOUNT_TYPE_ENTERPRISE\x10\x03*\xa9\x01\n\rBillingStatus\x12\x1e\n\x1a\x42ILLING_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x42ILLING_STATUS_ACTIVE\x10\x01\x12\x1a\n\x16\x42ILLING_STATUS_EXPIRED\x10\x02\x12\x1f\n\x1b\x42ILLING_STATUS_TRIAL_ACTIVE\x10\x03\x12 \n\x1c\x42ILLING_STATUS_TRIAL_EXPIRED\x10\x04*\x90\x02\n\rAccountStatus\x12%\n!ACCOUNT_STATUS_REASON_UNSPECIFIED\x10\x00\x12+\n\'ACCOUNT_STATUS_ACCOUNT_IN_EXPIRED_STATE\x10\x03\x12\'\n#ACCOUNT_STATUS_ACCOUNT_TRIAL_ACTIVE\x10\x04\x12(\n$ACCOUNT_STATUS_ACCOUNT_TRIAL_EXPIRED\x10\x05\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02*$ACCOUNT_STATUS_EXCEEDS_ALLOWED_LIMIT*&ACCOUNT_STATUS_REQUESTED_EXCEEDS_LIMIT*\x9f\x01\n\x0b\x41\x63\x63ountRole\x12\x1c\n\x18\x41\x43\x43OUNT_ROLE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41\x43\x43OUNT_ROLE_ADMIN\x10\x01\x12\x1e\n\x1a\x41\x43\x43OUNT_ROLE_JOB_DEVELOPER\x10\x02\x12\x1b\n\x17\x41\x43\x43OUNT_ROLE_JOB_VIEWER\x10\x03\x12\x1d\n\x19\x41\x43\x43OUNT_ROLE_JOB_EXECUTOR\x10\x04\x32\xf8\x16\n\x12UserAccountService\x12J\n\x07GetUser\x12\x1d.mgmt.v1alpha1.GetUserRequest\x1a\x1e.mgmt.v1alpha1.GetUserResponse\"\x00\x12J\n\x07SetUser\x12\x1d.mgmt.v1alpha1.SetUserRequest\x1a\x1e.mgmt.v1alpha1.SetUserResponse\"\x00\x12\x62\n\x0fGetUserAccounts\x12%.mgmt.v1alpha1.GetUserAccountsRequest\x1a&.mgmt.v1alpha1.GetUserAccountsResponse\"\x00\x12k\n\x12SetPersonalAccount\x12(.mgmt.v1alpha1.SetPersonalAccountRequest\x1a).mgmt.v1alpha1.SetPersonalAccountResponse\"\x00\x12\x89\x01\n\x1c\x43onvertPersonalToTeamAccount\x12\x32.mgmt.v1alpha1.ConvertPersonalToTeamAccountRequest\x1a\x33.mgmt.v1alpha1.ConvertPersonalToTeamAccountResponse\"\x00\x12h\n\x11\x43reateTeamAccount\x12\'.mgmt.v1alpha1.CreateTeamAccountRequest\x1a(.mgmt.v1alpha1.CreateTeamAccountResponse\"\x00\x12\x62\n\x0fIsUserInAccount\x12%.mgmt.v1alpha1.IsUserInAccountRequest\x1a&.mgmt.v1alpha1.IsUserInAccountResponse\"\x00\x12}\n\x18GetAccountTemporalConfig\x12..mgmt.v1alpha1.GetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.GetAccountTemporalConfigResponse\"\x00\x12}\n\x18SetAccountTemporalConfig\x12..mgmt.v1alpha1.SetAccountTemporalConfigRequest\x1a/.mgmt.v1alpha1.SetAccountTemporalConfigResponse\"\x00\x12t\n\x15GetTeamAccountMembers\x12+.mgmt.v1alpha1.GetTeamAccountMembersRequest\x1a,.mgmt.v1alpha1.GetTeamAccountMembersResponse\"\x00\x12z\n\x17RemoveTeamAccountMember\x12-.mgmt.v1alpha1.RemoveTeamAccountMemberRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountMemberResponse\"\x00\x12z\n\x17InviteUserToTeamAccount\x12-.mgmt.v1alpha1.InviteUserToTeamAccountRequest\x1a..mgmt.v1alpha1.InviteUserToTeamAccountResponse\"\x00\x12t\n\x15GetTeamAccountInvites\x12+.mgmt.v1alpha1.GetTeamAccountInvitesRequest\x1a,.mgmt.v1alpha1.GetTeamAccountInvitesResponse\"\x00\x12z\n\x17RemoveTeamAccountInvite\x12-.mgmt.v1alpha1.RemoveTeamAccountInviteRequest\x1a..mgmt.v1alpha1.RemoveTeamAccountInviteResponse\"\x00\x12z\n\x17\x41\x63\x63\x65ptTeamAccountInvite\x12-.mgmt.v1alpha1.AcceptTeamAccountInviteRequest\x1a..mgmt.v1alpha1.AcceptTeamAccountInviteResponse\"\x00\x12t\n\x14GetSystemInformation\x12*.mgmt.v1alpha1.GetSystemInformationRequest\x1a+.mgmt.v1alpha1.GetSystemInformationResponse\"\x03\x90\x02\x01\x12\x83\x01\n\x1aGetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.GetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.GetAccountOnboardingConfigResponse\"\x00\x12\x83\x01\n\x1aSetAccountOnboardingConfig\x12\x30.mgmt.v1alpha1.SetAccountOnboardingConfigRequest\x1a\x31.mgmt.v1alpha1.SetAccountOnboardingConfigResponse\"\x00\x12h\n\x10GetAccountStatus\x12&.mgmt.v1alpha1.GetAccountStatusRequest\x1a\'.mgmt.v1alpha1.GetAccountStatusResponse\"\x03\x90\x02\x01\x12t\n\x14IsAccountStatusValid\x12*.mgmt.v1alpha1.IsAccountStatusValidRequest\x1a+.mgmt.v1alpha1.IsAccountStatusValidResponse\"\x03\x90\x02\x01\x12\x95\x01\n GetAccountBillingCheckoutSession\x12\x36.mgmt.v1alpha1.GetAccountBillingCheckoutSessionRequest\x1a\x37.mgmt.v1alpha1.GetAccountBillingCheckoutSessionResponse\"\x00\x12\x8f\x01\n\x1eGetAccountBillingPortalSession\x12\x34.mgmt.v1alpha1.GetAccountBillingPortalSessionRequest\x1a\x35.mgmt.v1alpha1.GetAccountBillingPortalSessionResponse\"\x00\x12n\n\x12GetBillingAccounts\x12(.mgmt.v1alpha1.GetBillingAccountsRequest\x1a).mgmt.v1alpha1.GetBillingAccountsResponse\"\x03\x90\x02\x01\x12q\n\x14SetBillingMeterEvent\x12*.mgmt.v1alpha1.SetBillingMeterEventRequest\x1a+.mgmt.v1alpha1.SetBillingMeterEventResponse\"\x00\x12V\n\x0bSetUserRole\x12!.mgmt.v1alpha1.SetUserRoleRequest\x1a\".mgmt.v1alpha1.SetUserRoleResponse\"\x00\x42\xcc\x01\n\x11\x63om.mgmt.v1alpha1B\x10UserAccountProtoP\x01ZPgithub.com/nucleuscloud/neosync/backend/gen/go/protos/mgmt/v1alpha1;mgmtv1alpha1\xa2\x02\x03MXX\xaa\x02\rMgmt.V1alpha1\xca\x02\rMgmt\\V1alpha1\xe2\x02\x19Mgmt\\V1alpha1\\GPBMetadata\xea\x02\x0eMgmt::V1alpha1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -100,14 +100,14 @@ _globals['_USERACCOUNTSERVICE'].methods_by_name['IsAccountStatusValid']._serialized_options = b'\220\002\001' _globals['_USERACCOUNTSERVICE'].methods_by_name['GetBillingAccounts']._loaded_options = None _globals['_USERACCOUNTSERVICE'].methods_by_name['GetBillingAccounts']._serialized_options = b'\220\002\001' - _globals['_USERACCOUNTTYPE']._serialized_start=5807 - _globals['_USERACCOUNTTYPE']._serialized_end=5953 - _globals['_BILLINGSTATUS']._serialized_start=5956 - _globals['_BILLINGSTATUS']._serialized_end=6125 - _globals['_ACCOUNTSTATUS']._serialized_start=6128 - _globals['_ACCOUNTSTATUS']._serialized_end=6400 - _globals['_ACCOUNTROLE']._serialized_start=6403 - _globals['_ACCOUNTROLE']._serialized_end=6562 + _globals['_USERACCOUNTTYPE']._serialized_start=6009 + _globals['_USERACCOUNTTYPE']._serialized_end=6155 + _globals['_BILLINGSTATUS']._serialized_start=6158 + _globals['_BILLINGSTATUS']._serialized_end=6327 + _globals['_ACCOUNTSTATUS']._serialized_start=6330 + _globals['_ACCOUNTSTATUS']._serialized_end=6602 + _globals['_ACCOUNTROLE']._serialized_start=6605 + _globals['_ACCOUNTROLE']._serialized_end=6764 _globals['_GETUSERREQUEST']._serialized_start=113 _globals['_GETUSERREQUEST']._serialized_end=129 _globals['_GETUSERRESPONSE']._serialized_start=131 @@ -179,45 +179,47 @@ _globals['_GETSYSTEMINFORMATIONREQUEST']._serialized_start=3347 _globals['_GETSYSTEMINFORMATIONREQUEST']._serialized_end=3376 _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_start=3379 - _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_end=3574 - _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3576 - _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3652 - _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3654 - _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3754 - _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3757 - _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3897 - _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3899 - _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3999 - _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_start=4001 - _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_end=4108 - _globals['_GETACCOUNTSTATUSREQUEST']._serialized_start=4110 - _globals['_GETACCOUNTSTATUSREQUEST']._serialized_end=4176 - _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_start=4179 - _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_end=4408 - _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_start=4411 - _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_end=4567 - _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_start=4570 - _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_end=4877 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_start=4879 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_end=4961 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_start=4963 - _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_end=5055 - _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_start=5057 - _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_end=5137 - _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_start=5139 - _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_end=5225 - _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_start=5227 - _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_end=5287 - _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_start=5289 - _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_end=5373 - _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_start=5376 - _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_end=5602 - _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_start=5604 - _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_end=5634 - _globals['_SETUSERROLEREQUEST']._serialized_start=5637 - _globals['_SETUSERROLEREQUEST']._serialized_end=5781 - _globals['_SETUSERROLERESPONSE']._serialized_start=5783 - _globals['_SETUSERROLERESPONSE']._serialized_end=5804 - _globals['_USERACCOUNTSERVICE']._serialized_start=6565 - _globals['_USERACCOUNTSERVICE']._serialized_end=9501 + _globals['_GETSYSTEMINFORMATIONRESPONSE']._serialized_end=3630 + _globals['_SYSTEMLICENSE']._serialized_start=3633 + _globals['_SYSTEMLICENSE']._serialized_end=3776 + _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3778 + _globals['_GETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=3854 + _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=3856 + _globals['_GETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=3956 + _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_start=3959 + _globals['_SETACCOUNTONBOARDINGCONFIGREQUEST']._serialized_end=4099 + _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_start=4101 + _globals['_SETACCOUNTONBOARDINGCONFIGRESPONSE']._serialized_end=4201 + _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_start=4203 + _globals['_ACCOUNTONBOARDINGCONFIG']._serialized_end=4310 + _globals['_GETACCOUNTSTATUSREQUEST']._serialized_start=4312 + _globals['_GETACCOUNTSTATUSREQUEST']._serialized_end=4378 + _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_start=4381 + _globals['_GETACCOUNTSTATUSRESPONSE']._serialized_end=4610 + _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_start=4613 + _globals['_ISACCOUNTSTATUSVALIDREQUEST']._serialized_end=4769 + _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_start=4772 + _globals['_ISACCOUNTSTATUSVALIDRESPONSE']._serialized_end=5079 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_start=5081 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONREQUEST']._serialized_end=5163 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_start=5165 + _globals['_GETACCOUNTBILLINGCHECKOUTSESSIONRESPONSE']._serialized_end=5257 + _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_start=5259 + _globals['_GETACCOUNTBILLINGPORTALSESSIONREQUEST']._serialized_end=5339 + _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_start=5341 + _globals['_GETACCOUNTBILLINGPORTALSESSIONRESPONSE']._serialized_end=5427 + _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_start=5429 + _globals['_GETBILLINGACCOUNTSREQUEST']._serialized_end=5489 + _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_start=5491 + _globals['_GETBILLINGACCOUNTSRESPONSE']._serialized_end=5575 + _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_start=5578 + _globals['_SETBILLINGMETEREVENTREQUEST']._serialized_end=5804 + _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_start=5806 + _globals['_SETBILLINGMETEREVENTRESPONSE']._serialized_end=5836 + _globals['_SETUSERROLEREQUEST']._serialized_start=5839 + _globals['_SETUSERROLEREQUEST']._serialized_end=5983 + _globals['_SETUSERROLERESPONSE']._serialized_start=5985 + _globals['_SETUSERROLERESPONSE']._serialized_end=6006 + _globals['_USERACCOUNTSERVICE']._serialized_start=6767 + _globals['_USERACCOUNTSERVICE']._serialized_end=9703 # @@protoc_insertion_point(module_scope) diff --git a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi index 35b448478f..f844e53776 100644 --- a/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi +++ b/python/src/neosync/mgmt/v1alpha1/user_account_pb2.pyi @@ -305,18 +305,30 @@ class GetSystemInformationRequest(_message.Message): def __init__(self) -> None: ... class GetSystemInformationResponse(_message.Message): - __slots__ = ("version", "commit", "compiler", "platform", "build_date") + __slots__ = ("version", "commit", "compiler", "platform", "build_date", "license") VERSION_FIELD_NUMBER: _ClassVar[int] COMMIT_FIELD_NUMBER: _ClassVar[int] COMPILER_FIELD_NUMBER: _ClassVar[int] PLATFORM_FIELD_NUMBER: _ClassVar[int] BUILD_DATE_FIELD_NUMBER: _ClassVar[int] + LICENSE_FIELD_NUMBER: _ClassVar[int] version: str commit: str compiler: str platform: str build_date: _timestamp_pb2.Timestamp - def __init__(self, version: _Optional[str] = ..., commit: _Optional[str] = ..., compiler: _Optional[str] = ..., platform: _Optional[str] = ..., build_date: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + license: SystemLicense + def __init__(self, version: _Optional[str] = ..., commit: _Optional[str] = ..., compiler: _Optional[str] = ..., platform: _Optional[str] = ..., build_date: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., license: _Optional[_Union[SystemLicense, _Mapping]] = ...) -> None: ... + +class SystemLicense(_message.Message): + __slots__ = ("is_valid", "expires_at", "is_neosync_cloud") + IS_VALID_FIELD_NUMBER: _ClassVar[int] + EXPIRES_AT_FIELD_NUMBER: _ClassVar[int] + IS_NEOSYNC_CLOUD_FIELD_NUMBER: _ClassVar[int] + is_valid: bool + expires_at: _timestamp_pb2.Timestamp + is_neosync_cloud: bool + def __init__(self, is_valid: bool = ..., expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., is_neosync_cloud: bool = ...) -> None: ... class GetAccountOnboardingConfigRequest(_message.Message): __slots__ = ("account_id",) diff --git a/worker/pkg/integration-test/datasync_workflow.go b/worker/pkg/integration-test/datasync_workflow.go index 6dfde25e1c..a121a98fed 100644 --- a/worker/pkg/integration-test/datasync_workflow.go +++ b/worker/pkg/integration-test/datasync_workflow.go @@ -89,10 +89,10 @@ func NewTestDataSyncWorkflowEnv( } workflowEnv.redisclient = redisclient - connclient := neosyncApi.UnauthdClients.Connections - jobclient := neosyncApi.UnauthdClients.Jobs - transformerclient := neosyncApi.UnauthdClients.Transformers - userclient := neosyncApi.UnauthdClients.Users + connclient := neosyncApi.OSSUnauthenticatedLicensedClients.Connections() + jobclient := neosyncApi.OSSUnauthenticatedLicensedClients.Jobs() + transformerclient := neosyncApi.OSSUnauthenticatedLicensedClients.Transformers() + userclient := neosyncApi.OSSUnauthenticatedLicensedClients.Users() testSuite := &testsuite.WorkflowTestSuite{} testSuite.SetLogger(log.NewStructuredLogger(testutil.GetConcurrentTestLogger(t))) diff --git a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go index de76b0c6f8..4591e370e8 100644 --- a/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go +++ b/worker/pkg/workflows/datasync/activities/run-sql-init-table-stmts/init-statement-builder_test.go @@ -21,11 +21,9 @@ const ( workflowId = "workflow-id" ) -type fakeLicense struct{} - -func (f *fakeLicense) IsValid() bool { - return true -} +var ( + fakeEELicense = testutil.NewFakeEELicense(testutil.WithIsValid()) +) func Test_InitStatementBuilder_Pg_Generate_InitSchema(t *testing.T) { t.Parallel() @@ -167,7 +165,7 @@ func Test_InitStatementBuilder_Pg_Generate_InitSchema(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, []string{"test-idx-statement"}, &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -269,7 +267,7 @@ func Test_InitStatementBuilder_Pg_Generate_NoInitStatement(t *testing.T) { mockSqlManager.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sqlmanager.NewPostgresSqlConnection(mockSqlDb), nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -401,7 +399,7 @@ func Test_InitStatementBuilder_Pg_TruncateCascade(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, mock.MatchedBy(func(query []string) bool { return compareSlices(query, stmts) }), &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -541,7 +539,7 @@ func Test_InitStatementBuilder_Pg_Truncate(t *testing.T) { mockSqlDb.On("Exec", mock.Anything, "TRUNCATE \"public\".\"accounts\", \"public\".\"users\" RESTART IDENTITY;").Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -685,7 +683,7 @@ func Test_InitStatementBuilder_Pg_InitSchema(t *testing.T) { mockSqlDb.On("BatchExec", mock.Anything, mock.Anything, []string{"test-idx-statement"}, &sqlmanager_shared.BatchExecOpts{}).Return(nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, @@ -797,7 +795,7 @@ func Test_InitStatementBuilder_Mysql_Generate(t *testing.T) { mockSqlManager.On("NewSqlConnection", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sqlmanager.NewMysqlSqlConnection(mockSqlDb), nil) mockSqlDb.On("Close").Return(nil) - bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, &fakeLicense{}, workflowId) + bbuilder := newInitStatementBuilder(mockSqlManager, mockJobClient, mockConnectionClient, fakeEELicense, workflowId) _, err := bbuilder.RunSqlInitTableStatements( context.Background(), &RunSqlInitTableStatementsRequest{JobId: "123"}, diff --git a/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go b/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go index cbdd2a14ef..4bffb3d83c 100644 --- a/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go +++ b/worker/pkg/workflows/datasync/workflow/workflow_integration_test.go @@ -1590,12 +1590,6 @@ func (s *IntegrationTestSuite) Test_Workflow_Generate() { require.NoError(s.T(), err) } -type fakeEELicense struct{} - -func (f *fakeEELicense) IsValid() bool { - return true -} - func executeWorkflow( t testing.TB, srv *httptest.Server, @@ -1653,11 +1647,13 @@ func executeWorkflow( ) var activityMeter metric.Meter + fakeEELicense := testutil.NewFakeEELicense(testutil.WithIsValid()) + syncActivity := sync_activity.New(connclient, jobclient, sqlconnmanager, mongoconnmanager, activityMeter, sync_activity.NewBenthosStreamManager()) retrieveActivityOpts := syncactivityopts_activity.New(jobclient) - runSqlInitTableStatements := runsqlinittablestmts_activity.New(jobclient, connclient, sqlmanager, &fakeEELicense{}) + runSqlInitTableStatements := runsqlinittablestmts_activity.New(jobclient, connclient, sqlmanager, fakeEELicense) accountStatusActivity := accountstatus_activity.New(userclient) - jobhookTimingActivity := jobhooks_by_timing_activity.New(jobclient, connclient, sqlmanager, &fakeEELicense{}) + jobhookTimingActivity := jobhooks_by_timing_activity.New(jobclient, connclient, sqlmanager, fakeEELicense) posttableSyncActivity := posttablesync_activity.New(jobclient, sqlmanager, connclient) redisCleanUpActivity := syncrediscleanup_activity.New(redisclient)