1// Copyright 2021 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/fallback_info.proto 20 21package routes 22 23import ( 24 reflect "reflect" 25 sync "sync" 26 27 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 28 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 29) 30 31const ( 32 // Verify that this generated code is sufficiently up-to-date. 33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 34 // Verify that runtime/protoimpl is sufficiently up-to-date. 35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 36) 37 38// Reasons for using fallback response. 39type FallbackReason int32 40 41const ( 42 // No fallback reason specified. 43 FallbackReason_FALLBACK_REASON_UNSPECIFIED FallbackReason = 0 44 // A server error happened while calculating routes with your preferred 45 // routing mode, but we were able to return a result calculated by an 46 // alternative mode. 47 FallbackReason_SERVER_ERROR FallbackReason = 1 48 // We were not able to finish the calculation with your preferred routing mode 49 // on time, but we were able to return a result calculated by an alternative 50 // mode. 51 FallbackReason_LATENCY_EXCEEDED FallbackReason = 2 52) 53 54// Enum value maps for FallbackReason. 55var ( 56 FallbackReason_name = map[int32]string{ 57 0: "FALLBACK_REASON_UNSPECIFIED", 58 1: "SERVER_ERROR", 59 2: "LATENCY_EXCEEDED", 60 } 61 FallbackReason_value = map[string]int32{ 62 "FALLBACK_REASON_UNSPECIFIED": 0, 63 "SERVER_ERROR": 1, 64 "LATENCY_EXCEEDED": 2, 65 } 66) 67 68func (x FallbackReason) Enum() *FallbackReason { 69 p := new(FallbackReason) 70 *p = x 71 return p 72} 73 74func (x FallbackReason) String() string { 75 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 76} 77 78func (FallbackReason) Descriptor() protoreflect.EnumDescriptor { 79 return file_google_maps_routes_v1_fallback_info_proto_enumTypes[0].Descriptor() 80} 81 82func (FallbackReason) Type() protoreflect.EnumType { 83 return &file_google_maps_routes_v1_fallback_info_proto_enumTypes[0] 84} 85 86func (x FallbackReason) Number() protoreflect.EnumNumber { 87 return protoreflect.EnumNumber(x) 88} 89 90// Deprecated: Use FallbackReason.Descriptor instead. 91func (FallbackReason) EnumDescriptor() ([]byte, []int) { 92 return file_google_maps_routes_v1_fallback_info_proto_rawDescGZIP(), []int{0} 93} 94 95// Actual routing mode used for returned fallback response. 96type FallbackRoutingMode int32 97 98const ( 99 // Not used. 100 FallbackRoutingMode_FALLBACK_ROUTING_MODE_UNSPECIFIED FallbackRoutingMode = 0 101 // Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the 102 // response. 103 FallbackRoutingMode_FALLBACK_TRAFFIC_UNAWARE FallbackRoutingMode = 1 104 // Indicates the "TRAFFIC_AWARE" routing mode was used to compute the 105 // response. 106 FallbackRoutingMode_FALLBACK_TRAFFIC_AWARE FallbackRoutingMode = 2 107) 108 109// Enum value maps for FallbackRoutingMode. 110var ( 111 FallbackRoutingMode_name = map[int32]string{ 112 0: "FALLBACK_ROUTING_MODE_UNSPECIFIED", 113 1: "FALLBACK_TRAFFIC_UNAWARE", 114 2: "FALLBACK_TRAFFIC_AWARE", 115 } 116 FallbackRoutingMode_value = map[string]int32{ 117 "FALLBACK_ROUTING_MODE_UNSPECIFIED": 0, 118 "FALLBACK_TRAFFIC_UNAWARE": 1, 119 "FALLBACK_TRAFFIC_AWARE": 2, 120 } 121) 122 123func (x FallbackRoutingMode) Enum() *FallbackRoutingMode { 124 p := new(FallbackRoutingMode) 125 *p = x 126 return p 127} 128 129func (x FallbackRoutingMode) String() string { 130 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 131} 132 133func (FallbackRoutingMode) Descriptor() protoreflect.EnumDescriptor { 134 return file_google_maps_routes_v1_fallback_info_proto_enumTypes[1].Descriptor() 135} 136 137func (FallbackRoutingMode) Type() protoreflect.EnumType { 138 return &file_google_maps_routes_v1_fallback_info_proto_enumTypes[1] 139} 140 141func (x FallbackRoutingMode) Number() protoreflect.EnumNumber { 142 return protoreflect.EnumNumber(x) 143} 144 145// Deprecated: Use FallbackRoutingMode.Descriptor instead. 146func (FallbackRoutingMode) EnumDescriptor() ([]byte, []int) { 147 return file_google_maps_routes_v1_fallback_info_proto_rawDescGZIP(), []int{1} 148} 149 150// Information related to how and why a fallback result was used. If this field 151// is set, then it means the server used a different routing mode from your 152// preferred mode as fallback. 153type FallbackInfo struct { 154 state protoimpl.MessageState 155 sizeCache protoimpl.SizeCache 156 unknownFields protoimpl.UnknownFields 157 158 // Routing mode used for the response. If fallback was triggered, the mode 159 // may be different from routing preference set in the original client 160 // request. 161 RoutingMode FallbackRoutingMode `protobuf:"varint,1,opt,name=routing_mode,json=routingMode,proto3,enum=google.maps.routes.v1.FallbackRoutingMode" json:"routing_mode,omitempty"` 162 // The reason why fallback response was used instead of the original response. 163 // This field is only populated when the fallback mode is triggered and the 164 // fallback response is returned. 165 Reason FallbackReason `protobuf:"varint,2,opt,name=reason,proto3,enum=google.maps.routes.v1.FallbackReason" json:"reason,omitempty"` 166} 167 168func (x *FallbackInfo) Reset() { 169 *x = FallbackInfo{} 170 if protoimpl.UnsafeEnabled { 171 mi := &file_google_maps_routes_v1_fallback_info_proto_msgTypes[0] 172 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 173 ms.StoreMessageInfo(mi) 174 } 175} 176 177func (x *FallbackInfo) String() string { 178 return protoimpl.X.MessageStringOf(x) 179} 180 181func (*FallbackInfo) ProtoMessage() {} 182 183func (x *FallbackInfo) ProtoReflect() protoreflect.Message { 184 mi := &file_google_maps_routes_v1_fallback_info_proto_msgTypes[0] 185 if protoimpl.UnsafeEnabled && x != nil { 186 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 187 if ms.LoadMessageInfo() == nil { 188 ms.StoreMessageInfo(mi) 189 } 190 return ms 191 } 192 return mi.MessageOf(x) 193} 194 195// Deprecated: Use FallbackInfo.ProtoReflect.Descriptor instead. 196func (*FallbackInfo) Descriptor() ([]byte, []int) { 197 return file_google_maps_routes_v1_fallback_info_proto_rawDescGZIP(), []int{0} 198} 199 200func (x *FallbackInfo) GetRoutingMode() FallbackRoutingMode { 201 if x != nil { 202 return x.RoutingMode 203 } 204 return FallbackRoutingMode_FALLBACK_ROUTING_MODE_UNSPECIFIED 205} 206 207func (x *FallbackInfo) GetReason() FallbackReason { 208 if x != nil { 209 return x.Reason 210 } 211 return FallbackReason_FALLBACK_REASON_UNSPECIFIED 212} 213 214var File_google_maps_routes_v1_fallback_info_proto protoreflect.FileDescriptor 215 216var file_google_maps_routes_v1_fallback_info_proto_rawDesc = []byte{ 217 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 218 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 219 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 220 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 221 0x76, 0x31, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 222 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 223 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 224 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 225 0x31, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 226 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 227 0x64, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 228 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 229 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 230 0x61, 0x63, 0x6b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 231 0x6e, 0x2a, 0x59, 0x0a, 0x0e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x61, 232 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x5f, 233 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 234 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x45, 235 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x41, 0x54, 0x45, 0x4e, 0x43, 236 0x59, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x76, 0x0a, 0x13, 237 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4d, 238 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x5f, 239 0x52, 0x4f, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 240 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 241 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, 0x5f, 0x55, 242 0x4e, 0x41, 0x57, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x4c, 0x4c, 243 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, 0x5f, 0x41, 0x57, 0x41, 244 0x52, 0x45, 0x10, 0x02, 0x42, 0xa7, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 245 0x67, 0x6c, 0x65, 0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 246 0x76, 0x31, 0x42, 0x11, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 247 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 248 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 249 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, 250 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 251 0x75, 0x74, 0x65, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x4d, 0x52, 0x53, 0xaa, 0x02, 252 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x52, 0x6f, 0x75, 253 0x74, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 254 0x4d, 0x61, 0x70, 0x73, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, 255 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 256} 257 258var ( 259 file_google_maps_routes_v1_fallback_info_proto_rawDescOnce sync.Once 260 file_google_maps_routes_v1_fallback_info_proto_rawDescData = file_google_maps_routes_v1_fallback_info_proto_rawDesc 261) 262 263func file_google_maps_routes_v1_fallback_info_proto_rawDescGZIP() []byte { 264 file_google_maps_routes_v1_fallback_info_proto_rawDescOnce.Do(func() { 265 file_google_maps_routes_v1_fallback_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_maps_routes_v1_fallback_info_proto_rawDescData) 266 }) 267 return file_google_maps_routes_v1_fallback_info_proto_rawDescData 268} 269 270var file_google_maps_routes_v1_fallback_info_proto_enumTypes = make([]protoimpl.EnumInfo, 2) 271var file_google_maps_routes_v1_fallback_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 272var file_google_maps_routes_v1_fallback_info_proto_goTypes = []interface{}{ 273 (FallbackReason)(0), // 0: google.maps.routes.v1.FallbackReason 274 (FallbackRoutingMode)(0), // 1: google.maps.routes.v1.FallbackRoutingMode 275 (*FallbackInfo)(nil), // 2: google.maps.routes.v1.FallbackInfo 276} 277var file_google_maps_routes_v1_fallback_info_proto_depIdxs = []int32{ 278 1, // 0: google.maps.routes.v1.FallbackInfo.routing_mode:type_name -> google.maps.routes.v1.FallbackRoutingMode 279 0, // 1: google.maps.routes.v1.FallbackInfo.reason:type_name -> google.maps.routes.v1.FallbackReason 280 2, // [2:2] is the sub-list for method output_type 281 2, // [2:2] is the sub-list for method input_type 282 2, // [2:2] is the sub-list for extension type_name 283 2, // [2:2] is the sub-list for extension extendee 284 0, // [0:2] is the sub-list for field type_name 285} 286 287func init() { file_google_maps_routes_v1_fallback_info_proto_init() } 288func file_google_maps_routes_v1_fallback_info_proto_init() { 289 if File_google_maps_routes_v1_fallback_info_proto != nil { 290 return 291 } 292 if !protoimpl.UnsafeEnabled { 293 file_google_maps_routes_v1_fallback_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 294 switch v := v.(*FallbackInfo); i { 295 case 0: 296 return &v.state 297 case 1: 298 return &v.sizeCache 299 case 2: 300 return &v.unknownFields 301 default: 302 return nil 303 } 304 } 305 } 306 type x struct{} 307 out := protoimpl.TypeBuilder{ 308 File: protoimpl.DescBuilder{ 309 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 310 RawDescriptor: file_google_maps_routes_v1_fallback_info_proto_rawDesc, 311 NumEnums: 2, 312 NumMessages: 1, 313 NumExtensions: 0, 314 NumServices: 0, 315 }, 316 GoTypes: file_google_maps_routes_v1_fallback_info_proto_goTypes, 317 DependencyIndexes: file_google_maps_routes_v1_fallback_info_proto_depIdxs, 318 EnumInfos: file_google_maps_routes_v1_fallback_info_proto_enumTypes, 319 MessageInfos: file_google_maps_routes_v1_fallback_info_proto_msgTypes, 320 }.Build() 321 File_google_maps_routes_v1_fallback_info_proto = out.File 322 file_google_maps_routes_v1_fallback_info_proto_rawDesc = nil 323 file_google_maps_routes_v1_fallback_info_proto_goTypes = nil 324 file_google_maps_routes_v1_fallback_info_proto_depIdxs = nil 325} 326