...

Source file src/google.golang.org/genproto/googleapis/maps/routes/v1/route_service.pb.go

Documentation: google.golang.org/genproto/googleapis/maps/routes/v1

     1  // Copyright 2022 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.26.0
    18  // 	protoc        v3.12.2
    19  // source: google/maps/routes/v1/route_service.proto
    20  
    21  package routes
    22  
    23  import (
    24  	context "context"
    25  	reflect "reflect"
    26  
    27  	_ "google.golang.org/genproto/googleapis/api/annotations"
    28  	grpc "google.golang.org/grpc"
    29  	codes "google.golang.org/grpc/codes"
    30  	status "google.golang.org/grpc/status"
    31  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    32  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    33  )
    34  
    35  const (
    36  	// Verify that this generated code is sufficiently up-to-date.
    37  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    38  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    39  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    40  )
    41  
    42  var File_google_maps_routes_v1_route_service_proto protoreflect.FileDescriptor
    43  
    44  var file_google_maps_routes_v1_route_service_proto_rawDesc = []byte{
    45  	0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f,
    46  	0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x65,
    47  	0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f,
    48  	0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
    49  	0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
    50  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    51  	0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,
    52  	0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
    53  	0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31,
    54  	0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f,
    55  	0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70,
    56  	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70,
    57  	0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70,
    58  	0x75, 0x74, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65,
    59  	0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    60  	0x1a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f,
    61  	0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f,
    62  	0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x71,
    63  	0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67,
    64  	0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76,
    65  	0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
    66  	0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33,
    67  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74,
    68  	0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x6f,
    69  	0x75, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72,
    70  	0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73,
    71  	0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65,
    72  	0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
    73  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbb, 0x04, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
    74  	0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x12, 0x88, 0x01, 0x0a, 0x0d, 0x43, 0x6f,
    75  	0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x67, 0x6f,
    76  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
    77  	0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
    78  	0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
    79  	0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31,
    80  	0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65,
    81  	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11,
    82  	0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
    83  	0x73, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65,
    84  	0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x30, 0x2e, 0x67, 0x6f,
    85  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73,
    86  	0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
    87  	0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e,
    88  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74,
    89  	0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69,
    90  	0x78, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b,
    91  	0x22, 0x16, 0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x6f, 0x75,
    92  	0x74, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x3a, 0x01, 0x2a, 0x30, 0x01, 0x12, 0xa0, 0x01,
    93  	0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52,
    94  	0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d,
    95  	0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f,
    96  	0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65,
    97  	0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
    98  	0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31,
    99  	0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f,
   100  	0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3,
   101  	0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x3a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
   102  	0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a,
   103  	0x1a, 0x61, 0xca, 0x41, 0x1e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x70, 0x72, 0x65, 0x66, 0x65,
   104  	0x72, 0x72, 0x65, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
   105  	0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x3d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
   106  	0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
   107  	0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66,
   108  	0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72,
   109  	0x72, 0x65, 0x64, 0x42, 0xa8, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
   110  	0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76,
   111  	0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   112  	0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
   113  	0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,
   114  	0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d,
   115  	0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f,
   116  	0x75, 0x74, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x4d, 0x52, 0x53, 0xaa, 0x02,
   117  	0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x52, 0x6f, 0x75,
   118  	0x74, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c,
   119  	0x4d, 0x61, 0x70, 0x73, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06,
   120  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   121  }
   122  
   123  var file_google_maps_routes_v1_route_service_proto_goTypes = []interface{}{
   124  	(*ComputeRoutesRequest)(nil),        // 0: google.maps.routes.v1.ComputeRoutesRequest
   125  	(*ComputeRouteMatrixRequest)(nil),   // 1: google.maps.routes.v1.ComputeRouteMatrixRequest
   126  	(*ComputeCustomRoutesRequest)(nil),  // 2: google.maps.routes.v1.ComputeCustomRoutesRequest
   127  	(*ComputeRoutesResponse)(nil),       // 3: google.maps.routes.v1.ComputeRoutesResponse
   128  	(*RouteMatrixElement)(nil),          // 4: google.maps.routes.v1.RouteMatrixElement
   129  	(*ComputeCustomRoutesResponse)(nil), // 5: google.maps.routes.v1.ComputeCustomRoutesResponse
   130  }
   131  var file_google_maps_routes_v1_route_service_proto_depIdxs = []int32{
   132  	0, // 0: google.maps.routes.v1.RoutesPreferred.ComputeRoutes:input_type -> google.maps.routes.v1.ComputeRoutesRequest
   133  	1, // 1: google.maps.routes.v1.RoutesPreferred.ComputeRouteMatrix:input_type -> google.maps.routes.v1.ComputeRouteMatrixRequest
   134  	2, // 2: google.maps.routes.v1.RoutesPreferred.ComputeCustomRoutes:input_type -> google.maps.routes.v1.ComputeCustomRoutesRequest
   135  	3, // 3: google.maps.routes.v1.RoutesPreferred.ComputeRoutes:output_type -> google.maps.routes.v1.ComputeRoutesResponse
   136  	4, // 4: google.maps.routes.v1.RoutesPreferred.ComputeRouteMatrix:output_type -> google.maps.routes.v1.RouteMatrixElement
   137  	5, // 5: google.maps.routes.v1.RoutesPreferred.ComputeCustomRoutes:output_type -> google.maps.routes.v1.ComputeCustomRoutesResponse
   138  	3, // [3:6] is the sub-list for method output_type
   139  	0, // [0:3] is the sub-list for method input_type
   140  	0, // [0:0] is the sub-list for extension type_name
   141  	0, // [0:0] is the sub-list for extension extendee
   142  	0, // [0:0] is the sub-list for field type_name
   143  }
   144  
   145  func init() { file_google_maps_routes_v1_route_service_proto_init() }
   146  func file_google_maps_routes_v1_route_service_proto_init() {
   147  	if File_google_maps_routes_v1_route_service_proto != nil {
   148  		return
   149  	}
   150  	file_google_maps_routes_v1_compute_custom_routes_request_proto_init()
   151  	file_google_maps_routes_v1_compute_custom_routes_response_proto_init()
   152  	file_google_maps_routes_v1_compute_route_matrix_request_proto_init()
   153  	file_google_maps_routes_v1_compute_routes_request_proto_init()
   154  	file_google_maps_routes_v1_compute_routes_response_proto_init()
   155  	file_google_maps_routes_v1_route_matrix_element_proto_init()
   156  	type x struct{}
   157  	out := protoimpl.TypeBuilder{
   158  		File: protoimpl.DescBuilder{
   159  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   160  			RawDescriptor: file_google_maps_routes_v1_route_service_proto_rawDesc,
   161  			NumEnums:      0,
   162  			NumMessages:   0,
   163  			NumExtensions: 0,
   164  			NumServices:   1,
   165  		},
   166  		GoTypes:           file_google_maps_routes_v1_route_service_proto_goTypes,
   167  		DependencyIndexes: file_google_maps_routes_v1_route_service_proto_depIdxs,
   168  	}.Build()
   169  	File_google_maps_routes_v1_route_service_proto = out.File
   170  	file_google_maps_routes_v1_route_service_proto_rawDesc = nil
   171  	file_google_maps_routes_v1_route_service_proto_goTypes = nil
   172  	file_google_maps_routes_v1_route_service_proto_depIdxs = nil
   173  }
   174  
   175  // Reference imports to suppress errors if they are not otherwise used.
   176  var _ context.Context
   177  var _ grpc.ClientConnInterface
   178  
   179  // This is a compile-time assertion to ensure that this generated file
   180  // is compatible with the grpc package it is being compiled against.
   181  const _ = grpc.SupportPackageIsVersion6
   182  
   183  // RoutesPreferredClient is the client API for RoutesPreferred service.
   184  //
   185  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   186  type RoutesPreferredClient interface {
   187  	// Returns the primary route along with optional alternate routes, given a set
   188  	// of terminal and intermediate waypoints.
   189  	//
   190  	// **NOTE:** This method requires that you specify a response field mask in
   191  	// the input. You can provide the response field mask by using URL parameter
   192  	// `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask`
   193  	// (see the [available URL parameters and
   194  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   195  	// is a comma separated list of field paths. See detailed documentation about
   196  	// [how to construct the field
   197  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   198  	//
   199  	// For example, in this method:
   200  	//
   201  	// * Field mask of all available fields (for manual inspection):
   202  	//   `X-Goog-FieldMask: *`
   203  	// * Field mask of Route-level duration, distance, and polyline (an example
   204  	// production setup):
   205  	//   `X-Goog-FieldMask:
   206  	//   routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline`
   207  	//
   208  	// Google discourage the use of the wildcard (`*`) response field mask, or
   209  	// specifying the field mask at the top level (`routes`), because:
   210  	//
   211  	// * Selecting only the fields that you need helps our server save computation
   212  	// cycles, allowing us to return the result to you with a lower latency.
   213  	// * Selecting only the fields that you need
   214  	// in your production job ensures stable latency performance. We might add
   215  	// more response fields in the future, and those new fields might require
   216  	// extra computation time. If you select all fields, or if you select all
   217  	// fields at the top level, then you might experience performance degradation
   218  	// because any new field we add will be automatically included in the
   219  	// response.
   220  	// * Selecting only the fields that you need results in a smaller response
   221  	// size, and thus higher network throughput.
   222  	ComputeRoutes(ctx context.Context, in *ComputeRoutesRequest, opts ...grpc.CallOption) (*ComputeRoutesResponse, error)
   223  	// Takes in a list of origins and destinations and returns a stream containing
   224  	// route information for each combination of origin and destination.
   225  	//
   226  	// **NOTE:** This method requires that you specify a response field mask in
   227  	// the input. You can provide the response field mask by using the URL
   228  	// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
   229  	// `X-Goog-FieldMask` (see the [available URL parameters and
   230  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   231  	// is a comma separated list of field paths. See this detailed documentation
   232  	// about [how to construct the field
   233  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   234  	//
   235  	// For example, in this method:
   236  	//
   237  	// * Field mask of all available fields (for manual inspection):
   238  	//   `X-Goog-FieldMask: *`
   239  	// * Field mask of route durations, distances, element status, condition, and
   240  	//   element indices (an example production setup):
   241  	//   `X-Goog-FieldMask:
   242  	//   originIndex,destinationIndex,status,condition,distanceMeters,duration`
   243  	//
   244  	// It is critical that you include `status` in your field mask as otherwise
   245  	// all messages will appear to be OK. Google discourages the use of the
   246  	// wildcard (`*`) response field mask, because:
   247  	//
   248  	// * Selecting only the fields that you need helps our server save computation
   249  	// cycles, allowing us to return the result to you with a lower latency.
   250  	// * Selecting only the fields that you need in your production job ensures
   251  	// stable latency performance. We might add more response fields in the
   252  	// future, and those new fields might require extra computation time. If you
   253  	// select all fields, or if you select all fields at the top level, then you
   254  	// might experience performance degradation because any new field we add will
   255  	// be automatically included in the response.
   256  	// * Selecting only the fields that you need results in a smaller response
   257  	// size, and thus higher network throughput.
   258  	ComputeRouteMatrix(ctx context.Context, in *ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesPreferred_ComputeRouteMatrixClient, error)
   259  	// Given a set of terminal and intermediate waypoints, and a route objective,
   260  	// computes the best route for the route objective. Also returns fastest route
   261  	// and shortest route as reference routes.
   262  	//
   263  	// **NOTE:** This method requires that you specify a response field mask in
   264  	// the input. You can provide the response field mask by using the URL
   265  	// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
   266  	// `X-Goog-FieldMask` (see the [available URL parameters and
   267  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   268  	// is a comma separated list of field paths. See this detailed documentation
   269  	// about [how to construct the field
   270  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   271  	//
   272  	// For example, in this method:
   273  	//
   274  	// * Field mask of all available fields (for manual inspection):
   275  	//   `X-Goog-FieldMask: *`
   276  	// * Field mask of route distances, durations, token and toll info:
   277  	//   `X-Goog-FieldMask:
   278  	//   routes.route.distanceMeters,routes.route.duration,routes.token,routes.route.travelAdvisory.tollInfo`
   279  	//
   280  	// Google discourages the use of the wildcard (`*`) response field mask, or
   281  	// specifying the field mask at the top level (`routes`), because:
   282  	//
   283  	// * Selecting only the fields that you need helps our server save computation
   284  	// cycles, allowing us to return the result to you with a lower latency.
   285  	// * Selecting only the fields that you need in your production job ensures
   286  	// stable latency performance. We might add more response fields in the
   287  	// future, and those new fields might require extra computation time. If you
   288  	// select all fields, or if you select all fields at the top level, then you
   289  	// might experience performance degradation because any new field we add will
   290  	// be automatically included in the response.
   291  	// * Selecting only the fields that you need results in a smaller response
   292  	// size, and thus higher network throughput.
   293  	ComputeCustomRoutes(ctx context.Context, in *ComputeCustomRoutesRequest, opts ...grpc.CallOption) (*ComputeCustomRoutesResponse, error)
   294  }
   295  
   296  type routesPreferredClient struct {
   297  	cc grpc.ClientConnInterface
   298  }
   299  
   300  func NewRoutesPreferredClient(cc grpc.ClientConnInterface) RoutesPreferredClient {
   301  	return &routesPreferredClient{cc}
   302  }
   303  
   304  func (c *routesPreferredClient) ComputeRoutes(ctx context.Context, in *ComputeRoutesRequest, opts ...grpc.CallOption) (*ComputeRoutesResponse, error) {
   305  	out := new(ComputeRoutesResponse)
   306  	err := c.cc.Invoke(ctx, "/google.maps.routes.v1.RoutesPreferred/ComputeRoutes", in, out, opts...)
   307  	if err != nil {
   308  		return nil, err
   309  	}
   310  	return out, nil
   311  }
   312  
   313  func (c *routesPreferredClient) ComputeRouteMatrix(ctx context.Context, in *ComputeRouteMatrixRequest, opts ...grpc.CallOption) (RoutesPreferred_ComputeRouteMatrixClient, error) {
   314  	stream, err := c.cc.NewStream(ctx, &_RoutesPreferred_serviceDesc.Streams[0], "/google.maps.routes.v1.RoutesPreferred/ComputeRouteMatrix", opts...)
   315  	if err != nil {
   316  		return nil, err
   317  	}
   318  	x := &routesPreferredComputeRouteMatrixClient{stream}
   319  	if err := x.ClientStream.SendMsg(in); err != nil {
   320  		return nil, err
   321  	}
   322  	if err := x.ClientStream.CloseSend(); err != nil {
   323  		return nil, err
   324  	}
   325  	return x, nil
   326  }
   327  
   328  type RoutesPreferred_ComputeRouteMatrixClient interface {
   329  	Recv() (*RouteMatrixElement, error)
   330  	grpc.ClientStream
   331  }
   332  
   333  type routesPreferredComputeRouteMatrixClient struct {
   334  	grpc.ClientStream
   335  }
   336  
   337  func (x *routesPreferredComputeRouteMatrixClient) Recv() (*RouteMatrixElement, error) {
   338  	m := new(RouteMatrixElement)
   339  	if err := x.ClientStream.RecvMsg(m); err != nil {
   340  		return nil, err
   341  	}
   342  	return m, nil
   343  }
   344  
   345  func (c *routesPreferredClient) ComputeCustomRoutes(ctx context.Context, in *ComputeCustomRoutesRequest, opts ...grpc.CallOption) (*ComputeCustomRoutesResponse, error) {
   346  	out := new(ComputeCustomRoutesResponse)
   347  	err := c.cc.Invoke(ctx, "/google.maps.routes.v1.RoutesPreferred/ComputeCustomRoutes", in, out, opts...)
   348  	if err != nil {
   349  		return nil, err
   350  	}
   351  	return out, nil
   352  }
   353  
   354  // RoutesPreferredServer is the server API for RoutesPreferred service.
   355  type RoutesPreferredServer interface {
   356  	// Returns the primary route along with optional alternate routes, given a set
   357  	// of terminal and intermediate waypoints.
   358  	//
   359  	// **NOTE:** This method requires that you specify a response field mask in
   360  	// the input. You can provide the response field mask by using URL parameter
   361  	// `$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask`
   362  	// (see the [available URL parameters and
   363  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   364  	// is a comma separated list of field paths. See detailed documentation about
   365  	// [how to construct the field
   366  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   367  	//
   368  	// For example, in this method:
   369  	//
   370  	// * Field mask of all available fields (for manual inspection):
   371  	//   `X-Goog-FieldMask: *`
   372  	// * Field mask of Route-level duration, distance, and polyline (an example
   373  	// production setup):
   374  	//   `X-Goog-FieldMask:
   375  	//   routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline`
   376  	//
   377  	// Google discourage the use of the wildcard (`*`) response field mask, or
   378  	// specifying the field mask at the top level (`routes`), because:
   379  	//
   380  	// * Selecting only the fields that you need helps our server save computation
   381  	// cycles, allowing us to return the result to you with a lower latency.
   382  	// * Selecting only the fields that you need
   383  	// in your production job ensures stable latency performance. We might add
   384  	// more response fields in the future, and those new fields might require
   385  	// extra computation time. If you select all fields, or if you select all
   386  	// fields at the top level, then you might experience performance degradation
   387  	// because any new field we add will be automatically included in the
   388  	// response.
   389  	// * Selecting only the fields that you need results in a smaller response
   390  	// size, and thus higher network throughput.
   391  	ComputeRoutes(context.Context, *ComputeRoutesRequest) (*ComputeRoutesResponse, error)
   392  	// Takes in a list of origins and destinations and returns a stream containing
   393  	// route information for each combination of origin and destination.
   394  	//
   395  	// **NOTE:** This method requires that you specify a response field mask in
   396  	// the input. You can provide the response field mask by using the URL
   397  	// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
   398  	// `X-Goog-FieldMask` (see the [available URL parameters and
   399  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   400  	// is a comma separated list of field paths. See this detailed documentation
   401  	// about [how to construct the field
   402  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   403  	//
   404  	// For example, in this method:
   405  	//
   406  	// * Field mask of all available fields (for manual inspection):
   407  	//   `X-Goog-FieldMask: *`
   408  	// * Field mask of route durations, distances, element status, condition, and
   409  	//   element indices (an example production setup):
   410  	//   `X-Goog-FieldMask:
   411  	//   originIndex,destinationIndex,status,condition,distanceMeters,duration`
   412  	//
   413  	// It is critical that you include `status` in your field mask as otherwise
   414  	// all messages will appear to be OK. Google discourages the use of the
   415  	// wildcard (`*`) response field mask, because:
   416  	//
   417  	// * Selecting only the fields that you need helps our server save computation
   418  	// cycles, allowing us to return the result to you with a lower latency.
   419  	// * Selecting only the fields that you need in your production job ensures
   420  	// stable latency performance. We might add more response fields in the
   421  	// future, and those new fields might require extra computation time. If you
   422  	// select all fields, or if you select all fields at the top level, then you
   423  	// might experience performance degradation because any new field we add will
   424  	// be automatically included in the response.
   425  	// * Selecting only the fields that you need results in a smaller response
   426  	// size, and thus higher network throughput.
   427  	ComputeRouteMatrix(*ComputeRouteMatrixRequest, RoutesPreferred_ComputeRouteMatrixServer) error
   428  	// Given a set of terminal and intermediate waypoints, and a route objective,
   429  	// computes the best route for the route objective. Also returns fastest route
   430  	// and shortest route as reference routes.
   431  	//
   432  	// **NOTE:** This method requires that you specify a response field mask in
   433  	// the input. You can provide the response field mask by using the URL
   434  	// parameter `$fields` or `fields`, or by using the HTTP/gRPC header
   435  	// `X-Goog-FieldMask` (see the [available URL parameters and
   436  	// headers](https://cloud.google.com/apis/docs/system-parameters). The value
   437  	// is a comma separated list of field paths. See this detailed documentation
   438  	// about [how to construct the field
   439  	// paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
   440  	//
   441  	// For example, in this method:
   442  	//
   443  	// * Field mask of all available fields (for manual inspection):
   444  	//   `X-Goog-FieldMask: *`
   445  	// * Field mask of route distances, durations, token and toll info:
   446  	//   `X-Goog-FieldMask:
   447  	//   routes.route.distanceMeters,routes.route.duration,routes.token,routes.route.travelAdvisory.tollInfo`
   448  	//
   449  	// Google discourages the use of the wildcard (`*`) response field mask, or
   450  	// specifying the field mask at the top level (`routes`), because:
   451  	//
   452  	// * Selecting only the fields that you need helps our server save computation
   453  	// cycles, allowing us to return the result to you with a lower latency.
   454  	// * Selecting only the fields that you need in your production job ensures
   455  	// stable latency performance. We might add more response fields in the
   456  	// future, and those new fields might require extra computation time. If you
   457  	// select all fields, or if you select all fields at the top level, then you
   458  	// might experience performance degradation because any new field we add will
   459  	// be automatically included in the response.
   460  	// * Selecting only the fields that you need results in a smaller response
   461  	// size, and thus higher network throughput.
   462  	ComputeCustomRoutes(context.Context, *ComputeCustomRoutesRequest) (*ComputeCustomRoutesResponse, error)
   463  }
   464  
   465  // UnimplementedRoutesPreferredServer can be embedded to have forward compatible implementations.
   466  type UnimplementedRoutesPreferredServer struct {
   467  }
   468  
   469  func (*UnimplementedRoutesPreferredServer) ComputeRoutes(context.Context, *ComputeRoutesRequest) (*ComputeRoutesResponse, error) {
   470  	return nil, status.Errorf(codes.Unimplemented, "method ComputeRoutes not implemented")
   471  }
   472  func (*UnimplementedRoutesPreferredServer) ComputeRouteMatrix(*ComputeRouteMatrixRequest, RoutesPreferred_ComputeRouteMatrixServer) error {
   473  	return status.Errorf(codes.Unimplemented, "method ComputeRouteMatrix not implemented")
   474  }
   475  func (*UnimplementedRoutesPreferredServer) ComputeCustomRoutes(context.Context, *ComputeCustomRoutesRequest) (*ComputeCustomRoutesResponse, error) {
   476  	return nil, status.Errorf(codes.Unimplemented, "method ComputeCustomRoutes not implemented")
   477  }
   478  
   479  func RegisterRoutesPreferredServer(s *grpc.Server, srv RoutesPreferredServer) {
   480  	s.RegisterService(&_RoutesPreferred_serviceDesc, srv)
   481  }
   482  
   483  func _RoutesPreferred_ComputeRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   484  	in := new(ComputeRoutesRequest)
   485  	if err := dec(in); err != nil {
   486  		return nil, err
   487  	}
   488  	if interceptor == nil {
   489  		return srv.(RoutesPreferredServer).ComputeRoutes(ctx, in)
   490  	}
   491  	info := &grpc.UnaryServerInfo{
   492  		Server:     srv,
   493  		FullMethod: "/google.maps.routes.v1.RoutesPreferred/ComputeRoutes",
   494  	}
   495  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   496  		return srv.(RoutesPreferredServer).ComputeRoutes(ctx, req.(*ComputeRoutesRequest))
   497  	}
   498  	return interceptor(ctx, in, info, handler)
   499  }
   500  
   501  func _RoutesPreferred_ComputeRouteMatrix_Handler(srv interface{}, stream grpc.ServerStream) error {
   502  	m := new(ComputeRouteMatrixRequest)
   503  	if err := stream.RecvMsg(m); err != nil {
   504  		return err
   505  	}
   506  	return srv.(RoutesPreferredServer).ComputeRouteMatrix(m, &routesPreferredComputeRouteMatrixServer{stream})
   507  }
   508  
   509  type RoutesPreferred_ComputeRouteMatrixServer interface {
   510  	Send(*RouteMatrixElement) error
   511  	grpc.ServerStream
   512  }
   513  
   514  type routesPreferredComputeRouteMatrixServer struct {
   515  	grpc.ServerStream
   516  }
   517  
   518  func (x *routesPreferredComputeRouteMatrixServer) Send(m *RouteMatrixElement) error {
   519  	return x.ServerStream.SendMsg(m)
   520  }
   521  
   522  func _RoutesPreferred_ComputeCustomRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   523  	in := new(ComputeCustomRoutesRequest)
   524  	if err := dec(in); err != nil {
   525  		return nil, err
   526  	}
   527  	if interceptor == nil {
   528  		return srv.(RoutesPreferredServer).ComputeCustomRoutes(ctx, in)
   529  	}
   530  	info := &grpc.UnaryServerInfo{
   531  		Server:     srv,
   532  		FullMethod: "/google.maps.routes.v1.RoutesPreferred/ComputeCustomRoutes",
   533  	}
   534  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   535  		return srv.(RoutesPreferredServer).ComputeCustomRoutes(ctx, req.(*ComputeCustomRoutesRequest))
   536  	}
   537  	return interceptor(ctx, in, info, handler)
   538  }
   539  
   540  var _RoutesPreferred_serviceDesc = grpc.ServiceDesc{
   541  	ServiceName: "google.maps.routes.v1.RoutesPreferred",
   542  	HandlerType: (*RoutesPreferredServer)(nil),
   543  	Methods: []grpc.MethodDesc{
   544  		{
   545  			MethodName: "ComputeRoutes",
   546  			Handler:    _RoutesPreferred_ComputeRoutes_Handler,
   547  		},
   548  		{
   549  			MethodName: "ComputeCustomRoutes",
   550  			Handler:    _RoutesPreferred_ComputeCustomRoutes_Handler,
   551  		},
   552  	},
   553  	Streams: []grpc.StreamDesc{
   554  		{
   555  			StreamName:    "ComputeRouteMatrix",
   556  			Handler:       _RoutesPreferred_ComputeRouteMatrix_Handler,
   557  			ServerStreams: true,
   558  		},
   559  	},
   560  	Metadata: "google/maps/routes/v1/route_service.proto",
   561  }
   562  

View as plain text