github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/booking/srv/rate/proto/rate.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: github.com/micro/go-micro/examples/booking/srv/rate/proto/rate.proto
     3  
     4  /*
     5  Package rate is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	github.com/micro/go-micro/examples/booking/srv/rate/proto/rate.proto
     9  
    10  It has these top-level messages:
    11  	Request
    12  	Result
    13  	RatePlan
    14  	RoomType
    15  */
    16  package rate
    17  
    18  import proto "github.com/golang/protobuf/proto"
    19  import fmt "fmt"
    20  import math "math"
    21  
    22  import (
    23  	context "golang.org/x/net/context"
    24  	grpc "google.golang.org/grpc"
    25  )
    26  
    27  // Reference imports to suppress errors if they are not otherwise used.
    28  var _ = proto.Marshal
    29  var _ = fmt.Errorf
    30  var _ = math.Inf
    31  
    32  // This is a compile-time assertion to ensure that this generated file
    33  // is compatible with the proto package it is being compiled against.
    34  // A compilation error at this line likely means your copy of the
    35  // proto package needs to be updated.
    36  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    37  
    38  type Request struct {
    39  	HotelIds []string `protobuf:"bytes,1,rep,name=hotelIds" json:"hotelIds,omitempty"`
    40  	InDate   string   `protobuf:"bytes,2,opt,name=inDate" json:"inDate,omitempty"`
    41  	OutDate  string   `protobuf:"bytes,3,opt,name=outDate" json:"outDate,omitempty"`
    42  }
    43  
    44  func (m *Request) Reset()                    { *m = Request{} }
    45  func (m *Request) String() string            { return proto.CompactTextString(m) }
    46  func (*Request) ProtoMessage()               {}
    47  func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    48  
    49  func (m *Request) GetHotelIds() []string {
    50  	if m != nil {
    51  		return m.HotelIds
    52  	}
    53  	return nil
    54  }
    55  
    56  func (m *Request) GetInDate() string {
    57  	if m != nil {
    58  		return m.InDate
    59  	}
    60  	return ""
    61  }
    62  
    63  func (m *Request) GetOutDate() string {
    64  	if m != nil {
    65  		return m.OutDate
    66  	}
    67  	return ""
    68  }
    69  
    70  type Result struct {
    71  	RatePlans []*RatePlan `protobuf:"bytes,1,rep,name=ratePlans" json:"ratePlans,omitempty"`
    72  }
    73  
    74  func (m *Result) Reset()                    { *m = Result{} }
    75  func (m *Result) String() string            { return proto.CompactTextString(m) }
    76  func (*Result) ProtoMessage()               {}
    77  func (*Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    78  
    79  func (m *Result) GetRatePlans() []*RatePlan {
    80  	if m != nil {
    81  		return m.RatePlans
    82  	}
    83  	return nil
    84  }
    85  
    86  type RatePlan struct {
    87  	HotelId  string    `protobuf:"bytes,1,opt,name=hotelId" json:"hotelId,omitempty"`
    88  	Code     string    `protobuf:"bytes,2,opt,name=code" json:"code,omitempty"`
    89  	InDate   string    `protobuf:"bytes,3,opt,name=inDate" json:"inDate,omitempty"`
    90  	OutDate  string    `protobuf:"bytes,4,opt,name=outDate" json:"outDate,omitempty"`
    91  	RoomType *RoomType `protobuf:"bytes,5,opt,name=roomType" json:"roomType,omitempty"`
    92  }
    93  
    94  func (m *RatePlan) Reset()                    { *m = RatePlan{} }
    95  func (m *RatePlan) String() string            { return proto.CompactTextString(m) }
    96  func (*RatePlan) ProtoMessage()               {}
    97  func (*RatePlan) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
    98  
    99  func (m *RatePlan) GetHotelId() string {
   100  	if m != nil {
   101  		return m.HotelId
   102  	}
   103  	return ""
   104  }
   105  
   106  func (m *RatePlan) GetCode() string {
   107  	if m != nil {
   108  		return m.Code
   109  	}
   110  	return ""
   111  }
   112  
   113  func (m *RatePlan) GetInDate() string {
   114  	if m != nil {
   115  		return m.InDate
   116  	}
   117  	return ""
   118  }
   119  
   120  func (m *RatePlan) GetOutDate() string {
   121  	if m != nil {
   122  		return m.OutDate
   123  	}
   124  	return ""
   125  }
   126  
   127  func (m *RatePlan) GetRoomType() *RoomType {
   128  	if m != nil {
   129  		return m.RoomType
   130  	}
   131  	return nil
   132  }
   133  
   134  type RoomType struct {
   135  	BookableRate       float64 `protobuf:"fixed64,1,opt,name=bookableRate" json:"bookableRate,omitempty"`
   136  	TotalRate          float64 `protobuf:"fixed64,2,opt,name=totalRate" json:"totalRate,omitempty"`
   137  	TotalRateInclusive float64 `protobuf:"fixed64,3,opt,name=totalRateInclusive" json:"totalRateInclusive,omitempty"`
   138  	Code               string  `protobuf:"bytes,4,opt,name=code" json:"code,omitempty"`
   139  	Currency           string  `protobuf:"bytes,5,opt,name=currency" json:"currency,omitempty"`
   140  	RoomDescription    string  `protobuf:"bytes,6,opt,name=roomDescription" json:"roomDescription,omitempty"`
   141  }
   142  
   143  func (m *RoomType) Reset()                    { *m = RoomType{} }
   144  func (m *RoomType) String() string            { return proto.CompactTextString(m) }
   145  func (*RoomType) ProtoMessage()               {}
   146  func (*RoomType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
   147  
   148  func (m *RoomType) GetBookableRate() float64 {
   149  	if m != nil {
   150  		return m.BookableRate
   151  	}
   152  	return 0
   153  }
   154  
   155  func (m *RoomType) GetTotalRate() float64 {
   156  	if m != nil {
   157  		return m.TotalRate
   158  	}
   159  	return 0
   160  }
   161  
   162  func (m *RoomType) GetTotalRateInclusive() float64 {
   163  	if m != nil {
   164  		return m.TotalRateInclusive
   165  	}
   166  	return 0
   167  }
   168  
   169  func (m *RoomType) GetCode() string {
   170  	if m != nil {
   171  		return m.Code
   172  	}
   173  	return ""
   174  }
   175  
   176  func (m *RoomType) GetCurrency() string {
   177  	if m != nil {
   178  		return m.Currency
   179  	}
   180  	return ""
   181  }
   182  
   183  func (m *RoomType) GetRoomDescription() string {
   184  	if m != nil {
   185  		return m.RoomDescription
   186  	}
   187  	return ""
   188  }
   189  
   190  func init() {
   191  	proto.RegisterType((*Request)(nil), "rate.Request")
   192  	proto.RegisterType((*Result)(nil), "rate.Result")
   193  	proto.RegisterType((*RatePlan)(nil), "rate.RatePlan")
   194  	proto.RegisterType((*RoomType)(nil), "rate.RoomType")
   195  }
   196  
   197  // Reference imports to suppress errors if they are not otherwise used.
   198  var _ context.Context
   199  var _ grpc.ClientConn
   200  
   201  // This is a compile-time assertion to ensure that this generated file
   202  // is compatible with the grpc package it is being compiled against.
   203  const _ = grpc.SupportPackageIsVersion4
   204  
   205  // Client API for Rate service
   206  
   207  type RateClient interface {
   208  	// GetRates returns rate codes for hotels for a given date range
   209  	GetRates(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
   210  }
   211  
   212  type rateClient struct {
   213  	cc *grpc.ClientConn
   214  }
   215  
   216  func NewRateClient(cc *grpc.ClientConn) RateClient {
   217  	return &rateClient{cc}
   218  }
   219  
   220  func (c *rateClient) GetRates(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) {
   221  	out := new(Result)
   222  	err := grpc.Invoke(ctx, "/rate.Rate/GetRates", in, out, c.cc, opts...)
   223  	if err != nil {
   224  		return nil, err
   225  	}
   226  	return out, nil
   227  }
   228  
   229  // Server API for Rate service
   230  
   231  type RateServer interface {
   232  	// GetRates returns rate codes for hotels for a given date range
   233  	GetRates(context.Context, *Request) (*Result, error)
   234  }
   235  
   236  func RegisterRateServer(s *grpc.Server, srv RateServer) {
   237  	s.RegisterService(&_Rate_serviceDesc, srv)
   238  }
   239  
   240  func _Rate_GetRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   241  	in := new(Request)
   242  	if err := dec(in); err != nil {
   243  		return nil, err
   244  	}
   245  	if interceptor == nil {
   246  		return srv.(RateServer).GetRates(ctx, in)
   247  	}
   248  	info := &grpc.UnaryServerInfo{
   249  		Server:     srv,
   250  		FullMethod: "/rate.Rate/GetRates",
   251  	}
   252  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   253  		return srv.(RateServer).GetRates(ctx, req.(*Request))
   254  	}
   255  	return interceptor(ctx, in, info, handler)
   256  }
   257  
   258  var _Rate_serviceDesc = grpc.ServiceDesc{
   259  	ServiceName: "rate.Rate",
   260  	HandlerType: (*RateServer)(nil),
   261  	Methods: []grpc.MethodDesc{
   262  		{
   263  			MethodName: "GetRates",
   264  			Handler:    _Rate_GetRates_Handler,
   265  		},
   266  	},
   267  	Streams:  []grpc.StreamDesc{},
   268  	Metadata: "github.com/micro/go-micro/examples/booking/srv/rate/proto/rate.proto",
   269  }
   270  
   271  func init() {
   272  	proto.RegisterFile("github.com/micro/go-micro/examples/booking/srv/rate/proto/rate.proto", fileDescriptor0)
   273  }
   274  
   275  var fileDescriptor0 = []byte{
   276  	// 351 bytes of a gzipped FileDescriptorProto
   277  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x4b, 0xfb, 0x30,
   278  	0x18, 0xc7, 0xc9, 0x6f, 0xfd, 0x75, 0xed, 0xe3, 0x54, 0x78, 0x0e, 0x52, 0x86, 0x87, 0xd1, 0x8b,
   279  	0x43, 0xa4, 0x85, 0x09, 0x5e, 0xbc, 0x0e, 0x64, 0x37, 0x09, 0x82, 0xe7, 0xb6, 0x0b, 0x5b, 0x31,
   280  	0x6d, 0x6a, 0x92, 0x0e, 0xf7, 0x46, 0x7c, 0x69, 0xbe, 0x1e, 0x49, 0x9a, 0x76, 0x9b, 0xe8, 0xed,
   281  	0xfb, 0x27, 0x3c, 0xfd, 0xe4, 0x69, 0xe0, 0x71, 0x53, 0xea, 0x6d, 0x9b, 0x27, 0x85, 0xa8, 0xd2,
   282  	0xaa, 0x2c, 0xa4, 0x48, 0xd9, 0x47, 0x56, 0x35, 0x9c, 0xa9, 0x34, 0x17, 0xe2, 0xad, 0xac, 0x37,
   283  	0xa9, 0x92, 0xbb, 0x54, 0x66, 0x9a, 0xa5, 0x8d, 0x14, 0x5a, 0x58, 0x99, 0x58, 0x89, 0x9e, 0xd1,
   284  	0xf1, 0x2b, 0x8c, 0x29, 0x7b, 0x6f, 0x99, 0xd2, 0x38, 0x85, 0x60, 0x2b, 0x34, 0xe3, 0xab, 0xb5,
   285  	0x8a, 0xc8, 0x6c, 0x34, 0x0f, 0xe9, 0xe0, 0xf1, 0x0a, 0xfc, 0xb2, 0x5e, 0x66, 0x9a, 0x45, 0xff,
   286  	0x66, 0x64, 0x1e, 0x52, 0xe7, 0x30, 0x82, 0xb1, 0x68, 0xb5, 0x2d, 0x46, 0xb6, 0xe8, 0x6d, 0xfc,
   287  	0x00, 0x3e, 0x65, 0xaa, 0xe5, 0x1a, 0xef, 0x20, 0x34, 0x9f, 0x7a, 0xe6, 0x59, 0xdd, 0x0d, 0x3e,
   288  	0x5b, 0x5c, 0x24, 0x16, 0x84, 0xba, 0x98, 0x1e, 0x0e, 0xc4, 0x9f, 0x04, 0x82, 0x3e, 0x37, 0xe3,
   289  	0x1d, 0x42, 0x44, 0xba, 0xf1, 0xce, 0x22, 0x82, 0x57, 0x88, 0x75, 0x8f, 0x63, 0xf5, 0x11, 0xe4,
   290  	0xe8, 0x2f, 0x48, 0xef, 0x04, 0x12, 0x6f, 0x21, 0x90, 0x42, 0x54, 0x2f, 0xfb, 0x86, 0x45, 0xff,
   291  	0x67, 0xe4, 0x88, 0xcc, 0xa5, 0x74, 0xe8, 0xe3, 0x2f, 0x03, 0xe6, 0x0c, 0xc6, 0x30, 0x31, 0x1b,
   292  	0xce, 0x72, 0xce, 0x0c, 0xac, 0xa5, 0x23, 0xf4, 0x24, 0xc3, 0x6b, 0x08, 0xb5, 0xd0, 0x19, 0xa7,
   293  	0xfd, 0xda, 0x08, 0x3d, 0x04, 0x98, 0x00, 0x0e, 0x66, 0x55, 0x17, 0xbc, 0x55, 0xe5, 0xae, 0x03,
   294  	0x27, 0xf4, 0x97, 0x66, 0xb8, 0xb0, 0x77, 0x74, 0xe1, 0x29, 0x04, 0x45, 0x2b, 0x25, 0xab, 0x8b,
   295  	0xbd, 0xc5, 0x0f, 0xe9, 0xe0, 0x71, 0x0e, 0x97, 0x06, 0x7d, 0xc9, 0x54, 0x21, 0xcb, 0x46, 0x97,
   296  	0xa2, 0x8e, 0x7c, 0x7b, 0xe4, 0x67, 0xbc, 0x48, 0xc1, 0xb3, 0x44, 0x37, 0x10, 0x3c, 0x31, 0x6d,
   297  	0xa4, 0xc2, 0x73, 0xb7, 0x86, 0xee, 0x69, 0x4c, 0x27, 0xbd, 0x35, 0x3f, 0x34, 0xf7, 0xed, 0x03,
   298  	0xba, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xef, 0x8a, 0xc6, 0x91, 0x7f, 0x02, 0x00, 0x00,
   299  }