211 lines
6.5 KiB
Go
211 lines
6.5 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.19.6
|
|
// source: service_price.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// 计算费用
|
|
type CalculatePriceRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
PriceType string `protobuf:"bytes,1,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
|
TrafficGB float64 `protobuf:"fixed64,2,opt,name=trafficGB,proto3" json:"trafficGB,omitempty"`
|
|
BandwidthMB float64 `protobuf:"fixed64,3,opt,name=bandwidthMB,proto3" json:"bandwidthMB,omitempty"`
|
|
NodeRegionId int64 `protobuf:"varint,4,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) Reset() {
|
|
*x = CalculatePriceRequest{}
|
|
mi := &file_service_price_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CalculatePriceRequest) ProtoMessage() {}
|
|
|
|
func (x *CalculatePriceRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_price_proto_msgTypes[0]
|
|
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 CalculatePriceRequest.ProtoReflect.Descriptor instead.
|
|
func (*CalculatePriceRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_price_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) GetPriceType() string {
|
|
if x != nil {
|
|
return x.PriceType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) GetTrafficGB() float64 {
|
|
if x != nil {
|
|
return x.TrafficGB
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) GetBandwidthMB() float64 {
|
|
if x != nil {
|
|
return x.BandwidthMB
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CalculatePriceRequest) GetNodeRegionId() int64 {
|
|
if x != nil {
|
|
return x.NodeRegionId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CalculatePriceResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
HasNodeRegionPrice bool `protobuf:"varint,2,opt,name=hasNodeRegionPrice,proto3" json:"hasNodeRegionPrice,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CalculatePriceResponse) Reset() {
|
|
*x = CalculatePriceResponse{}
|
|
mi := &file_service_price_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CalculatePriceResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CalculatePriceResponse) ProtoMessage() {}
|
|
|
|
func (x *CalculatePriceResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_price_proto_msgTypes[1]
|
|
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 CalculatePriceResponse.ProtoReflect.Descriptor instead.
|
|
func (*CalculatePriceResponse) Descriptor() ([]byte, []int) {
|
|
return file_service_price_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *CalculatePriceResponse) GetAmount() float64 {
|
|
if x != nil {
|
|
return x.Amount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CalculatePriceResponse) GetHasNodeRegionPrice() bool {
|
|
if x != nil {
|
|
return x.HasNodeRegionPrice
|
|
}
|
|
return false
|
|
}
|
|
|
|
var File_service_price_proto protoreflect.FileDescriptor
|
|
|
|
const file_service_price_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x13service_price.proto\x12\x02pb\"\x99\x01\n" +
|
|
"\x15CalculatePriceRequest\x12\x1c\n" +
|
|
"\tpriceType\x18\x01 \x01(\tR\tpriceType\x12\x1c\n" +
|
|
"\ttrafficGB\x18\x02 \x01(\x01R\ttrafficGB\x12 \n" +
|
|
"\vbandwidthMB\x18\x03 \x01(\x01R\vbandwidthMB\x12\"\n" +
|
|
"\fnodeRegionId\x18\x04 \x01(\x03R\fnodeRegionId\"`\n" +
|
|
"\x16CalculatePriceResponse\x12\x16\n" +
|
|
"\x06amount\x18\x01 \x01(\x01R\x06amount\x12.\n" +
|
|
"\x12hasNodeRegionPrice\x18\x02 \x01(\bR\x12hasNodeRegionPrice2W\n" +
|
|
"\fPriceService\x12G\n" +
|
|
"\x0ecalculatePrice\x12\x19.pb.CalculatePriceRequest\x1a\x1a.pb.CalculatePriceResponseB\x06Z\x04./pbb\x06proto3"
|
|
|
|
var (
|
|
file_service_price_proto_rawDescOnce sync.Once
|
|
file_service_price_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_service_price_proto_rawDescGZIP() []byte {
|
|
file_service_price_proto_rawDescOnce.Do(func() {
|
|
file_service_price_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_price_proto_rawDesc), len(file_service_price_proto_rawDesc)))
|
|
})
|
|
return file_service_price_proto_rawDescData
|
|
}
|
|
|
|
var file_service_price_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_service_price_proto_goTypes = []any{
|
|
(*CalculatePriceRequest)(nil), // 0: pb.CalculatePriceRequest
|
|
(*CalculatePriceResponse)(nil), // 1: pb.CalculatePriceResponse
|
|
}
|
|
var file_service_price_proto_depIdxs = []int32{
|
|
0, // 0: pb.PriceService.calculatePrice:input_type -> pb.CalculatePriceRequest
|
|
1, // 1: pb.PriceService.calculatePrice:output_type -> pb.CalculatePriceResponse
|
|
1, // [1:2] is the sub-list for method output_type
|
|
0, // [0:1] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_service_price_proto_init() }
|
|
func file_service_price_proto_init() {
|
|
if File_service_price_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_price_proto_rawDesc), len(file_service_price_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_service_price_proto_goTypes,
|
|
DependencyIndexes: file_service_price_proto_depIdxs,
|
|
MessageInfos: file_service_price_proto_msgTypes,
|
|
}.Build()
|
|
File_service_price_proto = out.File
|
|
file_service_price_proto_goTypes = nil
|
|
file_service_price_proto_depIdxs = nil
|
|
}
|