diff --git a/components/usage-api/go/v1/usage.pb.go b/components/usage-api/go/v1/usage.pb.go index 83dc5989cee8d8..f98c4d8a730621 100644 --- a/components/usage-api/go/v1/usage.pb.go +++ b/components/usage-api/go/v1/usage.pb.go @@ -742,119 +742,6 @@ func (x *BilledSession) GetCredits() float64 { return 0 } -type ReconcileUsageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` -} - -func (x *ReconcileUsageRequest) Reset() { - *x = ReconcileUsageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_usage_v1_usage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReconcileUsageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReconcileUsageRequest) ProtoMessage() {} - -func (x *ReconcileUsageRequest) ProtoReflect() protoreflect.Message { - mi := &file_usage_v1_usage_proto_msgTypes[8] - 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 ReconcileUsageRequest.ProtoReflect.Descriptor instead. -func (*ReconcileUsageRequest) Descriptor() ([]byte, []int) { - return file_usage_v1_usage_proto_rawDescGZIP(), []int{8} -} - -func (x *ReconcileUsageRequest) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *ReconcileUsageRequest) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -type ReconcileUsageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Deprecated: Do not use. - Sessions []*BilledSession `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` - // ID of the UsageReport generated for this reconcile run. - ReportId string `protobuf:"bytes,2,opt,name=report_id,json=reportId,proto3" json:"report_id,omitempty"` -} - -func (x *ReconcileUsageResponse) Reset() { - *x = ReconcileUsageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_usage_v1_usage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReconcileUsageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReconcileUsageResponse) ProtoMessage() {} - -func (x *ReconcileUsageResponse) ProtoReflect() protoreflect.Message { - mi := &file_usage_v1_usage_proto_msgTypes[9] - 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 ReconcileUsageResponse.ProtoReflect.Descriptor instead. -func (*ReconcileUsageResponse) Descriptor() ([]byte, []int) { - return file_usage_v1_usage_proto_rawDescGZIP(), []int{9} -} - -// Deprecated: Do not use. -func (x *ReconcileUsageResponse) GetSessions() []*BilledSession { - if x != nil { - return x.Sessions - } - return nil -} - -func (x *ReconcileUsageResponse) GetReportId() string { - if x != nil { - return x.ReportId - } - return "" -} - type GetCostCenterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -866,7 +753,7 @@ type GetCostCenterRequest struct { func (x *GetCostCenterRequest) Reset() { *x = GetCostCenterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_usage_v1_usage_proto_msgTypes[10] + mi := &file_usage_v1_usage_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -879,7 +766,7 @@ func (x *GetCostCenterRequest) String() string { func (*GetCostCenterRequest) ProtoMessage() {} func (x *GetCostCenterRequest) ProtoReflect() protoreflect.Message { - mi := &file_usage_v1_usage_proto_msgTypes[10] + mi := &file_usage_v1_usage_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -892,7 +779,7 @@ func (x *GetCostCenterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCostCenterRequest.ProtoReflect.Descriptor instead. func (*GetCostCenterRequest) Descriptor() ([]byte, []int) { - return file_usage_v1_usage_proto_rawDescGZIP(), []int{10} + return file_usage_v1_usage_proto_rawDescGZIP(), []int{8} } func (x *GetCostCenterRequest) GetAttributionId() string { @@ -913,7 +800,7 @@ type GetCostCenterResponse struct { func (x *GetCostCenterResponse) Reset() { *x = GetCostCenterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_usage_v1_usage_proto_msgTypes[11] + mi := &file_usage_v1_usage_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -926,7 +813,7 @@ func (x *GetCostCenterResponse) String() string { func (*GetCostCenterResponse) ProtoMessage() {} func (x *GetCostCenterResponse) ProtoReflect() protoreflect.Message { - mi := &file_usage_v1_usage_proto_msgTypes[11] + mi := &file_usage_v1_usage_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -939,7 +826,7 @@ func (x *GetCostCenterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCostCenterResponse.ProtoReflect.Descriptor instead. func (*GetCostCenterResponse) Descriptor() ([]byte, []int) { - return file_usage_v1_usage_proto_rawDescGZIP(), []int{11} + return file_usage_v1_usage_proto_rawDescGZIP(), []int{9} } func (x *GetCostCenterResponse) GetCostCenter() *CostCenter { @@ -961,7 +848,7 @@ type CostCenter struct { func (x *CostCenter) Reset() { *x = CostCenter{} if protoimpl.UnsafeEnabled { - mi := &file_usage_v1_usage_proto_msgTypes[12] + mi := &file_usage_v1_usage_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -974,7 +861,7 @@ func (x *CostCenter) String() string { func (*CostCenter) ProtoMessage() {} func (x *CostCenter) ProtoReflect() protoreflect.Message { - mi := &file_usage_v1_usage_proto_msgTypes[12] + mi := &file_usage_v1_usage_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -987,7 +874,7 @@ func (x *CostCenter) ProtoReflect() protoreflect.Message { // Deprecated: Use CostCenter.ProtoReflect.Descriptor instead. func (*CostCenter) Descriptor() ([]byte, []int) { - return file_usage_v1_usage_proto_rawDescGZIP(), []int{12} + return file_usage_v1_usage_proto_rawDescGZIP(), []int{10} } func (x *CostCenter) GetAttributionId() string { @@ -1123,64 +1010,43 @@ var file_usage_v1_usage_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, - 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x6e, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, - 0x64, 0x22, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x4e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x6f, 0x73, - 0x74, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, - 0x22, 0x5a, 0x0a, 0x0a, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x25, - 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x32, 0xf6, 0x02, 0x0a, - 0x0c, 0x55, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, - 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x1f, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6e, - 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, - 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, - 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x18, 0x52, 0x65, 0x63, 0x6f, - 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, - 0x64, 0x67, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6e, - 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, 0x64, - 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, - 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x75, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, - 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x64, 0x69, 0x74, 0x73, 0x22, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, + 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, + 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x22, 0x5a, 0x0a, 0x0a, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x32, 0x9f, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x18, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, + 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x12, 0x29, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x75, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x09, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1196,7 +1062,7 @@ func file_usage_v1_usage_proto_rawDescGZIP() []byte { } var file_usage_v1_usage_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_usage_v1_usage_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_usage_v1_usage_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_usage_v1_usage_proto_goTypes = []interface{}{ (ListUsageRequest_Ordering)(0), // 0: usage.v1.ListUsageRequest.Ordering (Usage_Kind)(0), // 1: usage.v1.Usage.Kind @@ -1208,43 +1074,36 @@ var file_usage_v1_usage_proto_goTypes = []interface{}{ (*ListUsageResponse)(nil), // 7: usage.v1.ListUsageResponse (*Usage)(nil), // 8: usage.v1.Usage (*BilledSession)(nil), // 9: usage.v1.BilledSession - (*ReconcileUsageRequest)(nil), // 10: usage.v1.ReconcileUsageRequest - (*ReconcileUsageResponse)(nil), // 11: usage.v1.ReconcileUsageResponse - (*GetCostCenterRequest)(nil), // 12: usage.v1.GetCostCenterRequest - (*GetCostCenterResponse)(nil), // 13: usage.v1.GetCostCenterResponse - (*CostCenter)(nil), // 14: usage.v1.CostCenter - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*GetCostCenterRequest)(nil), // 10: usage.v1.GetCostCenterRequest + (*GetCostCenterResponse)(nil), // 11: usage.v1.GetCostCenterResponse + (*CostCenter)(nil), // 12: usage.v1.CostCenter + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp } var file_usage_v1_usage_proto_depIdxs = []int32{ - 15, // 0: usage.v1.ReconcileUsageWithLedgerRequest.from:type_name -> google.protobuf.Timestamp - 15, // 1: usage.v1.ReconcileUsageWithLedgerRequest.to:type_name -> google.protobuf.Timestamp - 15, // 2: usage.v1.ListUsageRequest.from:type_name -> google.protobuf.Timestamp - 15, // 3: usage.v1.ListUsageRequest.to:type_name -> google.protobuf.Timestamp + 13, // 0: usage.v1.ReconcileUsageWithLedgerRequest.from:type_name -> google.protobuf.Timestamp + 13, // 1: usage.v1.ReconcileUsageWithLedgerRequest.to:type_name -> google.protobuf.Timestamp + 13, // 2: usage.v1.ListUsageRequest.from:type_name -> google.protobuf.Timestamp + 13, // 3: usage.v1.ListUsageRequest.to:type_name -> google.protobuf.Timestamp 0, // 4: usage.v1.ListUsageRequest.order:type_name -> usage.v1.ListUsageRequest.Ordering 4, // 5: usage.v1.ListUsageRequest.pagination:type_name -> usage.v1.PaginatedRequest 8, // 6: usage.v1.ListUsageResponse.usage_entries:type_name -> usage.v1.Usage 5, // 7: usage.v1.ListUsageResponse.pagination:type_name -> usage.v1.PaginatedResponse - 15, // 8: usage.v1.Usage.effective_time:type_name -> google.protobuf.Timestamp + 13, // 8: usage.v1.Usage.effective_time:type_name -> google.protobuf.Timestamp 1, // 9: usage.v1.Usage.kind:type_name -> usage.v1.Usage.Kind - 15, // 10: usage.v1.BilledSession.start_time:type_name -> google.protobuf.Timestamp - 15, // 11: usage.v1.BilledSession.end_time:type_name -> google.protobuf.Timestamp - 15, // 12: usage.v1.ReconcileUsageRequest.start_time:type_name -> google.protobuf.Timestamp - 15, // 13: usage.v1.ReconcileUsageRequest.end_time:type_name -> google.protobuf.Timestamp - 9, // 14: usage.v1.ReconcileUsageResponse.sessions:type_name -> usage.v1.BilledSession - 14, // 15: usage.v1.GetCostCenterResponse.cost_center:type_name -> usage.v1.CostCenter - 10, // 16: usage.v1.UsageService.ReconcileUsage:input_type -> usage.v1.ReconcileUsageRequest - 12, // 17: usage.v1.UsageService.GetCostCenter:input_type -> usage.v1.GetCostCenterRequest - 2, // 18: usage.v1.UsageService.ReconcileUsageWithLedger:input_type -> usage.v1.ReconcileUsageWithLedgerRequest - 6, // 19: usage.v1.UsageService.ListUsage:input_type -> usage.v1.ListUsageRequest - 11, // 20: usage.v1.UsageService.ReconcileUsage:output_type -> usage.v1.ReconcileUsageResponse - 13, // 21: usage.v1.UsageService.GetCostCenter:output_type -> usage.v1.GetCostCenterResponse - 3, // 22: usage.v1.UsageService.ReconcileUsageWithLedger:output_type -> usage.v1.ReconcileUsageWithLedgerResponse - 7, // 23: usage.v1.UsageService.ListUsage:output_type -> usage.v1.ListUsageResponse - 20, // [20:24] is the sub-list for method output_type - 16, // [16:20] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 13, // 10: usage.v1.BilledSession.start_time:type_name -> google.protobuf.Timestamp + 13, // 11: usage.v1.BilledSession.end_time:type_name -> google.protobuf.Timestamp + 12, // 12: usage.v1.GetCostCenterResponse.cost_center:type_name -> usage.v1.CostCenter + 10, // 13: usage.v1.UsageService.GetCostCenter:input_type -> usage.v1.GetCostCenterRequest + 2, // 14: usage.v1.UsageService.ReconcileUsageWithLedger:input_type -> usage.v1.ReconcileUsageWithLedgerRequest + 6, // 15: usage.v1.UsageService.ListUsage:input_type -> usage.v1.ListUsageRequest + 11, // 16: usage.v1.UsageService.GetCostCenter:output_type -> usage.v1.GetCostCenterResponse + 3, // 17: usage.v1.UsageService.ReconcileUsageWithLedger:output_type -> usage.v1.ReconcileUsageWithLedgerResponse + 7, // 18: usage.v1.UsageService.ListUsage:output_type -> usage.v1.ListUsageResponse + 16, // [16:19] is the sub-list for method output_type + 13, // [13:16] 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 } func init() { file_usage_v1_usage_proto_init() } @@ -1350,30 +1209,6 @@ func file_usage_v1_usage_proto_init() { } } file_usage_v1_usage_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReconcileUsageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_usage_v1_usage_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReconcileUsageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_usage_v1_usage_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCostCenterRequest); i { case 0: return &v.state @@ -1385,7 +1220,7 @@ func file_usage_v1_usage_proto_init() { return nil } } - file_usage_v1_usage_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_usage_v1_usage_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCostCenterResponse); i { case 0: return &v.state @@ -1397,7 +1232,7 @@ func file_usage_v1_usage_proto_init() { return nil } } - file_usage_v1_usage_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_usage_v1_usage_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CostCenter); i { case 0: return &v.state @@ -1416,7 +1251,7 @@ func file_usage_v1_usage_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_usage_v1_usage_proto_rawDesc, NumEnums: 2, - NumMessages: 13, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usage-api/go/v1/usage_grpc.pb.go b/components/usage-api/go/v1/usage_grpc.pb.go index 035d2616ce15da..a678b468fe4231 100644 --- a/components/usage-api/go/v1/usage_grpc.pb.go +++ b/components/usage-api/go/v1/usage_grpc.pb.go @@ -26,8 +26,6 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type UsageServiceClient interface { - // ReconcileUsage collects usage for the specified time period, and stores the usage records in the database, returning the records. - ReconcileUsage(ctx context.Context, in *ReconcileUsageRequest, opts ...grpc.CallOption) (*ReconcileUsageResponse, error) // GetCostCenter retrieves the spending limit with its associated attributionID GetCostCenter(ctx context.Context, in *GetCostCenterRequest, opts ...grpc.CallOption) (*GetCostCenterResponse, error) // Triggers reconciliation of usage with ledger implementation. @@ -44,15 +42,6 @@ func NewUsageServiceClient(cc grpc.ClientConnInterface) UsageServiceClient { return &usageServiceClient{cc} } -func (c *usageServiceClient) ReconcileUsage(ctx context.Context, in *ReconcileUsageRequest, opts ...grpc.CallOption) (*ReconcileUsageResponse, error) { - out := new(ReconcileUsageResponse) - err := c.cc.Invoke(ctx, "/usage.v1.UsageService/ReconcileUsage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *usageServiceClient) GetCostCenter(ctx context.Context, in *GetCostCenterRequest, opts ...grpc.CallOption) (*GetCostCenterResponse, error) { out := new(GetCostCenterResponse) err := c.cc.Invoke(ctx, "/usage.v1.UsageService/GetCostCenter", in, out, opts...) @@ -84,8 +73,6 @@ func (c *usageServiceClient) ListUsage(ctx context.Context, in *ListUsageRequest // All implementations must embed UnimplementedUsageServiceServer // for forward compatibility type UsageServiceServer interface { - // ReconcileUsage collects usage for the specified time period, and stores the usage records in the database, returning the records. - ReconcileUsage(context.Context, *ReconcileUsageRequest) (*ReconcileUsageResponse, error) // GetCostCenter retrieves the spending limit with its associated attributionID GetCostCenter(context.Context, *GetCostCenterRequest) (*GetCostCenterResponse, error) // Triggers reconciliation of usage with ledger implementation. @@ -99,9 +86,6 @@ type UsageServiceServer interface { type UnimplementedUsageServiceServer struct { } -func (UnimplementedUsageServiceServer) ReconcileUsage(context.Context, *ReconcileUsageRequest) (*ReconcileUsageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReconcileUsage not implemented") -} func (UnimplementedUsageServiceServer) GetCostCenter(context.Context, *GetCostCenterRequest) (*GetCostCenterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCostCenter not implemented") } @@ -124,24 +108,6 @@ func RegisterUsageServiceServer(s grpc.ServiceRegistrar, srv UsageServiceServer) s.RegisterService(&UsageService_ServiceDesc, srv) } -func _UsageService_ReconcileUsage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReconcileUsageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UsageServiceServer).ReconcileUsage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/usage.v1.UsageService/ReconcileUsage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UsageServiceServer).ReconcileUsage(ctx, req.(*ReconcileUsageRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _UsageService_GetCostCenter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCostCenterRequest) if err := dec(in); err != nil { @@ -203,10 +169,6 @@ var UsageService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "usage.v1.UsageService", HandlerType: (*UsageServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "ReconcileUsage", - Handler: _UsageService_ReconcileUsage_Handler, - }, { MethodName: "GetCostCenter", Handler: _UsageService_GetCostCenter_Handler, diff --git a/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.d.ts b/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.d.ts index 0500e0bc32f66f..42817393db0880 100644 --- a/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.d.ts +++ b/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.d.ts @@ -15,21 +15,11 @@ import * as usage_v1_usage_pb from "../../usage/v1/usage_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; interface IUsageServiceService extends grpc.ServiceDefinition { - reconcileUsage: IUsageServiceService_IReconcileUsage; getCostCenter: IUsageServiceService_IGetCostCenter; reconcileUsageWithLedger: IUsageServiceService_IReconcileUsageWithLedger; listUsage: IUsageServiceService_IListUsage; } -interface IUsageServiceService_IReconcileUsage extends grpc.MethodDefinition { - path: "/usage.v1.UsageService/ReconcileUsage"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} interface IUsageServiceService_IGetCostCenter extends grpc.MethodDefinition { path: "/usage.v1.UsageService/GetCostCenter"; requestStream: false; @@ -61,16 +51,12 @@ interface IUsageServiceService_IListUsage extends grpc.MethodDefinition; getCostCenter: grpc.handleUnaryCall; reconcileUsageWithLedger: grpc.handleUnaryCall; listUsage: grpc.handleUnaryCall; } export interface IUsageServiceClient { - reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; - reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; - reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; @@ -84,9 +70,6 @@ export interface IUsageServiceClient { export class UsageServiceClient extends grpc.Client implements IUsageServiceClient { constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; - public reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; - public reconcileUsage(request: usage_v1_usage_pb.ReconcileUsageRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.ReconcileUsageResponse) => void): grpc.ClientUnaryCall; public getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; public getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; public getCostCenter(request: usage_v1_usage_pb.GetCostCenterRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: usage_v1_usage_pb.GetCostCenterResponse) => void): grpc.ClientUnaryCall; diff --git a/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.js b/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.js index 3f14bf08aa7592..67b779a33b682a 100644 --- a/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.js +++ b/components/usage-api/typescript/src/usage/v1/usage_grpc_pb.js @@ -55,28 +55,6 @@ function deserialize_usage_v1_ListUsageResponse(buffer_arg) { return usage_v1_usage_pb.ListUsageResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_usage_v1_ReconcileUsageRequest(arg) { - if (!(arg instanceof usage_v1_usage_pb.ReconcileUsageRequest)) { - throw new Error('Expected argument of type usage.v1.ReconcileUsageRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_usage_v1_ReconcileUsageRequest(buffer_arg) { - return usage_v1_usage_pb.ReconcileUsageRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_usage_v1_ReconcileUsageResponse(arg) { - if (!(arg instanceof usage_v1_usage_pb.ReconcileUsageResponse)) { - throw new Error('Expected argument of type usage.v1.ReconcileUsageResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_usage_v1_ReconcileUsageResponse(buffer_arg) { - return usage_v1_usage_pb.ReconcileUsageResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_usage_v1_ReconcileUsageWithLedgerRequest(arg) { if (!(arg instanceof usage_v1_usage_pb.ReconcileUsageWithLedgerRequest)) { throw new Error('Expected argument of type usage.v1.ReconcileUsageWithLedgerRequest'); @@ -101,18 +79,6 @@ function deserialize_usage_v1_ReconcileUsageWithLedgerResponse(buffer_arg) { var UsageServiceService = exports.UsageServiceService = { - // ReconcileUsage collects usage for the specified time period, and stores the usage records in the database, returning the records. -reconcileUsage: { - path: '/usage.v1.UsageService/ReconcileUsage', - requestStream: false, - responseStream: false, - requestType: usage_v1_usage_pb.ReconcileUsageRequest, - responseType: usage_v1_usage_pb.ReconcileUsageResponse, - requestSerialize: serialize_usage_v1_ReconcileUsageRequest, - requestDeserialize: deserialize_usage_v1_ReconcileUsageRequest, - responseSerialize: serialize_usage_v1_ReconcileUsageResponse, - responseDeserialize: deserialize_usage_v1_ReconcileUsageResponse, - }, // GetCostCenter retrieves the spending limit with its associated attributionID getCostCenter: { path: '/usage.v1.UsageService/GetCostCenter', diff --git a/components/usage-api/typescript/src/usage/v1/usage_pb.d.ts b/components/usage-api/typescript/src/usage/v1/usage_pb.d.ts index 6aef302eb0a538..8798a2a0e31859 100644 --- a/components/usage-api/typescript/src/usage/v1/usage_pb.d.ts +++ b/components/usage-api/typescript/src/usage/v1/usage_pb.d.ts @@ -304,60 +304,6 @@ export namespace BilledSession { } } -export class ReconcileUsageRequest extends jspb.Message { - - hasStartTime(): boolean; - clearStartTime(): void; - getStartTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setStartTime(value?: google_protobuf_timestamp_pb.Timestamp): ReconcileUsageRequest; - - hasEndTime(): boolean; - clearEndTime(): void; - getEndTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setEndTime(value?: google_protobuf_timestamp_pb.Timestamp): ReconcileUsageRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReconcileUsageRequest.AsObject; - static toObject(includeInstance: boolean, msg: ReconcileUsageRequest): ReconcileUsageRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReconcileUsageRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReconcileUsageRequest; - static deserializeBinaryFromReader(message: ReconcileUsageRequest, reader: jspb.BinaryReader): ReconcileUsageRequest; -} - -export namespace ReconcileUsageRequest { - export type AsObject = { - startTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - endTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -export class ReconcileUsageResponse extends jspb.Message { - clearSessionsList(): void; - getSessionsList(): Array; - setSessionsList(value: Array): ReconcileUsageResponse; - addSessions(value?: BilledSession, index?: number): BilledSession; - getReportId(): string; - setReportId(value: string): ReconcileUsageResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReconcileUsageResponse.AsObject; - static toObject(includeInstance: boolean, msg: ReconcileUsageResponse): ReconcileUsageResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReconcileUsageResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReconcileUsageResponse; - static deserializeBinaryFromReader(message: ReconcileUsageResponse, reader: jspb.BinaryReader): ReconcileUsageResponse; -} - -export namespace ReconcileUsageResponse { - export type AsObject = { - sessionsList: Array, - reportId: string, - } -} - export class GetCostCenterRequest extends jspb.Message { getAttributionId(): string; setAttributionId(value: string): GetCostCenterRequest; diff --git a/components/usage-api/typescript/src/usage/v1/usage_pb.js b/components/usage-api/typescript/src/usage/v1/usage_pb.js index dcec55438b4644..3d5056b5bf8a3c 100644 --- a/components/usage-api/typescript/src/usage/v1/usage_pb.js +++ b/components/usage-api/typescript/src/usage/v1/usage_pb.js @@ -32,8 +32,6 @@ goog.exportSymbol('proto.usage.v1.ListUsageRequest.Ordering', null, global); goog.exportSymbol('proto.usage.v1.ListUsageResponse', null, global); goog.exportSymbol('proto.usage.v1.PaginatedRequest', null, global); goog.exportSymbol('proto.usage.v1.PaginatedResponse', null, global); -goog.exportSymbol('proto.usage.v1.ReconcileUsageRequest', null, global); -goog.exportSymbol('proto.usage.v1.ReconcileUsageResponse', null, global); goog.exportSymbol('proto.usage.v1.ReconcileUsageWithLedgerRequest', null, global); goog.exportSymbol('proto.usage.v1.ReconcileUsageWithLedgerResponse', null, global); goog.exportSymbol('proto.usage.v1.Usage', null, global); @@ -206,48 +204,6 @@ if (goog.DEBUG && !COMPILED) { */ proto.usage.v1.BilledSession.displayName = 'proto.usage.v1.BilledSession'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.usage.v1.ReconcileUsageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.usage.v1.ReconcileUsageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.usage.v1.ReconcileUsageRequest.displayName = 'proto.usage.v1.ReconcileUsageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.usage.v1.ReconcileUsageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.usage.v1.ReconcileUsageResponse.repeatedFields_, null); -}; -goog.inherits(proto.usage.v1.ReconcileUsageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.usage.v1.ReconcileUsageResponse.displayName = 'proto.usage.v1.ReconcileUsageResponse'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2490,398 +2446,6 @@ proto.usage.v1.BilledSession.prototype.setCredits = function(value) { -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.usage.v1.ReconcileUsageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.usage.v1.ReconcileUsageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.usage.v1.ReconcileUsageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.usage.v1.ReconcileUsageRequest} - */ -proto.usage.v1.ReconcileUsageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.usage.v1.ReconcileUsageRequest; - return proto.usage.v1.ReconcileUsageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.usage.v1.ReconcileUsageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.usage.v1.ReconcileUsageRequest} - */ -proto.usage.v1.ReconcileUsageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setStartTime(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEndTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.usage.v1.ReconcileUsageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.usage.v1.ReconcileUsageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.usage.v1.ReconcileUsageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTime(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEndTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } -}; - - -/** - * optional google.protobuf.Timestamp start_time = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.getStartTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.usage.v1.ReconcileUsageRequest} returns this -*/ -proto.usage.v1.ReconcileUsageRequest.prototype.setStartTime = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.usage.v1.ReconcileUsageRequest} returns this - */ -proto.usage.v1.ReconcileUsageRequest.prototype.clearStartTime = function() { - return this.setStartTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.hasStartTime = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional google.protobuf.Timestamp end_time = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.getEndTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.usage.v1.ReconcileUsageRequest} returns this -*/ -proto.usage.v1.ReconcileUsageRequest.prototype.setEndTime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.usage.v1.ReconcileUsageRequest} returns this - */ -proto.usage.v1.ReconcileUsageRequest.prototype.clearEndTime = function() { - return this.setEndTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.usage.v1.ReconcileUsageRequest.prototype.hasEndTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.usage.v1.ReconcileUsageResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.usage.v1.ReconcileUsageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.usage.v1.ReconcileUsageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.usage.v1.ReconcileUsageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.usage.v1.ReconcileUsageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - sessionsList: jspb.Message.toObjectList(msg.getSessionsList(), - proto.usage.v1.BilledSession.toObject, includeInstance), - reportId: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.usage.v1.ReconcileUsageResponse} - */ -proto.usage.v1.ReconcileUsageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.usage.v1.ReconcileUsageResponse; - return proto.usage.v1.ReconcileUsageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.usage.v1.ReconcileUsageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.usage.v1.ReconcileUsageResponse} - */ -proto.usage.v1.ReconcileUsageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.usage.v1.BilledSession; - reader.readMessage(value,proto.usage.v1.BilledSession.deserializeBinaryFromReader); - msg.addSessions(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReportId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.usage.v1.ReconcileUsageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.usage.v1.ReconcileUsageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.usage.v1.ReconcileUsageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.usage.v1.ReconcileUsageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSessionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.usage.v1.BilledSession.serializeBinaryToWriter - ); - } - f = message.getReportId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * repeated BilledSession sessions = 1; - * @return {!Array} - */ -proto.usage.v1.ReconcileUsageResponse.prototype.getSessionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.usage.v1.BilledSession, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.usage.v1.ReconcileUsageResponse} returns this -*/ -proto.usage.v1.ReconcileUsageResponse.prototype.setSessionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.usage.v1.BilledSession=} opt_value - * @param {number=} opt_index - * @return {!proto.usage.v1.BilledSession} - */ -proto.usage.v1.ReconcileUsageResponse.prototype.addSessions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.usage.v1.BilledSession, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.usage.v1.ReconcileUsageResponse} returns this - */ -proto.usage.v1.ReconcileUsageResponse.prototype.clearSessionsList = function() { - return this.setSessionsList([]); -}; - - -/** - * optional string report_id = 2; - * @return {string} - */ -proto.usage.v1.ReconcileUsageResponse.prototype.getReportId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.usage.v1.ReconcileUsageResponse} returns this - */ -proto.usage.v1.ReconcileUsageResponse.prototype.setReportId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/components/usage-api/usage/v1/usage.proto b/components/usage-api/usage/v1/usage.proto index 89068d52fedf74..67d5cb7acadb68 100644 --- a/components/usage-api/usage/v1/usage.proto +++ b/components/usage-api/usage/v1/usage.proto @@ -8,9 +8,6 @@ import "google/protobuf/timestamp.proto"; service UsageService { - // ReconcileUsage collects usage for the specified time period, and stores the usage records in the database, returning the records. - rpc ReconcileUsage(ReconcileUsageRequest) returns (ReconcileUsageResponse) {} - // GetCostCenter retrieves the spending limit with its associated attributionID rpc GetCostCenter(GetCostCenterRequest) returns (GetCostCenterResponse) {} @@ -110,17 +107,6 @@ message BilledSession { double credits = 12; } -message ReconcileUsageRequest { - google.protobuf.Timestamp start_time = 1; - google.protobuf.Timestamp end_time = 2; -} - -message ReconcileUsageResponse { - repeated BilledSession sessions = 1 [deprecated=true]; - // ID of the UsageReport generated for this reconcile run. - string report_id = 2; -} - message GetCostCenterRequest { string attribution_id = 1; }