| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: google/maps/routes/v1alpha/route_service.proto |
| |
| package routes |
| |
| import ( |
| context "context" |
| fmt "fmt" |
| math "math" |
| |
| proto "github.com/golang/protobuf/proto" |
| _ "google.golang.org/genproto/googleapis/api/annotations" |
| v1 "google.golang.org/genproto/googleapis/maps/routes/v1" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| ) |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| func init() { |
| proto.RegisterFile("google/maps/routes/v1alpha/route_service.proto", fileDescriptor_c0fc741d3de9197d) |
| } |
| |
| var fileDescriptor_c0fc741d3de9197d = []byte{ |
| // 395 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x4b, 0xc3, 0x40, |
| 0x14, 0xc7, 0xb9, 0x20, 0x0e, 0x11, 0x97, 0x0c, 0x16, 0x52, 0x29, 0x36, 0x83, 0x60, 0x95, 0x4b, |
| 0x7f, 0x2c, 0x52, 0x17, 0x5b, 0x91, 0x4e, 0x85, 0xd2, 0x42, 0x07, 0x29, 0x94, 0x33, 0x9e, 0x31, |
| 0x90, 0xdc, 0x9d, 0x77, 0x69, 0x71, 0x76, 0x77, 0x72, 0x74, 0x73, 0xf4, 0xbf, 0x70, 0xed, 0xea, |
| 0xee, 0xe4, 0x1f, 0xe1, 0x28, 0xb9, 0x97, 0x68, 0x2a, 0x29, 0x64, 0xbc, 0xbc, 0xef, 0xf7, 0x7d, |
| 0xde, 0xf7, 0xde, 0xc5, 0xc4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 0xc2, 0x95, 0x39, 0x87, 0x7a, 0xac, 0x03, 0xa7, |
| 0x5a, 0x38, 0x16, 0x68, 0xbb, 0xa8, 0xd1, 0x44, 0x76, 0x7d, 0xd5, 0xab, 0x41, 0x2b, 0x21, 0xe9, |
| 0x2d, 0x95, 0x92, 0xde, 0xa4, 0x18, 0x22, 0x02, 0x85, 0x3d, 0x1e, 0xf5, 0xdf, 0x91, 0x59, 0xf3, |
| 0x78, 0x84, 0x37, 0xbf, 0xc7, 0x7e, 0x05, 0xe2, 0x4e, 0xe0, 0x01, 0xeb, 0x3d, 0x8c, 0x92, 0xe5, |
| 0x8c, 0xd0, 0xd5, 0x79, 0x6a, 0xf3, 0x79, 0x48, 0x98, 0x8f, 0xb9, 0xf4, 0x5d, 0x9f, 0x32, 0xbd, |
| 0x3a, 0xf7, 0x0f, 0x54, 0xf4, 0x57, 0x9c, 0xc1, 0xf1, 0x1b, 0xa1, 0x57, 0x63, 0x6b, 0x30, 0x1c, |
| 0x4f, 0xde, 0x0c, 0x7b, 0x00, 0xcd, 0x86, 0xc9, 0x0c, 0xc0, 0xc4, 0xd3, 0x96, 0xe6, 0xad, 0xb2, |
| 0xe2, 0x2c, 0x29, 0xce, 0xa0, 0x38, 0x9b, 0x42, 0xab, 0xeb, 0x6d, 0x0d, 0xec, 0xfc, 0x04, 0x00, |
| 0x00, 0xff, 0xff, 0xe7, 0x75, 0xf8, 0xf3, 0x85, 0x03, 0x00, 0x00, |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConnInterface |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion6 |
| |
| // RoutesAlphaClient is the client API for RoutesAlpha service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type RoutesAlphaClient interface { |
| // Returns the primary route along with optional alternate routes, given a set |
| // of terminal and intermediate waypoints. |
| // |
| // **NOTE:** This method requires that you specify a response field mask in |
| // the input. You can provide the response field mask by using URL parameter |
| // `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask` |
| // (see the [available URL parameters and |
| // headers](https://cloud.google.com/apis/docs/system-parameters). The value |
| // is a comma separated list of field paths. See detailed documentation about |
| // [how to construct the field |
| // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). |
| // |
| // For example, in this method: |
| // |
| // * Field mask of all available fields (for manual inspection): |
| // `X-Goog-FieldMask: *` |
| // * Field mask of Route-level duration, distance, and polyline (an example |
| // production setup): |
| // `X-Goog-FieldMask: |
| // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline` |
| // |
| // Google discourage the use of the wildcard (`*`) response field mask, or |
| // specifying the field mask at the top level (`routes`), because: |
| // |
| // * Selecting only the fields that you need helps our server save computation |
| // cycles, allowing us to return the result to you with a lower latency. |
| // * Selecting only the fields that you need |
| // in your production job ensures stable latency performance. We might add |
| // more response fields in the future, and those new fields might require |
| // extra computation time. If you select all fields, or if you select all |
| // fields at the top level, then you might experience performance degradation |
| // because any new field we add will be automatically included in the |
| // response. |
| // * Selecting only the fields that you need results in a smaller response |
| // size, and thus higher network throughput. |
| ComputeRoutes(ctx context.Context, in *v1.ComputeRoutesRequest, opts ...grpc.CallOption) (*v1.ComputeRoutesResponse, error) |
| // Takes in a list of origins and destinations and returns a stream containing |
| // route information for each combination of origin and destination. |
| ComputeRouteMatrix(ctx context.Context, in *v1.ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesAlpha_ComputeRouteMatrixClient, error) |
| } |
| |
| type routesAlphaClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewRoutesAlphaClient(cc grpc.ClientConnInterface) RoutesAlphaClient { |
| return &routesAlphaClient{cc} |
| } |
| |
| func (c *routesAlphaClient) ComputeRoutes(ctx context.Context, in *v1.ComputeRoutesRequest, opts ...grpc.CallOption) (*v1.ComputeRoutesResponse, error) { |
| out := new(v1.ComputeRoutesResponse) |
| err := c.cc.Invoke(ctx, "/google.maps.routes.v1alpha.RoutesAlpha/ComputeRoutes", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *routesAlphaClient) ComputeRouteMatrix(ctx context.Context, in *v1.ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesAlpha_ComputeRouteMatrixClient, error) { |
| stream, err := c.cc.NewStream(ctx, &_RoutesAlpha_serviceDesc.Streams[0], "/google.maps.routes.v1alpha.RoutesAlpha/ComputeRouteMatrix", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &routesAlphaComputeRouteMatrixClient{stream} |
| if err := x.ClientStream.SendMsg(in); err != nil { |
| return nil, err |
| } |
| if err := x.ClientStream.CloseSend(); err != nil { |
| return nil, err |
| } |
| return x, nil |
| } |
| |
| type RoutesAlpha_ComputeRouteMatrixClient interface { |
| Recv() (*v1.RouteMatrixElement, error) |
| grpc.ClientStream |
| } |
| |
| type routesAlphaComputeRouteMatrixClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *routesAlphaComputeRouteMatrixClient) Recv() (*v1.RouteMatrixElement, error) { |
| m := new(v1.RouteMatrixElement) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| // RoutesAlphaServer is the server API for RoutesAlpha service. |
| type RoutesAlphaServer interface { |
| // Returns the primary route along with optional alternate routes, given a set |
| // of terminal and intermediate waypoints. |
| // |
| // **NOTE:** This method requires that you specify a response field mask in |
| // the input. You can provide the response field mask by using URL parameter |
| // `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask` |
| // (see the [available URL parameters and |
| // headers](https://cloud.google.com/apis/docs/system-parameters). The value |
| // is a comma separated list of field paths. See detailed documentation about |
| // [how to construct the field |
| // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto). |
| // |
| // For example, in this method: |
| // |
| // * Field mask of all available fields (for manual inspection): |
| // `X-Goog-FieldMask: *` |
| // * Field mask of Route-level duration, distance, and polyline (an example |
| // production setup): |
| // `X-Goog-FieldMask: |
| // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline` |
| // |
| // Google discourage the use of the wildcard (`*`) response field mask, or |
| // specifying the field mask at the top level (`routes`), because: |
| // |
| // * Selecting only the fields that you need helps our server save computation |
| // cycles, allowing us to return the result to you with a lower latency. |
| // * Selecting only the fields that you need |
| // in your production job ensures stable latency performance. We might add |
| // more response fields in the future, and those new fields might require |
| // extra computation time. If you select all fields, or if you select all |
| // fields at the top level, then you might experience performance degradation |
| // because any new field we add will be automatically included in the |
| // response. |
| // * Selecting only the fields that you need results in a smaller response |
| // size, and thus higher network throughput. |
| ComputeRoutes(context.Context, *v1.ComputeRoutesRequest) (*v1.ComputeRoutesResponse, error) |
| // Takes in a list of origins and destinations and returns a stream containing |
| // route information for each combination of origin and destination. |
| ComputeRouteMatrix(*v1.ComputeRouteMatrixRequest, RoutesAlpha_ComputeRouteMatrixServer) error |
| } |
| |
| // UnimplementedRoutesAlphaServer can be embedded to have forward compatible implementations. |
| type UnimplementedRoutesAlphaServer struct { |
| } |
| |
| func (*UnimplementedRoutesAlphaServer) ComputeRoutes(ctx context.Context, req *v1.ComputeRoutesRequest) (*v1.ComputeRoutesResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ComputeRoutes not implemented") |
| } |
| func (*UnimplementedRoutesAlphaServer) ComputeRouteMatrix(req *v1.ComputeRouteMatrixRequest, srv RoutesAlpha_ComputeRouteMatrixServer) error { |
| return status.Errorf(codes.Unimplemented, "method ComputeRouteMatrix not implemented") |
| } |
| |
| func RegisterRoutesAlphaServer(s *grpc.Server, srv RoutesAlphaServer) { |
| s.RegisterService(&_RoutesAlpha_serviceDesc, srv) |
| } |
| |
| func _RoutesAlpha_ComputeRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(v1.ComputeRoutesRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(RoutesAlphaServer).ComputeRoutes(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/google.maps.routes.v1alpha.RoutesAlpha/ComputeRoutes", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(RoutesAlphaServer).ComputeRoutes(ctx, req.(*v1.ComputeRoutesRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _RoutesAlpha_ComputeRouteMatrix_Handler(srv interface{}, stream grpc.ServerStream) error { |
| m := new(v1.ComputeRouteMatrixRequest) |
| if err := stream.RecvMsg(m); err != nil { |
| return err |
| } |
| return srv.(RoutesAlphaServer).ComputeRouteMatrix(m, &routesAlphaComputeRouteMatrixServer{stream}) |
| } |
| |
| type RoutesAlpha_ComputeRouteMatrixServer interface { |
| Send(*v1.RouteMatrixElement) error |
| grpc.ServerStream |
| } |
| |
| type routesAlphaComputeRouteMatrixServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *routesAlphaComputeRouteMatrixServer) Send(m *v1.RouteMatrixElement) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| var _RoutesAlpha_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "google.maps.routes.v1alpha.RoutesAlpha", |
| HandlerType: (*RoutesAlphaServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "ComputeRoutes", |
| Handler: _RoutesAlpha_ComputeRoutes_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{ |
| { |
| StreamName: "ComputeRouteMatrix", |
| Handler: _RoutesAlpha_ComputeRouteMatrix_Handler, |
| ServerStreams: true, |
| }, |
| }, |
| Metadata: "google/maps/routes/v1alpha/route_service.proto", |
| } |