dubbo.apache.org/dubbo-go/v3@v3.1.1/protocol/grpc/internal/routeguide/routeguide.pb.go (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // Code generated by protoc-gen-go. DO NOT EDIT.
    19  // source: routeguide.proto
    20  
    21  package routeguide
    22  
    23  import (
    24  	context "context"
    25  	fmt "fmt"
    26  	math "math"
    27  )
    28  
    29  import (
    30  	proto "github.com/golang/protobuf/proto"
    31  
    32  	grpc "google.golang.org/grpc"
    33  	codes "google.golang.org/grpc/codes"
    34  	status "google.golang.org/grpc/status"
    35  )
    36  
    37  import (
    38  	"dubbo.apache.org/dubbo-go/v3/protocol"
    39  	"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
    40  )
    41  
    42  // Reference imports to suppress errors if they are not otherwise used.
    43  var _ = proto.Marshal
    44  var _ = fmt.Errorf
    45  var _ = math.Inf
    46  
    47  // This is a compile-time assertion to ensure that this generated file
    48  // is compatible with the proto package it is being compiled against.
    49  // A compilation error at this line likely means your copy of the
    50  // proto package needs to be updated.
    51  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    52  
    53  // Points are represented as latitude-longitude pairs in the E7 representation
    54  // (degrees multiplied by 10**7 and rounded to the nearest integer).
    55  // Latitudes should be in the range +/- 90 degrees and longitude should be in
    56  // the range +/- 180 degrees (inclusive).
    57  type Point struct {
    58  	Latitude             int32    `protobuf:"varint,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
    59  	Longitude            int32    `protobuf:"varint,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
    60  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    61  	XXX_unrecognized     []byte   `json:"-"`
    62  	XXX_sizecache        int32    `json:"-"`
    63  }
    64  
    65  func (m *Point) Reset()         { *m = Point{} }
    66  func (m *Point) String() string { return proto.CompactTextString(m) }
    67  func (*Point) ProtoMessage()    {}
    68  func (*Point) Descriptor() ([]byte, []int) {
    69  	return fileDescriptor_f4a1fa0460de48b1, []int{0}
    70  }
    71  
    72  func (m *Point) XXX_Unmarshal(b []byte) error {
    73  	return xxx_messageInfo_Point.Unmarshal(m, b)
    74  }
    75  func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    76  	return xxx_messageInfo_Point.Marshal(b, m, deterministic)
    77  }
    78  func (m *Point) XXX_Merge(src proto.Message) {
    79  	xxx_messageInfo_Point.Merge(m, src)
    80  }
    81  func (m *Point) XXX_Size() int {
    82  	return xxx_messageInfo_Point.Size(m)
    83  }
    84  func (m *Point) XXX_DiscardUnknown() {
    85  	xxx_messageInfo_Point.DiscardUnknown(m)
    86  }
    87  
    88  var xxx_messageInfo_Point proto.InternalMessageInfo
    89  
    90  func (m *Point) GetLatitude() int32 {
    91  	if m != nil {
    92  		return m.Latitude
    93  	}
    94  	return 0
    95  }
    96  
    97  func (m *Point) GetLongitude() int32 {
    98  	if m != nil {
    99  		return m.Longitude
   100  	}
   101  	return 0
   102  }
   103  
   104  // A latitude-longitude rectangle, represented as two diagonally opposite
   105  // points "lo" and "hi".
   106  type Rectangle struct {
   107  	// One corner of the rectangle.
   108  	Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"`
   109  	// The other corner of the rectangle.
   110  	Hi                   *Point   `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"`
   111  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   112  	XXX_unrecognized     []byte   `json:"-"`
   113  	XXX_sizecache        int32    `json:"-"`
   114  }
   115  
   116  func (m *Rectangle) Reset()         { *m = Rectangle{} }
   117  func (m *Rectangle) String() string { return proto.CompactTextString(m) }
   118  func (*Rectangle) ProtoMessage()    {}
   119  func (*Rectangle) Descriptor() ([]byte, []int) {
   120  	return fileDescriptor_f4a1fa0460de48b1, []int{1}
   121  }
   122  
   123  func (m *Rectangle) XXX_Unmarshal(b []byte) error {
   124  	return xxx_messageInfo_Rectangle.Unmarshal(m, b)
   125  }
   126  func (m *Rectangle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   127  	return xxx_messageInfo_Rectangle.Marshal(b, m, deterministic)
   128  }
   129  func (m *Rectangle) XXX_Merge(src proto.Message) {
   130  	xxx_messageInfo_Rectangle.Merge(m, src)
   131  }
   132  func (m *Rectangle) XXX_Size() int {
   133  	return xxx_messageInfo_Rectangle.Size(m)
   134  }
   135  func (m *Rectangle) XXX_DiscardUnknown() {
   136  	xxx_messageInfo_Rectangle.DiscardUnknown(m)
   137  }
   138  
   139  var xxx_messageInfo_Rectangle proto.InternalMessageInfo
   140  
   141  func (m *Rectangle) GetLo() *Point {
   142  	if m != nil {
   143  		return m.Lo
   144  	}
   145  	return nil
   146  }
   147  
   148  func (m *Rectangle) GetHi() *Point {
   149  	if m != nil {
   150  		return m.Hi
   151  	}
   152  	return nil
   153  }
   154  
   155  // A feature names something at a given point.
   156  //
   157  // If a feature could not be named, the name is empty.
   158  type Feature struct {
   159  	// The name of the feature.
   160  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   161  	// The point where the feature is detected.
   162  	Location             *Point   `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
   163  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   164  	XXX_unrecognized     []byte   `json:"-"`
   165  	XXX_sizecache        int32    `json:"-"`
   166  }
   167  
   168  func (m *Feature) Reset()         { *m = Feature{} }
   169  func (m *Feature) String() string { return proto.CompactTextString(m) }
   170  func (*Feature) ProtoMessage()    {}
   171  func (*Feature) Descriptor() ([]byte, []int) {
   172  	return fileDescriptor_f4a1fa0460de48b1, []int{2}
   173  }
   174  
   175  func (m *Feature) XXX_Unmarshal(b []byte) error {
   176  	return xxx_messageInfo_Feature.Unmarshal(m, b)
   177  }
   178  func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   179  	return xxx_messageInfo_Feature.Marshal(b, m, deterministic)
   180  }
   181  func (m *Feature) XXX_Merge(src proto.Message) {
   182  	xxx_messageInfo_Feature.Merge(m, src)
   183  }
   184  func (m *Feature) XXX_Size() int {
   185  	return xxx_messageInfo_Feature.Size(m)
   186  }
   187  func (m *Feature) XXX_DiscardUnknown() {
   188  	xxx_messageInfo_Feature.DiscardUnknown(m)
   189  }
   190  
   191  var xxx_messageInfo_Feature proto.InternalMessageInfo
   192  
   193  func (m *Feature) GetName() string {
   194  	if m != nil {
   195  		return m.Name
   196  	}
   197  	return ""
   198  }
   199  
   200  func (m *Feature) GetLocation() *Point {
   201  	if m != nil {
   202  		return m.Location
   203  	}
   204  	return nil
   205  }
   206  
   207  // A RouteNote is a message sent while at a given point.
   208  type RouteNote struct {
   209  	// The location from which the message is sent.
   210  	Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
   211  	// The message to be sent.
   212  	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
   213  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   214  	XXX_unrecognized     []byte   `json:"-"`
   215  	XXX_sizecache        int32    `json:"-"`
   216  }
   217  
   218  func (m *RouteNote) Reset()         { *m = RouteNote{} }
   219  func (m *RouteNote) String() string { return proto.CompactTextString(m) }
   220  func (*RouteNote) ProtoMessage()    {}
   221  func (*RouteNote) Descriptor() ([]byte, []int) {
   222  	return fileDescriptor_f4a1fa0460de48b1, []int{3}
   223  }
   224  
   225  func (m *RouteNote) XXX_Unmarshal(b []byte) error {
   226  	return xxx_messageInfo_RouteNote.Unmarshal(m, b)
   227  }
   228  func (m *RouteNote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   229  	return xxx_messageInfo_RouteNote.Marshal(b, m, deterministic)
   230  }
   231  func (m *RouteNote) XXX_Merge(src proto.Message) {
   232  	xxx_messageInfo_RouteNote.Merge(m, src)
   233  }
   234  func (m *RouteNote) XXX_Size() int {
   235  	return xxx_messageInfo_RouteNote.Size(m)
   236  }
   237  func (m *RouteNote) XXX_DiscardUnknown() {
   238  	xxx_messageInfo_RouteNote.DiscardUnknown(m)
   239  }
   240  
   241  var xxx_messageInfo_RouteNote proto.InternalMessageInfo
   242  
   243  func (m *RouteNote) GetLocation() *Point {
   244  	if m != nil {
   245  		return m.Location
   246  	}
   247  	return nil
   248  }
   249  
   250  func (m *RouteNote) GetMessage() string {
   251  	if m != nil {
   252  		return m.Message
   253  	}
   254  	return ""
   255  }
   256  
   257  // A RouteSummary is received in response to a RecordRoute rpc.
   258  //
   259  // It contains the number of individual points received, the number of
   260  // detected features, and the total distance covered as the cumulative sum of
   261  // the distance between each point.
   262  type RouteSummary struct {
   263  	// The number of points received.
   264  	PointCount int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"`
   265  	// The number of known features passed while traversing the route.
   266  	FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,omitempty"`
   267  	// The distance covered in meters.
   268  	Distance int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"`
   269  	// The duration of the traversal in seconds.
   270  	ElapsedTime          int32    `protobuf:"varint,4,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"`
   271  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   272  	XXX_unrecognized     []byte   `json:"-"`
   273  	XXX_sizecache        int32    `json:"-"`
   274  }
   275  
   276  func (m *RouteSummary) Reset()         { *m = RouteSummary{} }
   277  func (m *RouteSummary) String() string { return proto.CompactTextString(m) }
   278  func (*RouteSummary) ProtoMessage()    {}
   279  func (*RouteSummary) Descriptor() ([]byte, []int) {
   280  	return fileDescriptor_f4a1fa0460de48b1, []int{4}
   281  }
   282  
   283  func (m *RouteSummary) XXX_Unmarshal(b []byte) error {
   284  	return xxx_messageInfo_RouteSummary.Unmarshal(m, b)
   285  }
   286  func (m *RouteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   287  	return xxx_messageInfo_RouteSummary.Marshal(b, m, deterministic)
   288  }
   289  func (m *RouteSummary) XXX_Merge(src proto.Message) {
   290  	xxx_messageInfo_RouteSummary.Merge(m, src)
   291  }
   292  func (m *RouteSummary) XXX_Size() int {
   293  	return xxx_messageInfo_RouteSummary.Size(m)
   294  }
   295  func (m *RouteSummary) XXX_DiscardUnknown() {
   296  	xxx_messageInfo_RouteSummary.DiscardUnknown(m)
   297  }
   298  
   299  var xxx_messageInfo_RouteSummary proto.InternalMessageInfo
   300  
   301  func (m *RouteSummary) GetPointCount() int32 {
   302  	if m != nil {
   303  		return m.PointCount
   304  	}
   305  	return 0
   306  }
   307  
   308  func (m *RouteSummary) GetFeatureCount() int32 {
   309  	if m != nil {
   310  		return m.FeatureCount
   311  	}
   312  	return 0
   313  }
   314  
   315  func (m *RouteSummary) GetDistance() int32 {
   316  	if m != nil {
   317  		return m.Distance
   318  	}
   319  	return 0
   320  }
   321  
   322  func (m *RouteSummary) GetElapsedTime() int32 {
   323  	if m != nil {
   324  		return m.ElapsedTime
   325  	}
   326  	return 0
   327  }
   328  
   329  func init() {
   330  	proto.RegisterType((*Point)(nil), "routeguide.Point")
   331  	proto.RegisterType((*Rectangle)(nil), "routeguide.Rectangle")
   332  	proto.RegisterType((*Feature)(nil), "routeguide.Feature")
   333  	proto.RegisterType((*RouteNote)(nil), "routeguide.RouteNote")
   334  	proto.RegisterType((*RouteSummary)(nil), "routeguide.RouteSummary")
   335  }
   336  
   337  func init() { proto.RegisterFile("routeguide.proto", fileDescriptor_f4a1fa0460de48b1) }
   338  
   339  var fileDescriptor_f4a1fa0460de48b1 = []byte{
   340  	// 412 bytes of a gzipped FileDescriptorProto
   341  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xdd, 0x8a, 0xd3, 0x40,
   342  	0x14, 0xde, 0xc9, 0xee, 0xba, 0xcd, 0x49, 0x44, 0x3d, 0x22, 0x84, 0x28, 0xe8, 0xc6, 0x9b, 0xbd,
   343  	0x31, 0x94, 0x0a, 0xbd, 0xac, 0xd8, 0x82, 0xf5, 0xa2, 0x48, 0x8d, 0x05, 0x2f, 0xcb, 0x98, 0x1c,
   344  	0xd3, 0x81, 0x49, 0x26, 0x24, 0x13, 0xd0, 0x07, 0xf0, 0x09, 0x7c, 0x03, 0x9f, 0x54, 0x32, 0x49,
   345  	0xda, 0x54, 0x5b, 0xf6, 0x6e, 0xce, 0x77, 0xbe, 0xef, 0xfc, 0x7c, 0x87, 0x81, 0xc7, 0xa5, 0xaa,
   346  	0x35, 0xa5, 0xb5, 0x48, 0x28, 0x2c, 0x4a, 0xa5, 0x15, 0xc2, 0x01, 0x09, 0xde, 0xc3, 0xf5, 0x5a,
   347  	0x89, 0x5c, 0xa3, 0x0f, 0x23, 0xc9, 0xb5, 0xd0, 0x75, 0x42, 0x1e, 0x7b, 0xc5, 0xee, 0xae, 0xa3,
   348  	0x7d, 0x8c, 0x2f, 0xc0, 0x96, 0x2a, 0x4f, 0xdb, 0xa4, 0x65, 0x92, 0x07, 0x20, 0xf8, 0x0c, 0x76,
   349  	0x44, 0xb1, 0xe6, 0x79, 0x2a, 0x09, 0x6f, 0xc1, 0x92, 0xca, 0x14, 0x70, 0x26, 0x4f, 0xc2, 0x41,
   350  	0x6b, 0xd3, 0x25, 0xb2, 0xa4, 0x6a, 0x28, 0x3b, 0x61, 0xca, 0x9c, 0xa6, 0xec, 0x44, 0xb0, 0x82,
   351  	0x9b, 0x0f, 0xc4, 0x75, 0x5d, 0x12, 0x22, 0x5c, 0xe5, 0x3c, 0x6b, 0x67, 0xb2, 0x23, 0xf3, 0xc6,
   352  	0x37, 0x30, 0x92, 0x2a, 0xe6, 0x5a, 0xa8, 0xfc, 0x7c, 0x9d, 0x3d, 0x25, 0xd8, 0x80, 0x1d, 0x35,
   353  	0xd9, 0x4f, 0x4a, 0x1f, 0x6b, 0xd9, 0xbd, 0x5a, 0xf4, 0xe0, 0x26, 0xa3, 0xaa, 0xe2, 0x69, 0xbb,
   354  	0xb8, 0x1d, 0xf5, 0x61, 0xf0, 0x9b, 0x81, 0x6b, 0xca, 0x7e, 0xa9, 0xb3, 0x8c, 0x97, 0x3f, 0xf1,
   355  	0x25, 0x38, 0x45, 0xa3, 0xde, 0xc6, 0xaa, 0xce, 0x75, 0x67, 0x22, 0x18, 0x68, 0xd1, 0x20, 0xf8,
   356  	0x1a, 0x1e, 0x7e, 0x6f, 0xb7, 0xea, 0x28, 0xad, 0x95, 0x6e, 0x07, 0xb6, 0x24, 0x1f, 0x46, 0x89,
   357  	0xa8, 0x34, 0xcf, 0x63, 0xf2, 0x2e, 0xdb, 0x3b, 0xf4, 0x31, 0xde, 0x82, 0x4b, 0x92, 0x17, 0x15,
   358  	0x25, 0x5b, 0x2d, 0x32, 0xf2, 0xae, 0x4c, 0xde, 0xe9, 0xb0, 0x8d, 0xc8, 0x68, 0xf2, 0xcb, 0x02,
   359  	0x30, 0x53, 0x2d, 0x9b, 0x75, 0x70, 0x0a, 0xb0, 0x24, 0xdd, 0x7b, 0xf9, 0xff, 0xa6, 0xfe, 0xd3,
   360  	0x21, 0xd4, 0xf1, 0x82, 0x0b, 0x9c, 0x81, 0xbb, 0x12, 0x55, 0x2f, 0xac, 0xf0, 0xd9, 0x90, 0xb6,
   361  	0xbf, 0xf6, 0x19, 0xf5, 0x98, 0xe1, 0x0c, 0x9c, 0x88, 0x62, 0x55, 0x26, 0x66, 0x96, 0x53, 0x8d,
   362  	0xbd, 0xa3, 0x8a, 0x03, 0x1f, 0x83, 0x8b, 0x3b, 0x86, 0xef, 0xba, 0x93, 0x2d, 0x76, 0x5c, 0xff,
   363  	0xd3, 0xbc, 0xbf, 0xa4, 0x7f, 0x1a, 0x6e, 0xe4, 0x63, 0x36, 0x9f, 0xc2, 0x73, 0xa1, 0xc2, 0xb4,
   364  	0x2c, 0xe2, 0x90, 0x7e, 0xf0, 0xac, 0x90, 0x54, 0x0d, 0xe8, 0xf3, 0x47, 0x07, 0x8f, 0xd6, 0xcd,
   365  	0x9f, 0x58, 0xb3, 0x3f, 0xd6, 0xe5, 0xc7, 0xd5, 0xd7, 0x6f, 0x0f, 0xcc, 0x17, 0x79, 0xfb, 0x37,
   366  	0x00, 0x00, 0xff, 0xff, 0xb0, 0xf5, 0x6a, 0xe0, 0x36, 0x03, 0x00, 0x00,
   367  }
   368  
   369  // Reference imports to suppress errors if they are not otherwise used.
   370  var _ context.Context
   371  var _ grpc.ClientConnInterface
   372  
   373  // This is a compile-time assertion to ensure that this generated file
   374  // is compatible with the grpc package it is being compiled against.
   375  const _ = grpc.SupportPackageIsVersion6
   376  
   377  // RouteGuideClient is the client API for RouteGuide service.
   378  //
   379  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   380  type RouteGuideClient interface {
   381  	// A simple RPC.
   382  	//
   383  	// Obtains the feature at a given position.
   384  	//
   385  	// A feature with an empty name is returned if there's no feature at the given
   386  	// position.
   387  	GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error)
   388  	// A server-to-client streaming RPC.
   389  	//
   390  	// Obtains the Features available within the given Rectangle.  Results are
   391  	// streamed rather than returned at once (e.g. in a response message with a
   392  	// repeated field), as the rectangle may cover a large area and contain a
   393  	// huge number of features.
   394  	ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error)
   395  	// A client-to-server streaming RPC.
   396  	//
   397  	// Accepts a stream of Points on a route being traversed, returning a
   398  	// RouteSummary when traversal is completed.
   399  	RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error)
   400  	// A Bidirectional streaming RPC.
   401  	//
   402  	// Accepts a stream of RouteNotes sent while a route is being traversed,
   403  	// while receiving other RouteNotes (e.g. from other users).
   404  	RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error)
   405  }
   406  
   407  type routeGuideClient struct {
   408  	cc grpc.ClientConnInterface
   409  }
   410  
   411  func NewRouteGuideClient(cc grpc.ClientConnInterface) RouteGuideClient {
   412  	return &routeGuideClient{cc}
   413  }
   414  
   415  func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) {
   416  	out := new(Feature)
   417  	err := c.cc.Invoke(ctx, "/routeguide.RouteGuide/GetFeature", in, out, opts...)
   418  	if err != nil {
   419  		return nil, err
   420  	}
   421  	return out, nil
   422  }
   423  
   424  func (c *routeGuideClient) ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error) {
   425  	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[0], "/routeguide.RouteGuide/ListFeatures", opts...)
   426  	if err != nil {
   427  		return nil, err
   428  	}
   429  	x := &routeGuideListFeaturesClient{stream}
   430  	if err := x.ClientStream.SendMsg(in); err != nil {
   431  		return nil, err
   432  	}
   433  	if err := x.ClientStream.CloseSend(); err != nil {
   434  		return nil, err
   435  	}
   436  	return x, nil
   437  }
   438  
   439  type RouteGuide_ListFeaturesClient interface {
   440  	Recv() (*Feature, error)
   441  	grpc.ClientStream
   442  }
   443  
   444  type routeGuideListFeaturesClient struct {
   445  	grpc.ClientStream
   446  }
   447  
   448  func (x *routeGuideListFeaturesClient) Recv() (*Feature, error) {
   449  	m := new(Feature)
   450  	if err := x.ClientStream.RecvMsg(m); err != nil {
   451  		return nil, err
   452  	}
   453  	return m, nil
   454  }
   455  
   456  func (c *routeGuideClient) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) {
   457  	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[1], "/routeguide.RouteGuide/RecordRoute", opts...)
   458  	if err != nil {
   459  		return nil, err
   460  	}
   461  	x := &routeGuideRecordRouteClient{stream}
   462  	return x, nil
   463  }
   464  
   465  type RouteGuide_RecordRouteClient interface {
   466  	Send(*Point) error
   467  	CloseAndRecv() (*RouteSummary, error)
   468  	grpc.ClientStream
   469  }
   470  
   471  type routeGuideRecordRouteClient struct {
   472  	grpc.ClientStream
   473  }
   474  
   475  func (x *routeGuideRecordRouteClient) Send(m *Point) error {
   476  	return x.ClientStream.SendMsg(m)
   477  }
   478  
   479  func (x *routeGuideRecordRouteClient) CloseAndRecv() (*RouteSummary, error) {
   480  	if err := x.ClientStream.CloseSend(); err != nil {
   481  		return nil, err
   482  	}
   483  	m := new(RouteSummary)
   484  	if err := x.ClientStream.RecvMsg(m); err != nil {
   485  		return nil, err
   486  	}
   487  	return m, nil
   488  }
   489  
   490  func (c *routeGuideClient) RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error) {
   491  	stream, err := c.cc.NewStream(ctx, &_RouteGuide_serviceDesc.Streams[2], "/routeguide.RouteGuide/RouteChat", opts...)
   492  	if err != nil {
   493  		return nil, err
   494  	}
   495  	x := &routeGuideRouteChatClient{stream}
   496  	return x, nil
   497  }
   498  
   499  type RouteGuide_RouteChatClient interface {
   500  	Send(*RouteNote) error
   501  	Recv() (*RouteNote, error)
   502  	grpc.ClientStream
   503  }
   504  
   505  type routeGuideRouteChatClient struct {
   506  	grpc.ClientStream
   507  }
   508  
   509  func (x *routeGuideRouteChatClient) Send(m *RouteNote) error {
   510  	return x.ClientStream.SendMsg(m)
   511  }
   512  
   513  func (x *routeGuideRouteChatClient) Recv() (*RouteNote, error) {
   514  	m := new(RouteNote)
   515  	if err := x.ClientStream.RecvMsg(m); err != nil {
   516  		return nil, err
   517  	}
   518  	return m, nil
   519  }
   520  
   521  // RouteGuideServer is the server API for RouteGuide service.
   522  type RouteGuideServer interface {
   523  	// A simple RPC.
   524  	//
   525  	// Obtains the feature at a given position.
   526  	//
   527  	// A feature with an empty name is returned if there's no feature at the given
   528  	// position.
   529  	GetFeature(context.Context, *Point) (*Feature, error)
   530  	// A server-to-client streaming RPC.
   531  	//
   532  	// Obtains the Features available within the given Rectangle.  Results are
   533  	// streamed rather than returned at once (e.g. in a response message with a
   534  	// repeated field), as the rectangle may cover a large area and contain a
   535  	// huge number of features.
   536  	ListFeatures(*Rectangle, RouteGuide_ListFeaturesServer) error
   537  	// A client-to-server streaming RPC.
   538  	//
   539  	// Accepts a stream of Points on a route being traversed, returning a
   540  	// RouteSummary when traversal is completed.
   541  	RecordRoute(RouteGuide_RecordRouteServer) error
   542  	// A Bidirectional streaming RPC.
   543  	//
   544  	// Accepts a stream of RouteNotes sent while a route is being traversed,
   545  	// while receiving other RouteNotes (e.g. from other users).
   546  	RouteChat(RouteGuide_RouteChatServer) error
   547  }
   548  
   549  // UnimplementedRouteGuideServer can be embedded to have forward compatible implementations.
   550  type UnimplementedRouteGuideServer struct {
   551  }
   552  
   553  func (*UnimplementedRouteGuideServer) GetFeature(ctx context.Context, req *Point) (*Feature, error) {
   554  	return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented")
   555  }
   556  func (*UnimplementedRouteGuideServer) ListFeatures(req *Rectangle, srv RouteGuide_ListFeaturesServer) error {
   557  	return status.Errorf(codes.Unimplemented, "method ListFeatures not implemented")
   558  }
   559  func (*UnimplementedRouteGuideServer) RecordRoute(srv RouteGuide_RecordRouteServer) error {
   560  	return status.Errorf(codes.Unimplemented, "method RecordRoute not implemented")
   561  }
   562  func (*UnimplementedRouteGuideServer) RouteChat(srv RouteGuide_RouteChatServer) error {
   563  	return status.Errorf(codes.Unimplemented, "method RouteChat not implemented")
   564  }
   565  
   566  func RegisterRouteGuideServer(s *grpc.Server, srv RouteGuideServer) {
   567  	s.RegisterService(&_RouteGuide_serviceDesc, srv)
   568  }
   569  
   570  func _RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   571  	in := new(Point)
   572  	if err := dec(in); err != nil {
   573  		return nil, err
   574  	}
   575  	if interceptor == nil {
   576  		return srv.(RouteGuideServer).GetFeature(ctx, in)
   577  	}
   578  	info := &grpc.UnaryServerInfo{
   579  		Server:     srv,
   580  		FullMethod: "/routeguide.RouteGuide/GetFeature",
   581  	}
   582  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   583  		return srv.(RouteGuideServer).GetFeature(ctx, req.(*Point))
   584  	}
   585  	return interceptor(ctx, in, info, handler)
   586  }
   587  
   588  func _RouteGuide_ListFeatures_Handler(srv interface{}, stream grpc.ServerStream) error {
   589  	m := new(Rectangle)
   590  	if err := stream.RecvMsg(m); err != nil {
   591  		return err
   592  	}
   593  	return srv.(RouteGuideServer).ListFeatures(m, &routeGuideListFeaturesServer{stream})
   594  }
   595  
   596  type RouteGuide_ListFeaturesServer interface {
   597  	Send(*Feature) error
   598  	grpc.ServerStream
   599  }
   600  
   601  type routeGuideListFeaturesServer struct {
   602  	grpc.ServerStream
   603  }
   604  
   605  func (x *routeGuideListFeaturesServer) Send(m *Feature) error {
   606  	return x.ServerStream.SendMsg(m)
   607  }
   608  
   609  func _RouteGuide_RecordRoute_Handler(srv interface{}, stream grpc.ServerStream) error {
   610  	return srv.(RouteGuideServer).RecordRoute(&routeGuideRecordRouteServer{stream})
   611  }
   612  
   613  type RouteGuide_RecordRouteServer interface {
   614  	SendAndClose(*RouteSummary) error
   615  	Recv() (*Point, error)
   616  	grpc.ServerStream
   617  }
   618  
   619  type routeGuideRecordRouteServer struct {
   620  	grpc.ServerStream
   621  }
   622  
   623  func (x *routeGuideRecordRouteServer) SendAndClose(m *RouteSummary) error {
   624  	return x.ServerStream.SendMsg(m)
   625  }
   626  
   627  func (x *routeGuideRecordRouteServer) Recv() (*Point, error) {
   628  	m := new(Point)
   629  	if err := x.ServerStream.RecvMsg(m); err != nil {
   630  		return nil, err
   631  	}
   632  	return m, nil
   633  }
   634  
   635  func _RouteGuide_RouteChat_Handler(srv interface{}, stream grpc.ServerStream) error {
   636  	return srv.(RouteGuideServer).RouteChat(&routeGuideRouteChatServer{stream})
   637  }
   638  
   639  type RouteGuide_RouteChatServer interface {
   640  	Send(*RouteNote) error
   641  	Recv() (*RouteNote, error)
   642  	grpc.ServerStream
   643  }
   644  
   645  type routeGuideRouteChatServer struct {
   646  	grpc.ServerStream
   647  }
   648  
   649  func (x *routeGuideRouteChatServer) Send(m *RouteNote) error {
   650  	return x.ServerStream.SendMsg(m)
   651  }
   652  
   653  func (x *routeGuideRouteChatServer) Recv() (*RouteNote, error) {
   654  	m := new(RouteNote)
   655  	if err := x.ServerStream.RecvMsg(m); err != nil {
   656  		return nil, err
   657  	}
   658  	return m, nil
   659  }
   660  
   661  var _RouteGuide_serviceDesc = grpc.ServiceDesc{
   662  	ServiceName: "routeguide.RouteGuide",
   663  	HandlerType: (*RouteGuideServer)(nil),
   664  	Methods: []grpc.MethodDesc{
   665  		{
   666  			MethodName: "GetFeature",
   667  			Handler:    _RouteGuide_GetFeature_Handler,
   668  		},
   669  	},
   670  	Streams: []grpc.StreamDesc{
   671  		{
   672  			StreamName:    "ListFeatures",
   673  			Handler:       _RouteGuide_ListFeatures_Handler,
   674  			ServerStreams: true,
   675  		},
   676  		{
   677  			StreamName:    "RecordRoute",
   678  			Handler:       _RouteGuide_RecordRoute_Handler,
   679  			ClientStreams: true,
   680  		},
   681  		{
   682  			StreamName:    "RouteChat",
   683  			Handler:       _RouteGuide_RouteChat_Handler,
   684  			ServerStreams: true,
   685  			ClientStreams: true,
   686  		},
   687  	},
   688  	Metadata: "routeguide.proto",
   689  }
   690  
   691  // RouteGuideClientImpl is the client API for RouteGuide service.
   692  //
   693  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   694  type RouteGuideClientImpl struct {
   695  	// A simple RPC.
   696  	//
   697  	// Obtains the feature at a given position.
   698  	//
   699  	// A feature with an empty name is returned if there's no feature at the given
   700  	// position.
   701  	GetFeature func(ctx context.Context, in *Point, out *Feature) error
   702  	// A server-to-client streaming RPC.
   703  	//
   704  	// Obtains the Features available within the given Rectangle.  Results are
   705  	// streamed rather than returned at once (e.g. in a response message with a
   706  	// repeated field), as the rectangle may cover a large area and contain a
   707  	// huge number of features.
   708  	ListFeatures func(ctx context.Context, in *Rectangle) (RouteGuide_ListFeaturesClient, error)
   709  	// A client-to-server streaming RPC.
   710  	//
   711  	// Accepts a stream of Points on a route being traversed, returning a
   712  	// RouteSummary when traversal is completed.
   713  	RecordRoute func(ctx context.Context) (RouteGuide_RecordRouteClient, error)
   714  	// A Bidirectional streaming RPC.
   715  	//
   716  	// Accepts a stream of RouteNotes sent while a route is being traversed,
   717  	// while receiving other RouteNotes (e.g. from other users).
   718  	RouteChat func(ctx context.Context) (RouteGuide_RouteChatClient, error)
   719  }
   720  
   721  func (c *RouteGuideClientImpl) Reference() string {
   722  	return "routeGuideImpl"
   723  }
   724  
   725  func (c *RouteGuideClientImpl) GetDubboStub(cc *grpc.ClientConn) RouteGuideClient {
   726  	return NewRouteGuideClient(cc)
   727  }
   728  
   729  type RouteGuideProviderBase struct {
   730  	proxyImpl protocol.Invoker
   731  }
   732  
   733  func (s *RouteGuideProviderBase) SetProxyImpl(impl protocol.Invoker) {
   734  	s.proxyImpl = impl
   735  }
   736  
   737  func (s *RouteGuideProviderBase) GetProxyImpl() protocol.Invoker {
   738  	return s.proxyImpl
   739  }
   740  
   741  func (c *RouteGuideProviderBase) Reference() string {
   742  	return "routeGuideImpl"
   743  }
   744  
   745  func _DUBBO_RouteGuide_GetFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   746  	in := new(Point)
   747  	if err := dec(in); err != nil {
   748  		return nil, err
   749  	}
   750  	// DubboGrpcService is gRPC service
   751  	type DubboGrpcService interface {
   752  		// SetProxyImpl sets proxy.
   753  		SetProxyImpl(impl protocol.Invoker)
   754  		// GetProxyImpl gets proxy.
   755  		GetProxyImpl() protocol.Invoker
   756  		// ServiceDesc gets an RPC service's specification.
   757  		ServiceDesc() *grpc.ServiceDesc
   758  	}
   759  	base := srv.(DubboGrpcService)
   760  	args := []interface{}{}
   761  	args = append(args, in)
   762  	invo := invocation.NewRPCInvocation("GetFeature", args, nil)
   763  	if interceptor == nil {
   764  		result := base.GetProxyImpl().Invoke(ctx, invo)
   765  		return result.Result(), result.Error()
   766  	}
   767  	info := &grpc.UnaryServerInfo{
   768  		Server:     srv,
   769  		FullMethod: "/routeguide.RouteGuide/GetFeature",
   770  	}
   771  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   772  		result := base.GetProxyImpl().Invoke(ctx, invo)
   773  		return result.Result(), result.Error()
   774  	}
   775  	return interceptor(ctx, in, info, handler)
   776  }
   777  
   778  func _DUBBO_RouteGuide_ListFeatures_Handler(srv interface{}, stream grpc.ServerStream) error {
   779  	// DubboGrpcService is gRPC service
   780  	type DubboGrpcService interface {
   781  		// SetProxyImpl sets proxy.
   782  		SetProxyImpl(impl protocol.Invoker)
   783  		// GetProxyImpl gets proxy.
   784  		GetProxyImpl() protocol.Invoker
   785  		// ServiceDesc gets an RPC service's specification.
   786  		ServiceDesc() *grpc.ServiceDesc
   787  	}
   788  	_, ok := srv.(DubboGrpcService)
   789  	invo := invocation.NewRPCInvocation("ListFeatures", nil, nil)
   790  	if !ok {
   791  		fmt.Println(invo)
   792  	}
   793  	m := new(Rectangle)
   794  	if err := stream.RecvMsg(m); err != nil {
   795  		return err
   796  	}
   797  	return srv.(RouteGuideServer).ListFeatures(m, &routeGuideListFeaturesServer{stream})
   798  }
   799  
   800  func _DUBBO_RouteGuide_RecordRoute_Handler(srv interface{}, stream grpc.ServerStream) error {
   801  	// DubboGrpcService is gRPC service
   802  	type DubboGrpcService interface {
   803  		// SetProxyImpl sets proxy.
   804  		SetProxyImpl(impl protocol.Invoker)
   805  		// GetProxyImpl gets proxy.
   806  		GetProxyImpl() protocol.Invoker
   807  		// ServiceDesc gets an RPC service's specification.
   808  		ServiceDesc() *grpc.ServiceDesc
   809  	}
   810  	_, ok := srv.(DubboGrpcService)
   811  	invo := invocation.NewRPCInvocation("RecordRoute", nil, nil)
   812  	if !ok {
   813  		fmt.Println(invo)
   814  	}
   815  	return srv.(RouteGuideServer).RecordRoute(&routeGuideRecordRouteServer{stream})
   816  }
   817  
   818  func _DUBBO_RouteGuide_RouteChat_Handler(srv interface{}, stream grpc.ServerStream) error {
   819  	// DubboGrpcService is gRPC service
   820  	type DubboGrpcService interface {
   821  		// SetProxyImpl sets proxy.
   822  		SetProxyImpl(impl protocol.Invoker)
   823  		// GetProxyImpl gets proxy.
   824  		GetProxyImpl() protocol.Invoker
   825  		// ServiceDesc gets an RPC service's specification.
   826  		ServiceDesc() *grpc.ServiceDesc
   827  	}
   828  	_, ok := srv.(DubboGrpcService)
   829  	invo := invocation.NewRPCInvocation("RouteChat", nil, nil)
   830  	if !ok {
   831  		fmt.Println(invo)
   832  	}
   833  	return srv.(RouteGuideServer).RouteChat(&routeGuideRouteChatServer{stream})
   834  }
   835  
   836  func (s *RouteGuideProviderBase) ServiceDesc() *grpc.ServiceDesc {
   837  	return &grpc.ServiceDesc{
   838  		ServiceName: "routeguide.RouteGuide",
   839  		HandlerType: (*RouteGuideServer)(nil),
   840  		Methods: []grpc.MethodDesc{
   841  			{
   842  				MethodName: "GetFeature",
   843  				Handler:    _DUBBO_RouteGuide_GetFeature_Handler,
   844  			},
   845  		},
   846  		Streams: []grpc.StreamDesc{
   847  			{
   848  				StreamName:    "ListFeatures",
   849  				Handler:       _DUBBO_RouteGuide_ListFeatures_Handler,
   850  				ServerStreams: true,
   851  			},
   852  			{
   853  				StreamName:    "RecordRoute",
   854  				Handler:       _DUBBO_RouteGuide_RecordRoute_Handler,
   855  				ClientStreams: true,
   856  			},
   857  			{
   858  				StreamName:    "RouteChat",
   859  				Handler:       _DUBBO_RouteGuide_RouteChat_Handler,
   860  				ServerStreams: true,
   861  				ClientStreams: true,
   862  			},
   863  		},
   864  		Metadata: "routeguide.proto",
   865  	}
   866  }