diff --git a/Makefile b/Makefile index 1fe4f7155..15b27c192 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ TAG := $(shell git rev-list --tags --max-count=1) VERSION := $(shell git describe --tags ${TAG}) .PHONY: build check fmt lint test test-race vet test-cover-html help install proto ui .DEFAULT_GOAL := build -PROTON_COMMIT := "7946dab27af53879cbc694da726432727e85c336" +PROTON_COMMIT := "af92b2d5dbd43c1aa8a9054449ee662f22e01442" ui: @echo " > generating ui build" diff --git a/internal/api/v1beta1/billing_customer.go b/internal/api/v1beta1/billing_customer.go index 697a0c645..a3644a3b5 100644 --- a/internal/api/v1beta1/billing_customer.go +++ b/internal/api/v1beta1/billing_customer.go @@ -68,6 +68,30 @@ func (h Handler) CreateBillingAccount(ctx context.Context, request *frontierv1be }, nil } +func (h Handler) ListAllBillingAccounts(ctx context.Context, request *frontierv1beta1.ListAllBillingAccountsRequest) (*frontierv1beta1.ListAllBillingAccountsResponse, error) { + logger := grpczap.Extract(ctx) + var customers []*frontierv1beta1.BillingAccount + customerList, err := h.customerService.List(ctx, customer.Filter{ + OrgID: request.GetOrgId(), + }) + if err != nil { + logger.Error(err.Error()) + return nil, grpcInternalServerError + } + for _, v := range customerList { + customerPB, err := transformCustomerToPB(v) + if err != nil { + logger.Error(err.Error()) + return nil, grpcInternalServerError + } + customers = append(customers, customerPB) + } + + return &frontierv1beta1.ListAllBillingAccountsResponse{ + BillingAccounts: customers, + }, nil +} + func (h Handler) ListBillingAccounts(ctx context.Context, request *frontierv1beta1.ListBillingAccountsRequest) (*frontierv1beta1.ListBillingAccountsResponse, error) { logger := grpczap.Extract(ctx) if request.GetOrgId() == "" { diff --git a/pkg/server/interceptors/authorization.go b/pkg/server/interceptors/authorization.go index 178f8575a..81409ff14 100644 --- a/pkg/server/interceptors/authorization.go +++ b/pkg/server/interceptors/authorization.go @@ -802,6 +802,9 @@ var authorizationValidationMap = map[string]func(ctx context.Context, handler *v "/raystack.frontier.v1beta1.AdminService/ListAllInvoices": func(ctx context.Context, handler *v1beta1.Handler, req any) error { return handler.IsSuperUser(ctx) }, + "/raystack.frontier.v1beta1.AdminService/ListAllBillingAccounts": func(ctx context.Context, handler *v1beta1.Handler, req any) error { + return handler.IsSuperUser(ctx) + }, } // stripeTestClockEnabledEndpoints is a map of endpoints that are allowed to use stripe test clock diff --git a/proto/apidocs.swagger.yaml b/proto/apidocs.swagger.yaml index 33beb3651..c90363ed9 100644 --- a/proto/apidocs.swagger.yaml +++ b/proto/apidocs.swagger.yaml @@ -65,6 +65,47 @@ paths: $ref: '#/definitions/rpcStatus' tags: - Authz + /v1beta1/admin/billing/accounts: + get: + summary: List all billing accounts + description: Lists all the billing accounts from all the organizations in a Frontier instance. It can be filtered by organization. + operationId: AdminService_ListAllBillingAccounts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1beta1ListAllBillingAccountsResponse' + "400": + description: Bad Request - The request was malformed or contained invalid parameters. + schema: + $ref: '#/definitions/rpcStatus' + "401": + description: Unauthorized - Authentication is required + schema: + $ref: '#/definitions/rpcStatus' + "403": + description: Forbidden - User does not have permission to access the resource + schema: + $ref: '#/definitions/rpcStatus' + "404": + description: Not Found - The requested resource was not found + schema: + $ref: '#/definitions/rpcStatus' + "500": + description: Internal Server Error. Returned when theres is something wrong with Frontier server. + schema: + $ref: '#/definitions/rpcStatus' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: org_id + in: query + required: false + type: string + tags: + - Billing /v1beta1/admin/billing/invoices: get: summary: List all invoices @@ -9023,6 +9064,14 @@ definitions: type: string title: RSA private key as string readOnly: true + v1beta1ListAllBillingAccountsResponse: + type: object + properties: + billing_accounts: + type: array + items: + type: object + $ref: '#/definitions/v1beta1BillingAccount' v1beta1ListAllInvoicesResponse: type: object properties: diff --git a/proto/v1beta1/admin.pb.go b/proto/v1beta1/admin.pb.go index 38779136b..76acde7fd 100644 --- a/proto/v1beta1/admin.pb.go +++ b/proto/v1beta1/admin.pb.go @@ -2049,6 +2049,100 @@ func (x *ListAllInvoicesResponse) GetInvoices() []*Invoice { return nil } +type ListAllBillingAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` +} + +func (x *ListAllBillingAccountsRequest) Reset() { + *x = ListAllBillingAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_frontier_v1beta1_admin_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllBillingAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllBillingAccountsRequest) ProtoMessage() {} + +func (x *ListAllBillingAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_frontier_v1beta1_admin_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllBillingAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListAllBillingAccountsRequest) Descriptor() ([]byte, []int) { + return file_raystack_frontier_v1beta1_admin_proto_rawDescGZIP(), []int{39} +} + +func (x *ListAllBillingAccountsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +type ListAllBillingAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BillingAccounts []*BillingAccount `protobuf:"bytes,1,rep,name=billing_accounts,json=billingAccounts,proto3" json:"billing_accounts,omitempty"` +} + +func (x *ListAllBillingAccountsResponse) Reset() { + *x = ListAllBillingAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_frontier_v1beta1_admin_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllBillingAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllBillingAccountsResponse) ProtoMessage() {} + +func (x *ListAllBillingAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_frontier_v1beta1_admin_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllBillingAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListAllBillingAccountsResponse) Descriptor() ([]byte, []int) { + return file_raystack_frontier_v1beta1_admin_proto_rawDescGZIP(), []int{40} +} + +func (x *ListAllBillingAccountsResponse) GetBillingAccounts() []*BillingAccount { + if x != nil { + return x.BillingAccounts + } + return nil +} + var File_raystack_frontier_v1beta1_admin_proto protoreflect.FileDescriptor var file_raystack_frontier_v1beta1_admin_proto_rawDesc = []byte{ @@ -2452,7 +2546,18 @@ var file_raystack_frontier_v1beta1_admin_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x6f, - 0x69, 0x63, 0x65, 0x73, 0x32, 0x9e, 0x2b, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, + 0x69, 0x63, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x42, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x1e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, + 0x0a, 0x10, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x0f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x32, 0xf7, 0x2d, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, @@ -2798,127 +2903,148 @@ var file_raystack_frontier_v1beta1_admin_proto_rawDesc = []byte{ 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x76, - 0x6f, 0x69, 0x63, 0x65, 0x73, 0x42, 0xf4, 0x0e, 0x92, 0x41, 0x84, 0x0e, 0x12, 0xfe, 0x06, 0x0a, - 0x1b, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x12, 0xcf, 0x05, 0x54, - 0x68, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, - 0x20, 0x61, 0x64, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4f, - 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x20, 0x61, 0x73, 0x20, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2c, 0x20, 0x77, 0x68, 0x69, - 0x63, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, - 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, - 0x61, 0x63, 0x68, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x52, 0x45, - 0x53, 0x54, 0x66, 0x75, 0x6c, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x20, 0x57, 0x69, 0x74, 0x68, - 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x67, 0x61, - 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, - 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x41, 0x50, 0x49, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, - 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x73, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, - 0x69, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x20, 0x42, 0x79, 0x20, 0x6c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, - 0x41, 0x50, 0x49, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2c, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x20, 0x63, 0x61, - 0x6e, 0x20, 0x65, 0x61, 0x73, 0x69, 0x6c, 0x79, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, - 0x41, 0x50, 0x49, 0x73, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x76, 0x61, 0x72, - 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, - 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x61, - 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x41, 0x50, 0x49, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x61, - 0x6d, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x41, 0x50, 0x49, 0x20, 0x74, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2c, 0x20, 0x6d, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x20, 0x65, 0x61, 0x73, 0x69, 0x65, 0x72, 0x20, - 0x74, 0x68, 0x61, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, - 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2e, 0x22, 0x40, - 0x0a, 0x13, 0x52, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x1a, 0x12, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x40, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, - 0x2a, 0x44, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, 0x36, - 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x66, 0x72, 0x6f, 0x6e, - 0x74, 0x69, 0x65, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, - 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x1a, 0x0e, 0x31, - 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x3a, 0x37, 0x34, 0x30, 0x30, 0x2a, 0x01, 0x01, - 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x35, 0x0a, 0x1b, 0x4f, - 0x4b, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x69, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x62, 0x0a, 0x48, 0x42, 0x61, 0x64, - 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6d, 0x61, 0x6c, 0x66, 0x6f, - 0x72, 0x6d, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x64, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x4a, 0x0a, - 0x03, 0x34, 0x30, 0x31, 0x12, 0x43, 0x0a, 0x29, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x64, 0x20, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x61, 0x0a, 0x03, 0x34, 0x30, 0x33, - 0x12, 0x5a, 0x0a, 0x40, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x20, 0x2d, 0x20, - 0x55, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, - 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, - 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x51, 0x0a, 0x03, - 0x34, 0x30, 0x34, 0x12, 0x4a, 0x0a, 0x30, 0x4e, 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x75, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x6e, 0x0a, 0x54, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, - 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x73, 0x20, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x20, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x46, 0x72, - 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x12, 0x16, + 0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0xd6, 0x02, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, + 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x12, 0x38, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x66, 0x72, 0x6f, 0x6e, + 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x6c, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x42, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc6, 0x01, 0x92, 0x41, 0x9b, 0x01, 0x0a, 0x07, 0x42, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, + 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x1a, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x62, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x42, 0xf4, + 0x0e, 0x92, 0x41, 0x84, 0x0e, 0x12, 0xfe, 0x06, 0x0a, 0x1b, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, + 0x65, 0x72, 0x20, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x41, 0x50, 0x49, 0x12, 0xcf, 0x05, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, + 0x74, 0x69, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x20, 0x61, 0x64, 0x68, 0x65, 0x72, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x20, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, + 0x6c, 0x73, 0x6f, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x53, 0x77, 0x61, + 0x67, 0x67, 0x65, 0x72, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x69, + 0x7a, 0x65, 0x64, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x52, 0x45, 0x53, 0x54, 0x66, 0x75, 0x6c, 0x20, 0x41, + 0x50, 0x49, 0x73, 0x2e, 0x20, 0x57, 0x69, 0x74, 0x68, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, + 0x49, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x67, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6c, + 0x65, 0x61, 0x72, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x20, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, + 0x6d, 0x73, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, + 0x73, 0x2e, 0x20, 0x42, 0x79, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x20, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x61, 0x73, 0x69, 0x6c, + 0x79, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x20, 0x75, 0x73, + 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, + 0x49, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x41, + 0x50, 0x49, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x61, 0x6d, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x41, 0x50, 0x49, 0x20, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2c, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x69, + 0x74, 0x20, 0x65, 0x61, 0x73, 0x69, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x65, 0x76, + 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x20, + 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x79, 0x6f, + 0x75, 0x72, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2e, 0x22, 0x40, 0x0a, 0x13, 0x52, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x1a, 0x12, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x40, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2a, 0x44, 0x0a, 0x0a, 0x41, 0x70, 0x61, + 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, 0x36, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x62, 0x6c, + 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, + 0x05, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x1a, 0x0e, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, + 0x31, 0x3a, 0x37, 0x34, 0x30, 0x30, 0x2a, 0x01, 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3c, 0x0a, + 0x03, 0x32, 0x30, 0x30, 0x12, 0x35, 0x0a, 0x1b, 0x4f, 0x4b, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x69, 0x0a, 0x03, 0x34, + 0x30, 0x30, 0x12, 0x62, 0x0a, 0x48, 0x42, 0x61, 0x64, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, + 0x77, 0x61, 0x73, 0x20, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x20, 0x6f, 0x72, + 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0xa8, 0x01, 0x0a, 0x4e, 0x0a, 0x05, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x12, 0x45, 0x08, 0x01, 0x12, 0x37, 0x75, 0x73, 0x65, 0x20, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x20, 0x49, 0x44, 0x20, 0x61, 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x20, 0x61, 0x73, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, - 0x06, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x20, 0x02, 0x0a, 0x56, 0x0a, 0x06, 0x42, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x12, 0x4c, 0x08, 0x03, 0x12, 0x3d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x4a, 0x57, 0x54, 0x20, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, - 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x3a, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x3c, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3e, 0x1a, 0x07, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x20, - 0x02, 0x62, 0x0b, 0x0a, 0x09, 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x00, 0x62, 0x0c, - 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x6a, 0x06, 0x0a, 0x04, - 0x55, 0x73, 0x65, 0x72, 0x6a, 0x07, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x6a, 0x0e, 0x0a, - 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x09, 0x0a, - 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6a, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x6a, 0x08, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x6a, 0x06, 0x0a, 0x04, 0x52, 0x6f, - 0x6c, 0x65, 0x6a, 0x0c, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x08, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x5a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x66, 0x72, 0x6f, 0x6e, - 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x72, 0x6f, - 0x6e, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x4a, 0x0a, 0x03, 0x34, 0x30, 0x31, 0x12, 0x43, 0x0a, + 0x29, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x2d, 0x20, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, + 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x61, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x5a, 0x0a, 0x40, 0x46, 0x6f, 0x72, + 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x20, 0x2d, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, + 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x4a, 0x0a, 0x30, + 0x4e, 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, + 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x75, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, + 0x6e, 0x0a, 0x54, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x73, 0x20, 0x69, + 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x72, 0x6f, 0x6e, + 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x20, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, + 0xa8, 0x01, 0x0a, 0x4e, 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x45, 0x08, 0x01, 0x12, + 0x37, 0x75, 0x73, 0x65, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x49, 0x44, 0x20, 0x61, + 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x20, 0x61, 0x73, 0x20, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x06, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, + 0x20, 0x02, 0x0a, 0x56, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x4c, 0x08, 0x03, + 0x12, 0x3d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x4a, 0x57, 0x54, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x3a, + 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x3c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3e, 0x1a, + 0x07, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x20, 0x02, 0x62, 0x0b, 0x0a, 0x09, 0x0a, 0x05, + 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x00, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x12, 0x00, 0x6a, 0x06, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x6a, 0x07, 0x0a, + 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x6a, 0x0e, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x09, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x6a, 0x0a, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x0a, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6a, 0x08, 0x0a, 0x06, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x6a, 0x06, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x6a, 0x0c, 0x0a, 0x0a, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x66, 0x72, + 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x08, + 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2933,7 +3059,7 @@ func file_raystack_frontier_v1beta1_admin_proto_rawDescGZIP() []byte { return file_raystack_frontier_v1beta1_admin_proto_rawDescData } -var file_raystack_frontier_v1beta1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_raystack_frontier_v1beta1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_raystack_frontier_v1beta1_admin_proto_goTypes = []interface{}{ (*ListAllUsersRequest)(nil), // 0: raystack.frontier.v1beta1.ListAllUsersRequest (*ListAllUsersResponse)(nil), // 1: raystack.frontier.v1beta1.ListAllUsersResponse @@ -2974,94 +3100,100 @@ var file_raystack_frontier_v1beta1_admin_proto_goTypes = []interface{}{ (*DelegatedCheckoutResponse)(nil), // 36: raystack.frontier.v1beta1.DelegatedCheckoutResponse (*ListAllInvoicesRequest)(nil), // 37: raystack.frontier.v1beta1.ListAllInvoicesRequest (*ListAllInvoicesResponse)(nil), // 38: raystack.frontier.v1beta1.ListAllInvoicesResponse - (*User)(nil), // 39: raystack.frontier.v1beta1.User - (*Group)(nil), // 40: raystack.frontier.v1beta1.Group - (*Organization)(nil), // 41: raystack.frontier.v1beta1.Organization - (*Project)(nil), // 42: raystack.frontier.v1beta1.Project - (*Relation)(nil), // 43: raystack.frontier.v1beta1.Relation - (*Resource)(nil), // 44: raystack.frontier.v1beta1.Resource - (*RoleRequestBody)(nil), // 45: raystack.frontier.v1beta1.RoleRequestBody - (*Role)(nil), // 46: raystack.frontier.v1beta1.Role - (*structpb.Struct)(nil), // 47: google.protobuf.Struct - (*Permission)(nil), // 48: raystack.frontier.v1beta1.Permission - (*Preference)(nil), // 49: raystack.frontier.v1beta1.Preference - (*PreferenceRequestBody)(nil), // 50: raystack.frontier.v1beta1.PreferenceRequestBody - (*ServiceUser)(nil), // 51: raystack.frontier.v1beta1.ServiceUser - (*CheckoutSubscriptionBody)(nil), // 52: raystack.frontier.v1beta1.CheckoutSubscriptionBody - (*CheckoutProductBody)(nil), // 53: raystack.frontier.v1beta1.CheckoutProductBody - (*Subscription)(nil), // 54: raystack.frontier.v1beta1.Subscription - (*Product)(nil), // 55: raystack.frontier.v1beta1.Product - (*Invoice)(nil), // 56: raystack.frontier.v1beta1.Invoice + (*ListAllBillingAccountsRequest)(nil), // 39: raystack.frontier.v1beta1.ListAllBillingAccountsRequest + (*ListAllBillingAccountsResponse)(nil), // 40: raystack.frontier.v1beta1.ListAllBillingAccountsResponse + (*User)(nil), // 41: raystack.frontier.v1beta1.User + (*Group)(nil), // 42: raystack.frontier.v1beta1.Group + (*Organization)(nil), // 43: raystack.frontier.v1beta1.Organization + (*Project)(nil), // 44: raystack.frontier.v1beta1.Project + (*Relation)(nil), // 45: raystack.frontier.v1beta1.Relation + (*Resource)(nil), // 46: raystack.frontier.v1beta1.Resource + (*RoleRequestBody)(nil), // 47: raystack.frontier.v1beta1.RoleRequestBody + (*Role)(nil), // 48: raystack.frontier.v1beta1.Role + (*structpb.Struct)(nil), // 49: google.protobuf.Struct + (*Permission)(nil), // 50: raystack.frontier.v1beta1.Permission + (*Preference)(nil), // 51: raystack.frontier.v1beta1.Preference + (*PreferenceRequestBody)(nil), // 52: raystack.frontier.v1beta1.PreferenceRequestBody + (*ServiceUser)(nil), // 53: raystack.frontier.v1beta1.ServiceUser + (*CheckoutSubscriptionBody)(nil), // 54: raystack.frontier.v1beta1.CheckoutSubscriptionBody + (*CheckoutProductBody)(nil), // 55: raystack.frontier.v1beta1.CheckoutProductBody + (*Subscription)(nil), // 56: raystack.frontier.v1beta1.Subscription + (*Product)(nil), // 57: raystack.frontier.v1beta1.Product + (*Invoice)(nil), // 58: raystack.frontier.v1beta1.Invoice + (*BillingAccount)(nil), // 59: raystack.frontier.v1beta1.BillingAccount } var file_raystack_frontier_v1beta1_admin_proto_depIdxs = []int32{ - 39, // 0: raystack.frontier.v1beta1.ListAllUsersResponse.users:type_name -> raystack.frontier.v1beta1.User - 40, // 1: raystack.frontier.v1beta1.ListGroupsResponse.groups:type_name -> raystack.frontier.v1beta1.Group - 41, // 2: raystack.frontier.v1beta1.ListAllOrganizationsResponse.organizations:type_name -> raystack.frontier.v1beta1.Organization - 42, // 3: raystack.frontier.v1beta1.ListProjectsResponse.projects:type_name -> raystack.frontier.v1beta1.Project - 43, // 4: raystack.frontier.v1beta1.ListRelationsResponse.relations:type_name -> raystack.frontier.v1beta1.Relation - 44, // 5: raystack.frontier.v1beta1.ListResourcesResponse.resources:type_name -> raystack.frontier.v1beta1.Resource - 45, // 6: raystack.frontier.v1beta1.CreateRoleRequest.body:type_name -> raystack.frontier.v1beta1.RoleRequestBody - 46, // 7: raystack.frontier.v1beta1.CreateRoleResponse.role:type_name -> raystack.frontier.v1beta1.Role - 45, // 8: raystack.frontier.v1beta1.UpdateRoleRequest.body:type_name -> raystack.frontier.v1beta1.RoleRequestBody - 46, // 9: raystack.frontier.v1beta1.UpdateRoleResponse.role:type_name -> raystack.frontier.v1beta1.Role - 47, // 10: raystack.frontier.v1beta1.PermissionRequestBody.metadata:type_name -> google.protobuf.Struct + 41, // 0: raystack.frontier.v1beta1.ListAllUsersResponse.users:type_name -> raystack.frontier.v1beta1.User + 42, // 1: raystack.frontier.v1beta1.ListGroupsResponse.groups:type_name -> raystack.frontier.v1beta1.Group + 43, // 2: raystack.frontier.v1beta1.ListAllOrganizationsResponse.organizations:type_name -> raystack.frontier.v1beta1.Organization + 44, // 3: raystack.frontier.v1beta1.ListProjectsResponse.projects:type_name -> raystack.frontier.v1beta1.Project + 45, // 4: raystack.frontier.v1beta1.ListRelationsResponse.relations:type_name -> raystack.frontier.v1beta1.Relation + 46, // 5: raystack.frontier.v1beta1.ListResourcesResponse.resources:type_name -> raystack.frontier.v1beta1.Resource + 47, // 6: raystack.frontier.v1beta1.CreateRoleRequest.body:type_name -> raystack.frontier.v1beta1.RoleRequestBody + 48, // 7: raystack.frontier.v1beta1.CreateRoleResponse.role:type_name -> raystack.frontier.v1beta1.Role + 47, // 8: raystack.frontier.v1beta1.UpdateRoleRequest.body:type_name -> raystack.frontier.v1beta1.RoleRequestBody + 48, // 9: raystack.frontier.v1beta1.UpdateRoleResponse.role:type_name -> raystack.frontier.v1beta1.Role + 49, // 10: raystack.frontier.v1beta1.PermissionRequestBody.metadata:type_name -> google.protobuf.Struct 18, // 11: raystack.frontier.v1beta1.CreatePermissionRequest.bodies:type_name -> raystack.frontier.v1beta1.PermissionRequestBody - 48, // 12: raystack.frontier.v1beta1.CreatePermissionResponse.permissions:type_name -> raystack.frontier.v1beta1.Permission + 50, // 12: raystack.frontier.v1beta1.CreatePermissionResponse.permissions:type_name -> raystack.frontier.v1beta1.Permission 18, // 13: raystack.frontier.v1beta1.UpdatePermissionRequest.body:type_name -> raystack.frontier.v1beta1.PermissionRequestBody - 48, // 14: raystack.frontier.v1beta1.UpdatePermissionResponse.permission:type_name -> raystack.frontier.v1beta1.Permission - 49, // 15: raystack.frontier.v1beta1.ListPreferencesResponse.preferences:type_name -> raystack.frontier.v1beta1.Preference - 50, // 16: raystack.frontier.v1beta1.CreatePreferencesRequest.preferences:type_name -> raystack.frontier.v1beta1.PreferenceRequestBody - 49, // 17: raystack.frontier.v1beta1.CreatePreferencesResponse.preference:type_name -> raystack.frontier.v1beta1.Preference - 39, // 18: raystack.frontier.v1beta1.ListPlatformUsersResponse.users:type_name -> raystack.frontier.v1beta1.User - 51, // 19: raystack.frontier.v1beta1.ListPlatformUsersResponse.serviceusers:type_name -> raystack.frontier.v1beta1.ServiceUser - 52, // 20: raystack.frontier.v1beta1.DelegatedCheckoutRequest.subscription_body:type_name -> raystack.frontier.v1beta1.CheckoutSubscriptionBody - 53, // 21: raystack.frontier.v1beta1.DelegatedCheckoutRequest.product_body:type_name -> raystack.frontier.v1beta1.CheckoutProductBody - 54, // 22: raystack.frontier.v1beta1.DelegatedCheckoutResponse.subscription:type_name -> raystack.frontier.v1beta1.Subscription - 55, // 23: raystack.frontier.v1beta1.DelegatedCheckoutResponse.product:type_name -> raystack.frontier.v1beta1.Product - 56, // 24: raystack.frontier.v1beta1.ListAllInvoicesResponse.invoices:type_name -> raystack.frontier.v1beta1.Invoice - 0, // 25: raystack.frontier.v1beta1.AdminService.ListAllUsers:input_type -> raystack.frontier.v1beta1.ListAllUsersRequest - 2, // 26: raystack.frontier.v1beta1.AdminService.ListGroups:input_type -> raystack.frontier.v1beta1.ListGroupsRequest - 4, // 27: raystack.frontier.v1beta1.AdminService.ListAllOrganizations:input_type -> raystack.frontier.v1beta1.ListAllOrganizationsRequest - 6, // 28: raystack.frontier.v1beta1.AdminService.ListProjects:input_type -> raystack.frontier.v1beta1.ListProjectsRequest - 8, // 29: raystack.frontier.v1beta1.AdminService.ListRelations:input_type -> raystack.frontier.v1beta1.ListRelationsRequest - 10, // 30: raystack.frontier.v1beta1.AdminService.ListResources:input_type -> raystack.frontier.v1beta1.ListResourcesRequest - 12, // 31: raystack.frontier.v1beta1.AdminService.CreateRole:input_type -> raystack.frontier.v1beta1.CreateRoleRequest - 14, // 32: raystack.frontier.v1beta1.AdminService.UpdateRole:input_type -> raystack.frontier.v1beta1.UpdateRoleRequest - 16, // 33: raystack.frontier.v1beta1.AdminService.DeleteRole:input_type -> raystack.frontier.v1beta1.DeleteRoleRequest - 19, // 34: raystack.frontier.v1beta1.AdminService.CreatePermission:input_type -> raystack.frontier.v1beta1.CreatePermissionRequest - 21, // 35: raystack.frontier.v1beta1.AdminService.UpdatePermission:input_type -> raystack.frontier.v1beta1.UpdatePermissionRequest - 23, // 36: raystack.frontier.v1beta1.AdminService.DeletePermission:input_type -> raystack.frontier.v1beta1.DeletePermissionRequest - 25, // 37: raystack.frontier.v1beta1.AdminService.ListPreferences:input_type -> raystack.frontier.v1beta1.ListPreferencesRequest - 27, // 38: raystack.frontier.v1beta1.AdminService.CreatePreferences:input_type -> raystack.frontier.v1beta1.CreatePreferencesRequest - 29, // 39: raystack.frontier.v1beta1.AdminService.CheckFederatedResourcePermission:input_type -> raystack.frontier.v1beta1.CheckFederatedResourcePermissionRequest - 31, // 40: raystack.frontier.v1beta1.AdminService.AddPlatformUser:input_type -> raystack.frontier.v1beta1.AddPlatformUserRequest - 33, // 41: raystack.frontier.v1beta1.AdminService.ListPlatformUsers:input_type -> raystack.frontier.v1beta1.ListPlatformUsersRequest - 35, // 42: raystack.frontier.v1beta1.AdminService.DelegatedCheckout:input_type -> raystack.frontier.v1beta1.DelegatedCheckoutRequest - 37, // 43: raystack.frontier.v1beta1.AdminService.ListAllInvoices:input_type -> raystack.frontier.v1beta1.ListAllInvoicesRequest - 1, // 44: raystack.frontier.v1beta1.AdminService.ListAllUsers:output_type -> raystack.frontier.v1beta1.ListAllUsersResponse - 3, // 45: raystack.frontier.v1beta1.AdminService.ListGroups:output_type -> raystack.frontier.v1beta1.ListGroupsResponse - 5, // 46: raystack.frontier.v1beta1.AdminService.ListAllOrganizations:output_type -> raystack.frontier.v1beta1.ListAllOrganizationsResponse - 7, // 47: raystack.frontier.v1beta1.AdminService.ListProjects:output_type -> raystack.frontier.v1beta1.ListProjectsResponse - 9, // 48: raystack.frontier.v1beta1.AdminService.ListRelations:output_type -> raystack.frontier.v1beta1.ListRelationsResponse - 11, // 49: raystack.frontier.v1beta1.AdminService.ListResources:output_type -> raystack.frontier.v1beta1.ListResourcesResponse - 13, // 50: raystack.frontier.v1beta1.AdminService.CreateRole:output_type -> raystack.frontier.v1beta1.CreateRoleResponse - 15, // 51: raystack.frontier.v1beta1.AdminService.UpdateRole:output_type -> raystack.frontier.v1beta1.UpdateRoleResponse - 17, // 52: raystack.frontier.v1beta1.AdminService.DeleteRole:output_type -> raystack.frontier.v1beta1.DeleteRoleResponse - 20, // 53: raystack.frontier.v1beta1.AdminService.CreatePermission:output_type -> raystack.frontier.v1beta1.CreatePermissionResponse - 22, // 54: raystack.frontier.v1beta1.AdminService.UpdatePermission:output_type -> raystack.frontier.v1beta1.UpdatePermissionResponse - 24, // 55: raystack.frontier.v1beta1.AdminService.DeletePermission:output_type -> raystack.frontier.v1beta1.DeletePermissionResponse - 26, // 56: raystack.frontier.v1beta1.AdminService.ListPreferences:output_type -> raystack.frontier.v1beta1.ListPreferencesResponse - 28, // 57: raystack.frontier.v1beta1.AdminService.CreatePreferences:output_type -> raystack.frontier.v1beta1.CreatePreferencesResponse - 30, // 58: raystack.frontier.v1beta1.AdminService.CheckFederatedResourcePermission:output_type -> raystack.frontier.v1beta1.CheckFederatedResourcePermissionResponse - 32, // 59: raystack.frontier.v1beta1.AdminService.AddPlatformUser:output_type -> raystack.frontier.v1beta1.AddPlatformUserResponse - 34, // 60: raystack.frontier.v1beta1.AdminService.ListPlatformUsers:output_type -> raystack.frontier.v1beta1.ListPlatformUsersResponse - 36, // 61: raystack.frontier.v1beta1.AdminService.DelegatedCheckout:output_type -> raystack.frontier.v1beta1.DelegatedCheckoutResponse - 38, // 62: raystack.frontier.v1beta1.AdminService.ListAllInvoices:output_type -> raystack.frontier.v1beta1.ListAllInvoicesResponse - 44, // [44:63] is the sub-list for method output_type - 25, // [25:44] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 50, // 14: raystack.frontier.v1beta1.UpdatePermissionResponse.permission:type_name -> raystack.frontier.v1beta1.Permission + 51, // 15: raystack.frontier.v1beta1.ListPreferencesResponse.preferences:type_name -> raystack.frontier.v1beta1.Preference + 52, // 16: raystack.frontier.v1beta1.CreatePreferencesRequest.preferences:type_name -> raystack.frontier.v1beta1.PreferenceRequestBody + 51, // 17: raystack.frontier.v1beta1.CreatePreferencesResponse.preference:type_name -> raystack.frontier.v1beta1.Preference + 41, // 18: raystack.frontier.v1beta1.ListPlatformUsersResponse.users:type_name -> raystack.frontier.v1beta1.User + 53, // 19: raystack.frontier.v1beta1.ListPlatformUsersResponse.serviceusers:type_name -> raystack.frontier.v1beta1.ServiceUser + 54, // 20: raystack.frontier.v1beta1.DelegatedCheckoutRequest.subscription_body:type_name -> raystack.frontier.v1beta1.CheckoutSubscriptionBody + 55, // 21: raystack.frontier.v1beta1.DelegatedCheckoutRequest.product_body:type_name -> raystack.frontier.v1beta1.CheckoutProductBody + 56, // 22: raystack.frontier.v1beta1.DelegatedCheckoutResponse.subscription:type_name -> raystack.frontier.v1beta1.Subscription + 57, // 23: raystack.frontier.v1beta1.DelegatedCheckoutResponse.product:type_name -> raystack.frontier.v1beta1.Product + 58, // 24: raystack.frontier.v1beta1.ListAllInvoicesResponse.invoices:type_name -> raystack.frontier.v1beta1.Invoice + 59, // 25: raystack.frontier.v1beta1.ListAllBillingAccountsResponse.billing_accounts:type_name -> raystack.frontier.v1beta1.BillingAccount + 0, // 26: raystack.frontier.v1beta1.AdminService.ListAllUsers:input_type -> raystack.frontier.v1beta1.ListAllUsersRequest + 2, // 27: raystack.frontier.v1beta1.AdminService.ListGroups:input_type -> raystack.frontier.v1beta1.ListGroupsRequest + 4, // 28: raystack.frontier.v1beta1.AdminService.ListAllOrganizations:input_type -> raystack.frontier.v1beta1.ListAllOrganizationsRequest + 6, // 29: raystack.frontier.v1beta1.AdminService.ListProjects:input_type -> raystack.frontier.v1beta1.ListProjectsRequest + 8, // 30: raystack.frontier.v1beta1.AdminService.ListRelations:input_type -> raystack.frontier.v1beta1.ListRelationsRequest + 10, // 31: raystack.frontier.v1beta1.AdminService.ListResources:input_type -> raystack.frontier.v1beta1.ListResourcesRequest + 12, // 32: raystack.frontier.v1beta1.AdminService.CreateRole:input_type -> raystack.frontier.v1beta1.CreateRoleRequest + 14, // 33: raystack.frontier.v1beta1.AdminService.UpdateRole:input_type -> raystack.frontier.v1beta1.UpdateRoleRequest + 16, // 34: raystack.frontier.v1beta1.AdminService.DeleteRole:input_type -> raystack.frontier.v1beta1.DeleteRoleRequest + 19, // 35: raystack.frontier.v1beta1.AdminService.CreatePermission:input_type -> raystack.frontier.v1beta1.CreatePermissionRequest + 21, // 36: raystack.frontier.v1beta1.AdminService.UpdatePermission:input_type -> raystack.frontier.v1beta1.UpdatePermissionRequest + 23, // 37: raystack.frontier.v1beta1.AdminService.DeletePermission:input_type -> raystack.frontier.v1beta1.DeletePermissionRequest + 25, // 38: raystack.frontier.v1beta1.AdminService.ListPreferences:input_type -> raystack.frontier.v1beta1.ListPreferencesRequest + 27, // 39: raystack.frontier.v1beta1.AdminService.CreatePreferences:input_type -> raystack.frontier.v1beta1.CreatePreferencesRequest + 29, // 40: raystack.frontier.v1beta1.AdminService.CheckFederatedResourcePermission:input_type -> raystack.frontier.v1beta1.CheckFederatedResourcePermissionRequest + 31, // 41: raystack.frontier.v1beta1.AdminService.AddPlatformUser:input_type -> raystack.frontier.v1beta1.AddPlatformUserRequest + 33, // 42: raystack.frontier.v1beta1.AdminService.ListPlatformUsers:input_type -> raystack.frontier.v1beta1.ListPlatformUsersRequest + 35, // 43: raystack.frontier.v1beta1.AdminService.DelegatedCheckout:input_type -> raystack.frontier.v1beta1.DelegatedCheckoutRequest + 37, // 44: raystack.frontier.v1beta1.AdminService.ListAllInvoices:input_type -> raystack.frontier.v1beta1.ListAllInvoicesRequest + 39, // 45: raystack.frontier.v1beta1.AdminService.ListAllBillingAccounts:input_type -> raystack.frontier.v1beta1.ListAllBillingAccountsRequest + 1, // 46: raystack.frontier.v1beta1.AdminService.ListAllUsers:output_type -> raystack.frontier.v1beta1.ListAllUsersResponse + 3, // 47: raystack.frontier.v1beta1.AdminService.ListGroups:output_type -> raystack.frontier.v1beta1.ListGroupsResponse + 5, // 48: raystack.frontier.v1beta1.AdminService.ListAllOrganizations:output_type -> raystack.frontier.v1beta1.ListAllOrganizationsResponse + 7, // 49: raystack.frontier.v1beta1.AdminService.ListProjects:output_type -> raystack.frontier.v1beta1.ListProjectsResponse + 9, // 50: raystack.frontier.v1beta1.AdminService.ListRelations:output_type -> raystack.frontier.v1beta1.ListRelationsResponse + 11, // 51: raystack.frontier.v1beta1.AdminService.ListResources:output_type -> raystack.frontier.v1beta1.ListResourcesResponse + 13, // 52: raystack.frontier.v1beta1.AdminService.CreateRole:output_type -> raystack.frontier.v1beta1.CreateRoleResponse + 15, // 53: raystack.frontier.v1beta1.AdminService.UpdateRole:output_type -> raystack.frontier.v1beta1.UpdateRoleResponse + 17, // 54: raystack.frontier.v1beta1.AdminService.DeleteRole:output_type -> raystack.frontier.v1beta1.DeleteRoleResponse + 20, // 55: raystack.frontier.v1beta1.AdminService.CreatePermission:output_type -> raystack.frontier.v1beta1.CreatePermissionResponse + 22, // 56: raystack.frontier.v1beta1.AdminService.UpdatePermission:output_type -> raystack.frontier.v1beta1.UpdatePermissionResponse + 24, // 57: raystack.frontier.v1beta1.AdminService.DeletePermission:output_type -> raystack.frontier.v1beta1.DeletePermissionResponse + 26, // 58: raystack.frontier.v1beta1.AdminService.ListPreferences:output_type -> raystack.frontier.v1beta1.ListPreferencesResponse + 28, // 59: raystack.frontier.v1beta1.AdminService.CreatePreferences:output_type -> raystack.frontier.v1beta1.CreatePreferencesResponse + 30, // 60: raystack.frontier.v1beta1.AdminService.CheckFederatedResourcePermission:output_type -> raystack.frontier.v1beta1.CheckFederatedResourcePermissionResponse + 32, // 61: raystack.frontier.v1beta1.AdminService.AddPlatformUser:output_type -> raystack.frontier.v1beta1.AddPlatformUserResponse + 34, // 62: raystack.frontier.v1beta1.AdminService.ListPlatformUsers:output_type -> raystack.frontier.v1beta1.ListPlatformUsersResponse + 36, // 63: raystack.frontier.v1beta1.AdminService.DelegatedCheckout:output_type -> raystack.frontier.v1beta1.DelegatedCheckoutResponse + 38, // 64: raystack.frontier.v1beta1.AdminService.ListAllInvoices:output_type -> raystack.frontier.v1beta1.ListAllInvoicesResponse + 40, // 65: raystack.frontier.v1beta1.AdminService.ListAllBillingAccounts:output_type -> raystack.frontier.v1beta1.ListAllBillingAccountsResponse + 46, // [46:66] is the sub-list for method output_type + 26, // [26:46] 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_raystack_frontier_v1beta1_admin_proto_init() } @@ -3539,6 +3671,30 @@ func file_raystack_frontier_v1beta1_admin_proto_init() { return nil } } + file_raystack_frontier_v1beta1_admin_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllBillingAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_frontier_v1beta1_admin_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAllBillingAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3546,7 +3702,7 @@ func file_raystack_frontier_v1beta1_admin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_raystack_frontier_v1beta1_admin_proto_rawDesc, NumEnums: 0, - NumMessages: 39, + NumMessages: 41, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/v1beta1/admin.pb.gw.go b/proto/v1beta1/admin.pb.gw.go index ef12893d3..e836544c4 100644 --- a/proto/v1beta1/admin.pb.gw.go +++ b/proto/v1beta1/admin.pb.gw.go @@ -817,6 +817,42 @@ func local_request_AdminService_ListAllInvoices_0(ctx context.Context, marshaler } +var ( + filter_AdminService_ListAllBillingAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AdminService_ListAllBillingAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAllBillingAccountsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_ListAllBillingAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListAllBillingAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AdminService_ListAllBillingAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAllBillingAccountsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AdminService_ListAllBillingAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListAllBillingAccounts(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterAdminServiceHandlerServer registers the http handlers for service AdminService to "mux". // UnaryRPC :call AdminServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1298,6 +1334,31 @@ func RegisterAdminServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_ListAllBillingAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.frontier.v1beta1.AdminService/ListAllBillingAccounts", runtime.WithHTTPPathPattern("/v1beta1/admin/billing/accounts")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AdminService_ListAllBillingAccounts_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_ListAllBillingAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1757,6 +1818,28 @@ func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_AdminService_ListAllBillingAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.frontier.v1beta1.AdminService/ListAllBillingAccounts", runtime.WithHTTPPathPattern("/v1beta1/admin/billing/accounts")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminService_ListAllBillingAccounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminService_ListAllBillingAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1798,6 +1881,8 @@ var ( pattern_AdminService_DelegatedCheckout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"v1beta1", "admin", "organizations", "org_id", "billing", "billing_id", "checkouts"}, "")) pattern_AdminService_ListAllInvoices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1beta1", "admin", "billing", "invoices"}, "")) + + pattern_AdminService_ListAllBillingAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1beta1", "admin", "billing", "accounts"}, "")) ) var ( @@ -1838,4 +1923,6 @@ var ( forward_AdminService_DelegatedCheckout_0 = runtime.ForwardResponseMessage forward_AdminService_ListAllInvoices_0 = runtime.ForwardResponseMessage + + forward_AdminService_ListAllBillingAccounts_0 = runtime.ForwardResponseMessage ) diff --git a/proto/v1beta1/admin.pb.validate.go b/proto/v1beta1/admin.pb.validate.go index 817600411..9164ed2cf 100644 --- a/proto/v1beta1/admin.pb.validate.go +++ b/proto/v1beta1/admin.pb.validate.go @@ -4955,3 +4955,245 @@ var _ interface { Cause() error ErrorName() string } = ListAllInvoicesResponseValidationError{} + +// Validate checks the field values on ListAllBillingAccountsRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListAllBillingAccountsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListAllBillingAccountsRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ListAllBillingAccountsRequestMultiError, or nil if none found. +func (m *ListAllBillingAccountsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListAllBillingAccountsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for OrgId + + if len(errors) > 0 { + return ListAllBillingAccountsRequestMultiError(errors) + } + + return nil +} + +// ListAllBillingAccountsRequestMultiError is an error wrapping multiple +// validation errors returned by ListAllBillingAccountsRequest.ValidateAll() +// if the designated constraints aren't met. +type ListAllBillingAccountsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListAllBillingAccountsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListAllBillingAccountsRequestMultiError) AllErrors() []error { return m } + +// ListAllBillingAccountsRequestValidationError is the validation error +// returned by ListAllBillingAccountsRequest.Validate if the designated +// constraints aren't met. +type ListAllBillingAccountsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListAllBillingAccountsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListAllBillingAccountsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListAllBillingAccountsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListAllBillingAccountsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListAllBillingAccountsRequestValidationError) ErrorName() string { + return "ListAllBillingAccountsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListAllBillingAccountsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListAllBillingAccountsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListAllBillingAccountsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListAllBillingAccountsRequestValidationError{} + +// Validate checks the field values on ListAllBillingAccountsResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListAllBillingAccountsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListAllBillingAccountsResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ListAllBillingAccountsResponseMultiError, or nil if none found. +func (m *ListAllBillingAccountsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListAllBillingAccountsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetBillingAccounts() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListAllBillingAccountsResponseValidationError{ + field: fmt.Sprintf("BillingAccounts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListAllBillingAccountsResponseValidationError{ + field: fmt.Sprintf("BillingAccounts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListAllBillingAccountsResponseValidationError{ + field: fmt.Sprintf("BillingAccounts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListAllBillingAccountsResponseMultiError(errors) + } + + return nil +} + +// ListAllBillingAccountsResponseMultiError is an error wrapping multiple +// validation errors returned by ListAllBillingAccountsResponse.ValidateAll() +// if the designated constraints aren't met. +type ListAllBillingAccountsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListAllBillingAccountsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListAllBillingAccountsResponseMultiError) AllErrors() []error { return m } + +// ListAllBillingAccountsResponseValidationError is the validation error +// returned by ListAllBillingAccountsResponse.Validate if the designated +// constraints aren't met. +type ListAllBillingAccountsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListAllBillingAccountsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListAllBillingAccountsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListAllBillingAccountsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListAllBillingAccountsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListAllBillingAccountsResponseValidationError) ErrorName() string { + return "ListAllBillingAccountsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListAllBillingAccountsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListAllBillingAccountsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListAllBillingAccountsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListAllBillingAccountsResponseValidationError{} diff --git a/proto/v1beta1/admin_grpc.pb.go b/proto/v1beta1/admin_grpc.pb.go index 81a5c49fe..7d93bbbf4 100644 --- a/proto/v1beta1/admin_grpc.pb.go +++ b/proto/v1beta1/admin_grpc.pb.go @@ -38,6 +38,7 @@ const ( AdminService_ListPlatformUsers_FullMethodName = "/raystack.frontier.v1beta1.AdminService/ListPlatformUsers" AdminService_DelegatedCheckout_FullMethodName = "/raystack.frontier.v1beta1.AdminService/DelegatedCheckout" AdminService_ListAllInvoices_FullMethodName = "/raystack.frontier.v1beta1.AdminService/ListAllInvoices" + AdminService_ListAllBillingAccounts_FullMethodName = "/raystack.frontier.v1beta1.AdminService/ListAllBillingAccounts" ) // AdminServiceClient is the client API for AdminService service. @@ -75,6 +76,7 @@ type AdminServiceClient interface { // Checkout DelegatedCheckout(ctx context.Context, in *DelegatedCheckoutRequest, opts ...grpc.CallOption) (*DelegatedCheckoutResponse, error) ListAllInvoices(ctx context.Context, in *ListAllInvoicesRequest, opts ...grpc.CallOption) (*ListAllInvoicesResponse, error) + ListAllBillingAccounts(ctx context.Context, in *ListAllBillingAccountsRequest, opts ...grpc.CallOption) (*ListAllBillingAccountsResponse, error) } type adminServiceClient struct { @@ -256,6 +258,15 @@ func (c *adminServiceClient) ListAllInvoices(ctx context.Context, in *ListAllInv return out, nil } +func (c *adminServiceClient) ListAllBillingAccounts(ctx context.Context, in *ListAllBillingAccountsRequest, opts ...grpc.CallOption) (*ListAllBillingAccountsResponse, error) { + out := new(ListAllBillingAccountsResponse) + err := c.cc.Invoke(ctx, AdminService_ListAllBillingAccounts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AdminServiceServer is the server API for AdminService service. // All implementations must embed UnimplementedAdminServiceServer // for forward compatibility @@ -291,6 +302,7 @@ type AdminServiceServer interface { // Checkout DelegatedCheckout(context.Context, *DelegatedCheckoutRequest) (*DelegatedCheckoutResponse, error) ListAllInvoices(context.Context, *ListAllInvoicesRequest) (*ListAllInvoicesResponse, error) + ListAllBillingAccounts(context.Context, *ListAllBillingAccountsRequest) (*ListAllBillingAccountsResponse, error) mustEmbedUnimplementedAdminServiceServer() } @@ -355,6 +367,9 @@ func (UnimplementedAdminServiceServer) DelegatedCheckout(context.Context, *Deleg func (UnimplementedAdminServiceServer) ListAllInvoices(context.Context, *ListAllInvoicesRequest) (*ListAllInvoicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAllInvoices not implemented") } +func (UnimplementedAdminServiceServer) ListAllBillingAccounts(context.Context, *ListAllBillingAccountsRequest) (*ListAllBillingAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAllBillingAccounts not implemented") +} func (UnimplementedAdminServiceServer) mustEmbedUnimplementedAdminServiceServer() {} // UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service. @@ -710,6 +725,24 @@ func _AdminService_ListAllInvoices_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _AdminService_ListAllBillingAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAllBillingAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).ListAllBillingAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AdminService_ListAllBillingAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).ListAllBillingAccounts(ctx, req.(*ListAllBillingAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -793,6 +826,10 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListAllInvoices", Handler: _AdminService_ListAllInvoices_Handler, }, + { + MethodName: "ListAllBillingAccounts", + Handler: _AdminService_ListAllBillingAccounts_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "raystack/frontier/v1beta1/admin.proto",