diff --git a/gen/go/qdrant/cloud/billing/v1/billing.pb.go b/gen/go/qdrant/cloud/billing/v1/billing.pb.go index 90810e8e..f39af6f1 100644 --- a/gen/go/qdrant/cloud/billing/v1/billing.pb.go +++ b/gen/go/qdrant/cloud/billing/v1/billing.pb.go @@ -1026,6 +1026,192 @@ func (x *CreditContract) GetNotes() string { return "" } +// GetBillingAccountParentRequest is the request for the GetBillingAccountParent RPC. +type GetBillingAccountParentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the account (in GUID format). + // This is a required field. + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBillingAccountParentRequest) Reset() { + *x = GetBillingAccountParentRequest{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBillingAccountParentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBillingAccountParentRequest) ProtoMessage() {} + +func (x *GetBillingAccountParentRequest) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[14] + 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 GetBillingAccountParentRequest.ProtoReflect.Descriptor instead. +func (*GetBillingAccountParentRequest) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{14} +} + +func (x *GetBillingAccountParentRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +// GetBillingAccountParentResponse contains the parent account for the requested account. +type GetBillingAccountParentResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the parent billing account. + ParentAccountId string `protobuf:"bytes,1,opt,name=parent_account_id,json=parentAccountId,proto3" json:"parent_account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBillingAccountParentResponse) Reset() { + *x = GetBillingAccountParentResponse{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBillingAccountParentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBillingAccountParentResponse) ProtoMessage() {} + +func (x *GetBillingAccountParentResponse) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[15] + 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 GetBillingAccountParentResponse.ProtoReflect.Descriptor instead. +func (*GetBillingAccountParentResponse) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{15} +} + +func (x *GetBillingAccountParentResponse) GetParentAccountId() string { + if x != nil { + return x.ParentAccountId + } + return "" +} + +// ListBillingAccountChildrenRequest is the request for the ListBillingAccountChildren RPC. +type ListBillingAccountChildrenRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the account (in GUID format). + // This is a required field. + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBillingAccountChildrenRequest) Reset() { + *x = ListBillingAccountChildrenRequest{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBillingAccountChildrenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBillingAccountChildrenRequest) ProtoMessage() {} + +func (x *ListBillingAccountChildrenRequest) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[16] + 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 ListBillingAccountChildrenRequest.ProtoReflect.Descriptor instead. +func (*ListBillingAccountChildrenRequest) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{16} +} + +func (x *ListBillingAccountChildrenRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +// ListBillingAccountChildrenResponse contains the child accounts for the requested account. +type ListBillingAccountChildrenResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifiers of the child billing accounts. + ChildAccountIds []string `protobuf:"bytes,1,rep,name=child_account_ids,json=childAccountIds,proto3" json:"child_account_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBillingAccountChildrenResponse) Reset() { + *x = ListBillingAccountChildrenResponse{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBillingAccountChildrenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBillingAccountChildrenResponse) ProtoMessage() {} + +func (x *ListBillingAccountChildrenResponse) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[17] + 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 ListBillingAccountChildrenResponse.ProtoReflect.Descriptor instead. +func (*ListBillingAccountChildrenResponse) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{17} +} + +func (x *ListBillingAccountChildrenResponse) GetChildAccountIds() []string { + if x != nil { + return x.ChildAccountIds + } + return nil +} + var File_qdrant_cloud_billing_v1_billing_proto protoreflect.FileDescriptor const file_qdrant_cloud_billing_v1_billing_proto_rawDesc = "" + @@ -1102,7 +1288,18 @@ const file_qdrant_cloud_billing_v1_billing_proto_rawDesc = "" + "activeFrom\x12?\n" + "\tactive_to\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\bactiveTo\x12\"\n" + "\x05notes\x18\b \x01(\tB\a\xbaH\x04r\x02\x10\x01H\x00R\x05notes\x88\x01\x01B\b\n" + - "\x06_notes*\xb6\x01\n" + + "\x06_notes\"I\n" + + "\x1eGetBillingAccountParentRequest\x12'\n" + + "\n" + + "account_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n" + + "\x1fGetBillingAccountParentResponse\x124\n" + + "\x11parent_account_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x0fparentAccountId\"L\n" + + "!ListBillingAccountChildrenRequest\x12'\n" + + "\n" + + "account_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"_\n" + + "\"ListBillingAccountChildrenResponse\x129\n" + + "\x11child_account_ids\x18\x01 \x03(\tB\r\xbaH\n" + + "\x92\x01\a\"\x05r\x03\xb0\x01\x01R\x0fchildAccountIds*\xb6\x01\n" + "\x10BillingFrequency\x12!\n" + "\x1dBILLING_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1d\n" + "\x19BILLING_FREQUENCY_MONTHLY\x10\x01\x12\x1f\n" + @@ -1115,12 +1312,15 @@ const file_qdrant_cloud_billing_v1_billing_proto_rawDesc = "" + "\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n" + "\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n" + "\x13INVOICE_STATUS_PAID\x10\x04\x12 \n" + - "\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x052\x8b\a\n" + + "\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x052\xd8\n" + + "\n" + "\x0eBillingService\x12\xbf\x01\n" + "\fListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x020\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n" + "\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x021\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n" + "\x13ListCreditContracts\x123.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a4.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x028\x126/api/billing/v1/accounts/{account_id}/credit-contracts\x12\x89\x02\n" + - "\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02D\x12B/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x1a\x06µ\x18\x02\b\x01B\xfe\x01\n" + + "\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02D\x12B/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x12\xde\x01\n" + + "\x17GetBillingAccountParent\x127.qdrant.cloud.billing.v1.GetBillingAccountParentRequest\x1a8.qdrant.cloud.billing.v1.GetBillingAccountParentResponse\"P\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02.\x12,/api/billing/v1/accounts/{account_id}/parent\x12\xe9\x01\n" + + "\x1aListBillingAccountChildren\x12:.qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest\x1a;.qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x020\x12./api/billing/v1/accounts/{account_id}/children\x1a\x06µ\x18\x02\b\x01B\xfe\x01\n" + "\x1bcom.qdrant.cloud.billing.v1B\fBillingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3" var ( @@ -1136,7 +1336,7 @@ func file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP() []byte { } var file_qdrant_cloud_billing_v1_billing_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_qdrant_cloud_billing_v1_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_qdrant_cloud_billing_v1_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_qdrant_cloud_billing_v1_billing_proto_goTypes = []any{ (BillingFrequency)(0), // 0: qdrant.cloud.billing.v1.BillingFrequency (InvoiceStatus)(0), // 1: qdrant.cloud.billing.v1.InvoiceStatus @@ -1154,32 +1354,40 @@ var file_qdrant_cloud_billing_v1_billing_proto_goTypes = []any{ (*ListCreditContractConsumptionsResponse)(nil), // 13: qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse (*CreditContractConsumption)(nil), // 14: qdrant.cloud.billing.v1.CreditContractConsumption (*CreditContract)(nil), // 15: qdrant.cloud.billing.v1.CreditContract - (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (*GetBillingAccountParentRequest)(nil), // 16: qdrant.cloud.billing.v1.GetBillingAccountParentRequest + (*GetBillingAccountParentResponse)(nil), // 17: qdrant.cloud.billing.v1.GetBillingAccountParentResponse + (*ListBillingAccountChildrenRequest)(nil), // 18: qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest + (*ListBillingAccountChildrenResponse)(nil), // 19: qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp } var file_qdrant_cloud_billing_v1_billing_proto_depIdxs = []int32{ 6, // 0: qdrant.cloud.billing.v1.ListInvoicesResponse.items:type_name -> qdrant.cloud.billing.v1.Invoice 7, // 1: qdrant.cloud.billing.v1.ListDiscountsResponse.items:type_name -> qdrant.cloud.billing.v1.Discount - 16, // 2: qdrant.cloud.billing.v1.Invoice.created_at:type_name -> google.protobuf.Timestamp + 20, // 2: qdrant.cloud.billing.v1.Invoice.created_at:type_name -> google.protobuf.Timestamp 1, // 3: qdrant.cloud.billing.v1.Invoice.status:type_name -> qdrant.cloud.billing.v1.InvoiceStatus 8, // 4: qdrant.cloud.billing.v1.Discount.percentage:type_name -> qdrant.cloud.billing.v1.DiscountPercentage 9, // 5: qdrant.cloud.billing.v1.Discount.fixed:type_name -> qdrant.cloud.billing.v1.DiscountFixed - 16, // 6: qdrant.cloud.billing.v1.Discount.valid_from:type_name -> google.protobuf.Timestamp - 16, // 7: qdrant.cloud.billing.v1.Discount.valid_until:type_name -> google.protobuf.Timestamp + 20, // 6: qdrant.cloud.billing.v1.Discount.valid_from:type_name -> google.protobuf.Timestamp + 20, // 7: qdrant.cloud.billing.v1.Discount.valid_until:type_name -> google.protobuf.Timestamp 15, // 8: qdrant.cloud.billing.v1.ListCreditContractsResponse.items:type_name -> qdrant.cloud.billing.v1.CreditContract 14, // 9: qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse.items:type_name -> qdrant.cloud.billing.v1.CreditContractConsumption 0, // 10: qdrant.cloud.billing.v1.CreditContract.billing_frequency:type_name -> qdrant.cloud.billing.v1.BillingFrequency - 16, // 11: qdrant.cloud.billing.v1.CreditContract.active_from:type_name -> google.protobuf.Timestamp - 16, // 12: qdrant.cloud.billing.v1.CreditContract.active_to:type_name -> google.protobuf.Timestamp + 20, // 11: qdrant.cloud.billing.v1.CreditContract.active_from:type_name -> google.protobuf.Timestamp + 20, // 12: qdrant.cloud.billing.v1.CreditContract.active_to:type_name -> google.protobuf.Timestamp 2, // 13: qdrant.cloud.billing.v1.BillingService.ListInvoices:input_type -> qdrant.cloud.billing.v1.ListInvoicesRequest 4, // 14: qdrant.cloud.billing.v1.BillingService.ListDiscounts:input_type -> qdrant.cloud.billing.v1.ListDiscountsRequest 10, // 15: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:input_type -> qdrant.cloud.billing.v1.ListCreditContractsRequest 12, // 16: qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions:input_type -> qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest - 3, // 17: qdrant.cloud.billing.v1.BillingService.ListInvoices:output_type -> qdrant.cloud.billing.v1.ListInvoicesResponse - 5, // 18: qdrant.cloud.billing.v1.BillingService.ListDiscounts:output_type -> qdrant.cloud.billing.v1.ListDiscountsResponse - 11, // 19: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:output_type -> qdrant.cloud.billing.v1.ListCreditContractsResponse - 13, // 20: qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions:output_type -> qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse - 17, // [17:21] is the sub-list for method output_type - 13, // [13:17] is the sub-list for method input_type + 16, // 17: qdrant.cloud.billing.v1.BillingService.GetBillingAccountParent:input_type -> qdrant.cloud.billing.v1.GetBillingAccountParentRequest + 18, // 18: qdrant.cloud.billing.v1.BillingService.ListBillingAccountChildren:input_type -> qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest + 3, // 19: qdrant.cloud.billing.v1.BillingService.ListInvoices:output_type -> qdrant.cloud.billing.v1.ListInvoicesResponse + 5, // 20: qdrant.cloud.billing.v1.BillingService.ListDiscounts:output_type -> qdrant.cloud.billing.v1.ListDiscountsResponse + 11, // 21: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:output_type -> qdrant.cloud.billing.v1.ListCreditContractsResponse + 13, // 22: qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions:output_type -> qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse + 17, // 23: qdrant.cloud.billing.v1.BillingService.GetBillingAccountParent:output_type -> qdrant.cloud.billing.v1.GetBillingAccountParentResponse + 19, // 24: qdrant.cloud.billing.v1.BillingService.ListBillingAccountChildren:output_type -> qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse + 19, // [19:25] is the sub-list for method output_type + 13, // [13:19] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name 13, // [13:13] is the sub-list for extension extendee 0, // [0:13] is the sub-list for field type_name @@ -1202,7 +1410,7 @@ func file_qdrant_cloud_billing_v1_billing_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_qdrant_cloud_billing_v1_billing_proto_rawDesc), len(file_qdrant_cloud_billing_v1_billing_proto_rawDesc)), NumEnums: 2, - NumMessages: 14, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go b/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go index 4b922585..45b7d9c3 100644 --- a/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go +++ b/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go @@ -23,6 +23,8 @@ const ( BillingService_ListDiscounts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListDiscounts" BillingService_ListCreditContracts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListCreditContracts" BillingService_ListCreditContractConsumptions_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListCreditContractConsumptions" + BillingService_GetBillingAccountParent_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/GetBillingAccountParent" + BillingService_ListBillingAccountChildren_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListBillingAccountChildren" ) // BillingServiceClient is the client API for BillingService service. @@ -44,10 +46,19 @@ type BillingServiceClient interface { // - read:payment_information ListCreditContracts(ctx context.Context, in *ListCreditContractsRequest, opts ...grpc.CallOption) (*ListCreditContractsResponse, error) // Lists consumption data for all credit contracts for the account identified by the given ID. - // Consumption data includes the total, used, and remaining amounts sourced from Orb. // Required permissions: // - read:payment_information ListCreditContractConsumptions(ctx context.Context, in *ListCreditContractConsumptionsRequest, opts ...grpc.CallOption) (*ListCreditContractConsumptionsResponse, error) + // Returns the parent billing account for the account identified by the given ID. + // Returns NOT_FOUND if the account has no parent. + // Required permissions: + // - read:payment_information + GetBillingAccountParent(ctx context.Context, in *GetBillingAccountParentRequest, opts ...grpc.CallOption) (*GetBillingAccountParentResponse, error) + // Lists all child accounts for the billing parent account identified by the given ID. + // Returns an empty list if the account has no children. + // Required permissions: + // - read:payment_information + ListBillingAccountChildren(ctx context.Context, in *ListBillingAccountChildrenRequest, opts ...grpc.CallOption) (*ListBillingAccountChildrenResponse, error) } type billingServiceClient struct { @@ -98,6 +109,26 @@ func (c *billingServiceClient) ListCreditContractConsumptions(ctx context.Contex return out, nil } +func (c *billingServiceClient) GetBillingAccountParent(ctx context.Context, in *GetBillingAccountParentRequest, opts ...grpc.CallOption) (*GetBillingAccountParentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBillingAccountParentResponse) + err := c.cc.Invoke(ctx, BillingService_GetBillingAccountParent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *billingServiceClient) ListBillingAccountChildren(ctx context.Context, in *ListBillingAccountChildrenRequest, opts ...grpc.CallOption) (*ListBillingAccountChildrenResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListBillingAccountChildrenResponse) + err := c.cc.Invoke(ctx, BillingService_ListBillingAccountChildren_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // BillingServiceServer is the server API for BillingService service. // All implementations must embed UnimplementedBillingServiceServer // for forward compatibility. @@ -117,10 +148,19 @@ type BillingServiceServer interface { // - read:payment_information ListCreditContracts(context.Context, *ListCreditContractsRequest) (*ListCreditContractsResponse, error) // Lists consumption data for all credit contracts for the account identified by the given ID. - // Consumption data includes the total, used, and remaining amounts sourced from Orb. // Required permissions: // - read:payment_information ListCreditContractConsumptions(context.Context, *ListCreditContractConsumptionsRequest) (*ListCreditContractConsumptionsResponse, error) + // Returns the parent billing account for the account identified by the given ID. + // Returns NOT_FOUND if the account has no parent. + // Required permissions: + // - read:payment_information + GetBillingAccountParent(context.Context, *GetBillingAccountParentRequest) (*GetBillingAccountParentResponse, error) + // Lists all child accounts for the billing parent account identified by the given ID. + // Returns an empty list if the account has no children. + // Required permissions: + // - read:payment_information + ListBillingAccountChildren(context.Context, *ListBillingAccountChildrenRequest) (*ListBillingAccountChildrenResponse, error) mustEmbedUnimplementedBillingServiceServer() } @@ -143,6 +183,12 @@ func (UnimplementedBillingServiceServer) ListCreditContracts(context.Context, *L func (UnimplementedBillingServiceServer) ListCreditContractConsumptions(context.Context, *ListCreditContractConsumptionsRequest) (*ListCreditContractConsumptionsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListCreditContractConsumptions not implemented") } +func (UnimplementedBillingServiceServer) GetBillingAccountParent(context.Context, *GetBillingAccountParentRequest) (*GetBillingAccountParentResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBillingAccountParent not implemented") +} +func (UnimplementedBillingServiceServer) ListBillingAccountChildren(context.Context, *ListBillingAccountChildrenRequest) (*ListBillingAccountChildrenResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBillingAccountChildren not implemented") +} func (UnimplementedBillingServiceServer) mustEmbedUnimplementedBillingServiceServer() {} func (UnimplementedBillingServiceServer) testEmbeddedByValue() {} @@ -236,6 +282,42 @@ func _BillingService_ListCreditContractConsumptions_Handler(srv interface{}, ctx return interceptor(ctx, in, info, handler) } +func _BillingService_GetBillingAccountParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBillingAccountParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BillingServiceServer).GetBillingAccountParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BillingService_GetBillingAccountParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BillingServiceServer).GetBillingAccountParent(ctx, req.(*GetBillingAccountParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BillingService_ListBillingAccountChildren_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBillingAccountChildrenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BillingServiceServer).ListBillingAccountChildren(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BillingService_ListBillingAccountChildren_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BillingServiceServer).ListBillingAccountChildren(ctx, req.(*ListBillingAccountChildrenRequest)) + } + return interceptor(ctx, in, info, handler) +} + // BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -259,6 +341,14 @@ var BillingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListCreditContractConsumptions", Handler: _BillingService_ListCreditContractConsumptions_Handler, }, + { + MethodName: "GetBillingAccountParent", + Handler: _BillingService_GetBillingAccountParent_Handler, + }, + { + MethodName: "ListBillingAccountChildren", + Handler: _BillingService_ListBillingAccountChildren_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "qdrant/cloud/billing/v1/billing.proto", diff --git a/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json b/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json index 5f328fcf..ca0b8783 100644 --- a/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json +++ b/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json @@ -16,9 +16,41 @@ "application/json" ], "paths": { + "/api/billing/v1/accounts/{accountId}/children": { + "get": { + "summary": "Lists all child accounts for the billing parent account identified by the given ID.\nReturns an empty list if the account has no children.\nRequired permissions:\n- read:payment_information", + "operationId": "BillingService_ListBillingAccountChildren", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListBillingAccountChildrenResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "accountId", + "description": "The identifier of the account (in GUID format).\nThis is a required field.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BillingService" + ] + } + }, "/api/billing/v1/accounts/{accountId}/credit-contract-consumptions": { "get": { - "summary": "Lists consumption data for all credit contracts for the account identified by the given ID.\nConsumption data includes the total, used, and remaining amounts sourced from Orb.\nRequired permissions:\n- read:payment_information", + "summary": "Lists consumption data for all credit contracts for the account identified by the given ID.\nRequired permissions:\n- read:payment_information", "operationId": "BillingService_ListCreditContractConsumptions", "responses": { "200": { @@ -143,6 +175,38 @@ "BillingService" ] } + }, + "/api/billing/v1/accounts/{accountId}/parent": { + "get": { + "summary": "Returns the parent billing account for the account identified by the given ID.\nReturns NOT_FOUND if the account has no parent.\nRequired permissions:\n- read:payment_information", + "operationId": "BillingService_GetBillingAccountParent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetBillingAccountParentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "accountId", + "description": "The identifier of the account (in GUID format).\nThis is a required field.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BillingService" + ] + } } }, "definitions": { @@ -310,6 +374,16 @@ }, "description": "DiscountPercentage represents a percentage-based discount." }, + "v1GetBillingAccountParentResponse": { + "type": "object", + "properties": { + "parentAccountId": { + "type": "string", + "description": "The identifier of the parent billing account." + } + }, + "description": "GetBillingAccountParentResponse contains the parent account for the requested account." + }, "v1Invoice": { "type": "object", "properties": { @@ -355,6 +429,19 @@ "default": "INVOICE_STATUS_UNSPECIFIED", "description": "The possible status of an invoice.\n\n - INVOICE_STATUS_UNSPECIFIED: Unspecified\n - INVOICE_STATUS_DRAFT: Draft\n - INVOICE_STATUS_OPEN: Open\n - INVOICE_STATUS_VOID: Void\n - INVOICE_STATUS_PAID: Paid\n - INVOICE_STATUS_UNCOLLECTIBLE: Uncollectible" }, + "v1ListBillingAccountChildrenResponse": { + "type": "object", + "properties": { + "childAccountIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The identifiers of the child billing accounts." + } + }, + "description": "ListBillingAccountChildrenResponse contains the child accounts for the requested account." + }, "v1ListCreditContractConsumptionsResponse": { "type": "object", "properties": { diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2.py b/gen/python/qdrant/cloud/billing/v1/billing_pb2.py index eb75dd37..1f69bb95 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2.py +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2.py @@ -28,7 +28,7 @@ from qdrant.cloud.common.v1 import common_pb2 as qdrant_dot_cloud_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%qdrant/cloud/billing/v1/billing.proto\x12\x17qdrant.cloud.billing.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#qdrant/cloud/common/v1/common.proto\">\n\x13ListInvoicesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"N\n\x14ListInvoicesResponse\x12\x36\n\x05items\x18\x01 \x03(\x0b\x32 .qdrant.cloud.billing.v1.InvoiceR\x05items\"?\n\x14ListDiscountsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"P\n\x15ListDiscountsResponse\x12\x37\n\x05items\x18\x01 \x03(\x0b\x32!.qdrant.cloud.billing.v1.DiscountR\x05items\"\xc2\x02\n\x07Invoice\x12\x17\n\x02id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x02id\x12$\n\x06number\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x06number\x88\x01\x01\x12*\n\x0ctotal_amount\x18\x03 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x00R\x0btotalAmount\x12\x41\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tcreatedAt\x12J\n\x06status\x18\x05 \x01(\x0e\x32&.qdrant.cloud.billing.v1.InvoiceStatusB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x06status\x12&\n\x07pdf_url\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x88\x01\x01H\x01R\x06pdfUrl\x88\x01\x01\x42\t\n\x07_numberB\n\n\x08_pdf_url\"\xba\x03\n\x08\x44iscount\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04name\x12M\n\npercentage\x18\x02 \x01(\x0b\x32+.qdrant.cloud.billing.v1.DiscountPercentageH\x00R\npercentage\x12>\n\x05\x66ixed\x18\x03 \x01(\x0b\x32&.qdrant.cloud.billing.v1.DiscountFixedH\x00R\x05\x66ixed\x12\x41\n\nvalid_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tvalidFrom\x12H\n\x0bvalid_until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\xbaH\x08\xb2\x01\x02@\x00\xc8\x01\x01R\nvalidUntil:f\xbaHc\x1a\x61\n\x15\x64iscount.valid_period\x12$valid_until must be after valid_from\x1a\"this.valid_until > this.valid_fromB\r\n\x04type\x12\x05\xbaH\x02\x08\x01\"C\n\x12\x44iscountPercentage\x12-\n\x05value\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00Y@)\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\"d\n\rDiscountFixed\x12$\n\x05value\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\x12-\n\x08\x63urrency\x18\x02 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"E\n\x1aListCreditContractsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n\x1bListCreditContractsResponse\x12=\n\x05items\x18\x01 \x03(\x0b\x32\'.qdrant.cloud.billing.v1.CreditContractR\x05items\"P\n%ListCreditContractConsumptionsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"r\n&ListCreditContractConsumptionsResponse\x12H\n\x05items\x18\x01 \x03(\x0b\x32\x32.qdrant.cloud.billing.v1.CreditContractConsumptionR\x05items\"\xa1\x02\n\x19\x43reditContractConsumption\x12\x36\n\x12\x63redit_contract_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x10\x63reditContractId\x12\x31\n\x0ctotal_amount\x18\x02 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12/\n\x0bused_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\nusedAmount\x12\x39\n\x10remaining_amount\x18\x04 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\x0fremainingAmount\x12-\n\x08\x63urrency\x18\x05 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"\xcd\x03\n\x0e\x43reditContract\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x31\n\x0ctotal_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12-\n\x08\x63urrency\x18\x04 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\x12\x62\n\x11\x62illing_frequency\x18\x05 \x01(\x0e\x32).qdrant.cloud.billing.v1.BillingFrequencyB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x10\x62illingFrequency\x12\x43\n\x0b\x61\x63tive_from\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\nactiveFrom\x12?\n\tactive_to\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x08\x61\x63tiveTo\x12\"\n\x05notes\x18\x08 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x05notes\x88\x01\x01\x42\x08\n\x06_notes*\xb6\x01\n\x10\x42illingFrequency\x12!\n\x1d\x42ILLING_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x42ILLING_FREQUENCY_MONTHLY\x10\x01\x12\x1f\n\x1b\x42ILLING_FREQUENCY_QUARTERLY\x10\x02\x12!\n\x1d\x42ILLING_FREQUENCY_SEMI_ANNUAL\x10\x03\x12\x1c\n\x18\x42ILLING_FREQUENCY_ANNUAL\x10\x04*\xb6\x01\n\rInvoiceStatus\x12\x1e\n\x1aINVOICE_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14INVOICE_STATUS_DRAFT\x10\x01\x12\x17\n\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n\x13INVOICE_STATUS_PAID\x10\x04\x12 \n\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x05\x32\x8b\x07\n\x0e\x42illingService\x12\xbf\x01\n\x0cListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x30\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x31\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n\x13ListCreditContracts\x12\x33.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a\x34.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x38\x12\x36/api/billing/v1/accounts/{account_id}/credit-contracts\x12\x89\x02\n\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x44\x12\x42/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x1a\x06\xc2\xb5\x18\x02\x08\x01\x42\xfe\x01\n\x1b\x63om.qdrant.cloud.billing.v1B\x0c\x42illingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%qdrant/cloud/billing/v1/billing.proto\x12\x17qdrant.cloud.billing.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#qdrant/cloud/common/v1/common.proto\">\n\x13ListInvoicesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"N\n\x14ListInvoicesResponse\x12\x36\n\x05items\x18\x01 \x03(\x0b\x32 .qdrant.cloud.billing.v1.InvoiceR\x05items\"?\n\x14ListDiscountsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"P\n\x15ListDiscountsResponse\x12\x37\n\x05items\x18\x01 \x03(\x0b\x32!.qdrant.cloud.billing.v1.DiscountR\x05items\"\xc2\x02\n\x07Invoice\x12\x17\n\x02id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x02id\x12$\n\x06number\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x06number\x88\x01\x01\x12*\n\x0ctotal_amount\x18\x03 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x00R\x0btotalAmount\x12\x41\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tcreatedAt\x12J\n\x06status\x18\x05 \x01(\x0e\x32&.qdrant.cloud.billing.v1.InvoiceStatusB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x06status\x12&\n\x07pdf_url\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x88\x01\x01H\x01R\x06pdfUrl\x88\x01\x01\x42\t\n\x07_numberB\n\n\x08_pdf_url\"\xba\x03\n\x08\x44iscount\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04name\x12M\n\npercentage\x18\x02 \x01(\x0b\x32+.qdrant.cloud.billing.v1.DiscountPercentageH\x00R\npercentage\x12>\n\x05\x66ixed\x18\x03 \x01(\x0b\x32&.qdrant.cloud.billing.v1.DiscountFixedH\x00R\x05\x66ixed\x12\x41\n\nvalid_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tvalidFrom\x12H\n\x0bvalid_until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\xbaH\x08\xb2\x01\x02@\x00\xc8\x01\x01R\nvalidUntil:f\xbaHc\x1a\x61\n\x15\x64iscount.valid_period\x12$valid_until must be after valid_from\x1a\"this.valid_until > this.valid_fromB\r\n\x04type\x12\x05\xbaH\x02\x08\x01\"C\n\x12\x44iscountPercentage\x12-\n\x05value\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00Y@)\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\"d\n\rDiscountFixed\x12$\n\x05value\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\x12-\n\x08\x63urrency\x18\x02 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"E\n\x1aListCreditContractsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n\x1bListCreditContractsResponse\x12=\n\x05items\x18\x01 \x03(\x0b\x32\'.qdrant.cloud.billing.v1.CreditContractR\x05items\"P\n%ListCreditContractConsumptionsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"r\n&ListCreditContractConsumptionsResponse\x12H\n\x05items\x18\x01 \x03(\x0b\x32\x32.qdrant.cloud.billing.v1.CreditContractConsumptionR\x05items\"\xa1\x02\n\x19\x43reditContractConsumption\x12\x36\n\x12\x63redit_contract_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x10\x63reditContractId\x12\x31\n\x0ctotal_amount\x18\x02 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12/\n\x0bused_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\nusedAmount\x12\x39\n\x10remaining_amount\x18\x04 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\x0fremainingAmount\x12-\n\x08\x63urrency\x18\x05 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"\xcd\x03\n\x0e\x43reditContract\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x31\n\x0ctotal_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12-\n\x08\x63urrency\x18\x04 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\x12\x62\n\x11\x62illing_frequency\x18\x05 \x01(\x0e\x32).qdrant.cloud.billing.v1.BillingFrequencyB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x10\x62illingFrequency\x12\x43\n\x0b\x61\x63tive_from\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\nactiveFrom\x12?\n\tactive_to\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x08\x61\x63tiveTo\x12\"\n\x05notes\x18\x08 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x05notes\x88\x01\x01\x42\x08\n\x06_notes\"I\n\x1eGetBillingAccountParentRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"W\n\x1fGetBillingAccountParentResponse\x12\x34\n\x11parent_account_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x0fparentAccountId\"L\n!ListBillingAccountChildrenRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"_\n\"ListBillingAccountChildrenResponse\x12\x39\n\x11\x63hild_account_ids\x18\x01 \x03(\tB\r\xbaH\n\x92\x01\x07\"\x05r\x03\xb0\x01\x01R\x0f\x63hildAccountIds*\xb6\x01\n\x10\x42illingFrequency\x12!\n\x1d\x42ILLING_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x42ILLING_FREQUENCY_MONTHLY\x10\x01\x12\x1f\n\x1b\x42ILLING_FREQUENCY_QUARTERLY\x10\x02\x12!\n\x1d\x42ILLING_FREQUENCY_SEMI_ANNUAL\x10\x03\x12\x1c\n\x18\x42ILLING_FREQUENCY_ANNUAL\x10\x04*\xb6\x01\n\rInvoiceStatus\x12\x1e\n\x1aINVOICE_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14INVOICE_STATUS_DRAFT\x10\x01\x12\x17\n\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n\x13INVOICE_STATUS_PAID\x10\x04\x12 \n\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x05\x32\xd8\n\n\x0e\x42illingService\x12\xbf\x01\n\x0cListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x30\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x31\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n\x13ListCreditContracts\x12\x33.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a\x34.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x38\x12\x36/api/billing/v1/accounts/{account_id}/credit-contracts\x12\x89\x02\n\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x44\x12\x42/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x12\xde\x01\n\x17GetBillingAccountParent\x12\x37.qdrant.cloud.billing.v1.GetBillingAccountParentRequest\x1a\x38.qdrant.cloud.billing.v1.GetBillingAccountParentResponse\"P\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02.\x12,/api/billing/v1/accounts/{account_id}/parent\x12\xe9\x01\n\x1aListBillingAccountChildren\x12:.qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest\x1a;.qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x30\x12./api/billing/v1/accounts/{account_id}/children\x1a\x06\xc2\xb5\x18\x02\x08\x01\x42\xfe\x01\n\x1b\x63om.qdrant.cloud.billing.v1B\x0c\x42illingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -98,6 +98,14 @@ _globals['_CREDITCONTRACT'].fields_by_name['active_to']._serialized_options = b'\272H\003\310\001\001' _globals['_CREDITCONTRACT'].fields_by_name['notes']._loaded_options = None _globals['_CREDITCONTRACT'].fields_by_name['notes']._serialized_options = b'\272H\004r\002\020\001' + _globals['_GETBILLINGACCOUNTPARENTREQUEST'].fields_by_name['account_id']._loaded_options = None + _globals['_GETBILLINGACCOUNTPARENTREQUEST'].fields_by_name['account_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_GETBILLINGACCOUNTPARENTRESPONSE'].fields_by_name['parent_account_id']._loaded_options = None + _globals['_GETBILLINGACCOUNTPARENTRESPONSE'].fields_by_name['parent_account_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_LISTBILLINGACCOUNTCHILDRENREQUEST'].fields_by_name['account_id']._loaded_options = None + _globals['_LISTBILLINGACCOUNTCHILDRENREQUEST'].fields_by_name['account_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_LISTBILLINGACCOUNTCHILDRENRESPONSE'].fields_by_name['child_account_ids']._loaded_options = None + _globals['_LISTBILLINGACCOUNTCHILDRENRESPONSE'].fields_by_name['child_account_ids']._serialized_options = b'\272H\n\222\001\007\"\005r\003\260\001\001' _globals['_BILLINGSERVICE']._loaded_options = None _globals['_BILLINGSERVICE']._serialized_options = b'\302\265\030\002\010\001' _globals['_BILLINGSERVICE'].methods_by_name['ListInvoices']._loaded_options = None @@ -108,10 +116,14 @@ _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContracts']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\0028\0226/api/billing/v1/accounts/{account_id}/credit-contracts' _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContractConsumptions']._loaded_options = None _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContractConsumptions']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\002D\022B/api/billing/v1/accounts/{account_id}/credit-contract-consumptions' - _globals['_BILLINGFREQUENCY']._serialized_start=2547 - _globals['_BILLINGFREQUENCY']._serialized_end=2729 - _globals['_INVOICESTATUS']._serialized_start=2732 - _globals['_INVOICESTATUS']._serialized_end=2914 + _globals['_BILLINGSERVICE'].methods_by_name['GetBillingAccountParent']._loaded_options = None + _globals['_BILLINGSERVICE'].methods_by_name['GetBillingAccountParent']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\002.\022,/api/billing/v1/accounts/{account_id}/parent' + _globals['_BILLINGSERVICE'].methods_by_name['ListBillingAccountChildren']._loaded_options = None + _globals['_BILLINGSERVICE'].methods_by_name['ListBillingAccountChildren']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\0020\022./api/billing/v1/accounts/{account_id}/children' + _globals['_BILLINGFREQUENCY']._serialized_start=2886 + _globals['_BILLINGFREQUENCY']._serialized_end=3068 + _globals['_INVOICESTATUS']._serialized_start=3071 + _globals['_INVOICESTATUS']._serialized_end=3253 _globals['_LISTINVOICESREQUEST']._serialized_start=195 _globals['_LISTINVOICESREQUEST']._serialized_end=257 _globals['_LISTINVOICESRESPONSE']._serialized_start=259 @@ -140,6 +152,14 @@ _globals['_CREDITCONTRACTCONSUMPTION']._serialized_end=2080 _globals['_CREDITCONTRACT']._serialized_start=2083 _globals['_CREDITCONTRACT']._serialized_end=2544 - _globals['_BILLINGSERVICE']._serialized_start=2917 - _globals['_BILLINGSERVICE']._serialized_end=3824 + _globals['_GETBILLINGACCOUNTPARENTREQUEST']._serialized_start=2546 + _globals['_GETBILLINGACCOUNTPARENTREQUEST']._serialized_end=2619 + _globals['_GETBILLINGACCOUNTPARENTRESPONSE']._serialized_start=2621 + _globals['_GETBILLINGACCOUNTPARENTRESPONSE']._serialized_end=2708 + _globals['_LISTBILLINGACCOUNTCHILDRENREQUEST']._serialized_start=2710 + _globals['_LISTBILLINGACCOUNTCHILDRENREQUEST']._serialized_end=2786 + _globals['_LISTBILLINGACCOUNTCHILDRENRESPONSE']._serialized_start=2788 + _globals['_LISTBILLINGACCOUNTCHILDRENRESPONSE']._serialized_end=2883 + _globals['_BILLINGSERVICE']._serialized_start=3256 + _globals['_BILLINGSERVICE']._serialized_end=4624 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi b/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi index dade18b4..3ee2bee3 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi @@ -166,3 +166,27 @@ class CreditContract(_message.Message): active_to: _timestamp_pb2.Timestamp notes: str def __init__(self, id: _Optional[str] = ..., account_id: _Optional[str] = ..., total_amount: _Optional[float] = ..., currency: _Optional[str] = ..., billing_frequency: _Optional[_Union[BillingFrequency, str]] = ..., active_from: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., active_to: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., notes: _Optional[str] = ...) -> None: ... + +class GetBillingAccountParentRequest(_message.Message): + __slots__ = ("account_id",) + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + account_id: str + def __init__(self, account_id: _Optional[str] = ...) -> None: ... + +class GetBillingAccountParentResponse(_message.Message): + __slots__ = ("parent_account_id",) + PARENT_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + parent_account_id: str + def __init__(self, parent_account_id: _Optional[str] = ...) -> None: ... + +class ListBillingAccountChildrenRequest(_message.Message): + __slots__ = ("account_id",) + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + account_id: str + def __init__(self, account_id: _Optional[str] = ...) -> None: ... + +class ListBillingAccountChildrenResponse(_message.Message): + __slots__ = ("child_account_ids",) + CHILD_ACCOUNT_IDS_FIELD_NUMBER: _ClassVar[int] + child_account_ids: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, child_account_ids: _Optional[_Iterable[str]] = ...) -> None: ... diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py b/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py index 8a25d88a..5b084509 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py @@ -35,6 +35,16 @@ def __init__(self, channel): request_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsRequest.SerializeToString, response_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsResponse.FromString, _registered_method=True) + self.GetBillingAccountParent = channel.unary_unary( + '/qdrant.cloud.billing.v1.BillingService/GetBillingAccountParent', + request_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentRequest.SerializeToString, + response_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentResponse.FromString, + _registered_method=True) + self.ListBillingAccountChildren = channel.unary_unary( + '/qdrant.cloud.billing.v1.BillingService/ListBillingAccountChildren', + request_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenRequest.SerializeToString, + response_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenResponse.FromString, + _registered_method=True) class BillingServiceServicer(object): @@ -70,7 +80,26 @@ def ListCreditContracts(self, request, context): def ListCreditContractConsumptions(self, request, context): """Lists consumption data for all credit contracts for the account identified by the given ID. - Consumption data includes the total, used, and remaining amounts sourced from Orb. + Required permissions: + - read:payment_information + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetBillingAccountParent(self, request, context): + """Returns the parent billing account for the account identified by the given ID. + Returns NOT_FOUND if the account has no parent. + Required permissions: + - read:payment_information + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListBillingAccountChildren(self, request, context): + """Lists all child accounts for the billing parent account identified by the given ID. + Returns an empty list if the account has no children. Required permissions: - read:payment_information """ @@ -101,6 +130,16 @@ def add_BillingServiceServicer_to_server(servicer, server): request_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsRequest.FromString, response_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsResponse.SerializeToString, ), + 'GetBillingAccountParent': grpc.unary_unary_rpc_method_handler( + servicer.GetBillingAccountParent, + request_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentRequest.FromString, + response_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentResponse.SerializeToString, + ), + 'ListBillingAccountChildren': grpc.unary_unary_rpc_method_handler( + servicer.ListBillingAccountChildren, + request_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenRequest.FromString, + response_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'qdrant.cloud.billing.v1.BillingService', rpc_method_handlers) @@ -220,3 +259,57 @@ def ListCreditContractConsumptions(request, timeout, metadata, _registered_method=True) + + @staticmethod + def GetBillingAccountParent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/qdrant.cloud.billing.v1.BillingService/GetBillingAccountParent', + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentRequest.SerializeToString, + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.GetBillingAccountParentResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ListBillingAccountChildren(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/qdrant.cloud.billing.v1.BillingService/ListBillingAccountChildren', + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenRequest.SerializeToString, + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListBillingAccountChildrenResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts index 7c857c0e..84466d5c 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts +++ b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts @@ -30,10 +30,27 @@ export const listDiscounts: typeof BillingService["method"]["listDiscounts"]; export const listCreditContracts: typeof BillingService["method"]["listCreditContracts"]; /** * Lists consumption data for all credit contracts for the account identified by the given ID. - * Consumption data includes the total, used, and remaining amounts sourced from Orb. * Required permissions: * - read:payment_information * * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions */ export const listCreditContractConsumptions: typeof BillingService["method"]["listCreditContractConsumptions"]; +/** + * Returns the parent billing account for the account identified by the given ID. + * Returns NOT_FOUND if the account has no parent. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.GetBillingAccountParent + */ +export const getBillingAccountParent: typeof BillingService["method"]["getBillingAccountParent"]; +/** + * Lists all child accounts for the billing parent account identified by the given ID. + * Returns an empty list if the account has no children. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListBillingAccountChildren + */ +export const listBillingAccountChildren: typeof BillingService["method"]["listBillingAccountChildren"]; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js index 1f86e7ad..f5dc830e 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js +++ b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js @@ -33,10 +33,29 @@ export const listCreditContracts = BillingService.method.listCreditContracts; /** * Lists consumption data for all credit contracts for the account identified by the given ID. - * Consumption data includes the total, used, and remaining amounts sourced from Orb. * Required permissions: * - read:payment_information * * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions */ export const listCreditContractConsumptions = BillingService.method.listCreditContractConsumptions; + +/** + * Returns the parent billing account for the account identified by the given ID. + * Returns NOT_FOUND if the account has no parent. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.GetBillingAccountParent + */ +export const getBillingAccountParent = BillingService.method.getBillingAccountParent; + +/** + * Lists all child accounts for the billing parent account identified by the given ID. + * Returns an empty list if the account has no children. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListBillingAccountChildren + */ +export const listBillingAccountChildren = BillingService.method.listBillingAccountChildren; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts index 7da05f33..06e34b57 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts +++ b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts @@ -681,6 +681,96 @@ export declare type CreditContractValid = Message<"qdrant.cloud.billing.v1.Credi */ export declare const CreditContractSchema: GenMessage; +/** + * GetBillingAccountParentRequest is the request for the GetBillingAccountParent RPC. + * + * @generated from message qdrant.cloud.billing.v1.GetBillingAccountParentRequest + */ +export declare type GetBillingAccountParentRequest = Message<"qdrant.cloud.billing.v1.GetBillingAccountParentRequest"> & { + /** + * The identifier of the account (in GUID format). + * This is a required field. + * + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +export declare type GetBillingAccountParentRequestValid = GetBillingAccountParentRequest; + +/** + * Describes the message qdrant.cloud.billing.v1.GetBillingAccountParentRequest. + * Use `create(GetBillingAccountParentRequestSchema)` to create a new message. + */ +export declare const GetBillingAccountParentRequestSchema: GenMessage; + +/** + * GetBillingAccountParentResponse contains the parent account for the requested account. + * + * @generated from message qdrant.cloud.billing.v1.GetBillingAccountParentResponse + */ +export declare type GetBillingAccountParentResponse = Message<"qdrant.cloud.billing.v1.GetBillingAccountParentResponse"> & { + /** + * The identifier of the parent billing account. + * + * @generated from field: string parent_account_id = 1; + */ + parentAccountId: string; +}; + +export declare type GetBillingAccountParentResponseValid = GetBillingAccountParentResponse; + +/** + * Describes the message qdrant.cloud.billing.v1.GetBillingAccountParentResponse. + * Use `create(GetBillingAccountParentResponseSchema)` to create a new message. + */ +export declare const GetBillingAccountParentResponseSchema: GenMessage; + +/** + * ListBillingAccountChildrenRequest is the request for the ListBillingAccountChildren RPC. + * + * @generated from message qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest + */ +export declare type ListBillingAccountChildrenRequest = Message<"qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest"> & { + /** + * The identifier of the account (in GUID format). + * This is a required field. + * + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +export declare type ListBillingAccountChildrenRequestValid = ListBillingAccountChildrenRequest; + +/** + * Describes the message qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest. + * Use `create(ListBillingAccountChildrenRequestSchema)` to create a new message. + */ +export declare const ListBillingAccountChildrenRequestSchema: GenMessage; + +/** + * ListBillingAccountChildrenResponse contains the child accounts for the requested account. + * + * @generated from message qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse + */ +export declare type ListBillingAccountChildrenResponse = Message<"qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse"> & { + /** + * The identifiers of the child billing accounts. + * + * @generated from field: repeated string child_account_ids = 1; + */ + childAccountIds: string[]; +}; + +export declare type ListBillingAccountChildrenResponseValid = ListBillingAccountChildrenResponse; + +/** + * Describes the message qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse. + * Use `create(ListBillingAccountChildrenResponseSchema)` to create a new message. + */ +export declare const ListBillingAccountChildrenResponseSchema: GenMessage; + /** * BillingFrequency represents the invoicing cadence for a prepaid credit contract. * @@ -826,7 +916,6 @@ export declare const BillingService: GenService<{ }, /** * Lists consumption data for all credit contracts for the account identified by the given ID. - * Consumption data includes the total, used, and remaining amounts sourced from Orb. * Required permissions: * - read:payment_information * @@ -837,5 +926,31 @@ export declare const BillingService: GenService<{ input: typeof ListCreditContractConsumptionsRequestSchema; output: typeof ListCreditContractConsumptionsResponseSchema; }, + /** + * Returns the parent billing account for the account identified by the given ID. + * Returns NOT_FOUND if the account has no parent. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.GetBillingAccountParent + */ + getBillingAccountParent: { + methodKind: "unary"; + input: typeof GetBillingAccountParentRequestSchema; + output: typeof GetBillingAccountParentResponseSchema; + }, + /** + * Lists all child accounts for the billing parent account identified by the given ID. + * Returns an empty list if the account has no children. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListBillingAccountChildren + */ + listBillingAccountChildren: { + methodKind: "unary"; + input: typeof ListBillingAccountChildrenRequestSchema; + output: typeof ListBillingAccountChildrenResponseSchema; + }, }>; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js index 09434cc8..74bf7932 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js +++ b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js @@ -12,7 +12,7 @@ import { file_qdrant_cloud_common_v1_common } from "../../common/v1/common_pb.js * Describes the file qdrant/cloud/billing/v1/billing.proto. */ export const file_qdrant_cloud_billing_v1_billing = /*@__PURE__*/ - fileDesc("CiVxZHJhbnQvY2xvdWQvYmlsbGluZy92MS9iaWxsaW5nLnByb3RvEhdxZHJhbnQuY2xvdWQuYmlsbGluZy52MSIzChNMaXN0SW52b2ljZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkcKFExpc3RJbnZvaWNlc1Jlc3BvbnNlEi8KBWl0ZW1zGAEgAygLMiAucWRyYW50LmNsb3VkLmJpbGxpbmcudjEuSW52b2ljZSI0ChRMaXN0RGlzY291bnRzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJJChVMaXN0RGlzY291bnRzUmVzcG9uc2USMAoFaXRlbXMYASADKAsyIS5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5EaXNjb3VudCKOAgoHSW52b2ljZRITCgJpZBgBIAEoCUIHukgEcgIQARIcCgZudW1iZXIYAiABKAlCB7pIBHICEAFIAIgBARIdCgx0b3RhbF9hbW91bnQYAyABKANCB7pIBCICKAASNgoKY3JlYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCBrpIA8gBARJCCgZzdGF0dXMYBSABKA4yJi5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5JbnZvaWNlU3RhdHVzQgq6SAeCAQQQASAAEh4KB3BkZl91cmwYBiABKAlCCLpIBXIDiAEBSAGIAQFCCQoHX251bWJlckIKCghfcGRmX3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djEvYWNjb3VudHMve2FjY291bnRfaWR9L2NyZWRpdC1jb250cmFjdHMSiQIKHkxpc3RDcmVkaXRDb250cmFjdENvbnN1bXB0aW9ucxI+LnFkcmFudC5jbG91ZC5iaWxsaW5nLnYxLkxpc3RDcmVkaXRDb250cmFjdENvbnN1bXB0aW9uc1JlcXVlc3QaPy5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5MaXN0Q3JlZGl0Q29udHJhY3RDb25zdW1wdGlvbnNSZXNwb25zZSJmirUYGHJlYWQ6cGF5bWVudF9pbmZvcm1hdGlvboLT5JMCRBJCL2FwaS9iaWxsaW5nL3YxL2FjY291bnRzL3thY2NvdW50X2lkfS9jcmVkaXQtY29udHJhY3QtY29uc3VtcHRpb25zGgbCtRgCCAFC/gEKG2NvbS5xZHJhbnQuY2xvdWQuYmlsbGluZy52MUIMQmlsbGluZ1Byb3RvUAFaUmdpdGh1Yi5jb20vcWRyYW50L3FkcmFudC1jbG91ZC1wdWJsaWMtYXBpL2dlbi9nby9xZHJhbnQvY2xvdWQvYmlsbGluZy92MTtiaWxsaW5ndjGiAgNRQ0KqAhdRZHJhbnQuQ2xvdWQuQmlsbGluZy5WMcoCF1FkcmFudFxDbG91ZFxCaWxsaW5nXFYx4gIjUWRyYW50XENsb3VkXEJpbGxpbmdcVjFcR1BCTWV0YWRhdGHqAhpRZHJhbnQ6OkNsb3VkOjpCaWxsaW5nOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_protobuf_timestamp, file_qdrant_cloud_common_v1_common]); + fileDesc("CiVxZHJhbnQvY2xvdWQvYmlsbGluZy92MS9iaWxsaW5nLnByb3RvEhdxZHJhbnQuY2xvdWQuYmlsbGluZy52MSIzChNMaXN0SW52b2ljZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkcKFExpc3RJbnZvaWNlc1Jlc3BvbnNlEi8KBWl0ZW1zGAEgAygLMiAucWRyYW50LmNsb3VkLmJp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dWQuQmlsbGluZy5WMcoCF1FkcmFudFxDbG91ZFxCaWxsaW5nXFYx4gIjUWRyYW50XENsb3VkXEJpbGxpbmdcVjFcR1BCTWV0YWRhdGHqAhpRZHJhbnQ6OkNsb3VkOjpCaWxsaW5nOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_protobuf_timestamp, file_qdrant_cloud_common_v1_common]); /** * Describes the message qdrant.cloud.billing.v1.ListInvoicesRequest. @@ -112,6 +112,34 @@ export const CreditContractConsumptionSchema = /*@__PURE__*/ export const CreditContractSchema = /*@__PURE__*/ messageDesc(file_qdrant_cloud_billing_v1_billing, 13); +/** + * Describes the message qdrant.cloud.billing.v1.GetBillingAccountParentRequest. + * Use `create(GetBillingAccountParentRequestSchema)` to create a new message. + */ +export const GetBillingAccountParentRequestSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 14); + +/** + * Describes the message qdrant.cloud.billing.v1.GetBillingAccountParentResponse. + * Use `create(GetBillingAccountParentResponseSchema)` to create a new message. + */ +export const GetBillingAccountParentResponseSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 15); + +/** + * Describes the message qdrant.cloud.billing.v1.ListBillingAccountChildrenRequest. + * Use `create(ListBillingAccountChildrenRequestSchema)` to create a new message. + */ +export const ListBillingAccountChildrenRequestSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 16); + +/** + * Describes the message qdrant.cloud.billing.v1.ListBillingAccountChildrenResponse. + * Use `create(ListBillingAccountChildrenResponseSchema)` to create a new message. + */ +export const ListBillingAccountChildrenResponseSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 17); + /** * Describes the enum qdrant.cloud.billing.v1.BillingFrequency. */ diff --git a/proto/qdrant/cloud/billing/v1/billing.proto b/proto/qdrant/cloud/billing/v1/billing.proto index 5f31b055..46aed34d 100644 --- a/proto/qdrant/cloud/billing/v1/billing.proto +++ b/proto/qdrant/cloud/billing/v1/billing.proto @@ -43,7 +43,6 @@ service BillingService { option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/credit-contracts"}; } // Lists consumption data for all credit contracts for the account identified by the given ID. - // Consumption data includes the total, used, and remaining amounts sourced from Orb. // Required permissions: // - read:payment_information rpc ListCreditContractConsumptions(ListCreditContractConsumptionsRequest) returns (ListCreditContractConsumptionsResponse) { @@ -52,6 +51,26 @@ service BillingService { // gRPC Gateway REST call option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/credit-contract-consumptions"}; } + // Returns the parent billing account for the account identified by the given ID. + // Returns NOT_FOUND if the account has no parent. + // Required permissions: + // - read:payment_information + rpc GetBillingAccountParent(GetBillingAccountParentRequest) returns (GetBillingAccountParentResponse) { + // permissions + option (common.v1.permissions) = "read:payment_information"; + // gRPC Gateway REST call + option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/parent"}; + } + // Lists all child accounts for the billing parent account identified by the given ID. + // Returns an empty list if the account has no children. + // Required permissions: + // - read:payment_information + rpc ListBillingAccountChildren(ListBillingAccountChildrenRequest) returns (ListBillingAccountChildrenResponse) { + // permissions + option (common.v1.permissions) = "read:payment_information"; + // gRPC Gateway REST call + option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/children"}; + } } // ListInvoicesRequest is the request for the ListInvoices function @@ -229,6 +248,34 @@ enum BillingFrequency { BILLING_FREQUENCY_ANNUAL = 4; } +// GetBillingAccountParentRequest is the request for the GetBillingAccountParent RPC. +message GetBillingAccountParentRequest { + // The identifier of the account (in GUID format). + // This is a required field. + string account_id = 1 [(buf.validate.field).string = {uuid: true}]; +} + +// buf:lint:ignore QDRANT_CLOUD_REQUIRED_ENTITY_FIELDS +// GetBillingAccountParentResponse contains the parent account for the requested account. +message GetBillingAccountParentResponse { + // The identifier of the parent billing account. + string parent_account_id = 1 [(buf.validate.field).string = {uuid: true}]; +} + +// ListBillingAccountChildrenRequest is the request for the ListBillingAccountChildren RPC. +message ListBillingAccountChildrenRequest { + // The identifier of the account (in GUID format). + // This is a required field. + string account_id = 1 [(buf.validate.field).string = {uuid: true}]; +} + +// buf:lint:ignore QDRANT_CLOUD_REQUIRED_ENTITY_FIELDS +// ListBillingAccountChildrenResponse contains the child accounts for the requested account. +message ListBillingAccountChildrenResponse { + // The identifiers of the child billing accounts. + repeated string child_account_ids = 1 [(buf.validate.field).repeated.items.string = {uuid: true}]; +} + // The possible status of an invoice. enum InvoiceStatus { // Unspecified