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/waypoint.proto
20
21package routes
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	latlng "google.golang.org/genproto/googleapis/type/latlng"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
31)
32
33const (
34	// Verify that this generated code is sufficiently up-to-date.
35	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
36	// Verify that runtime/protoimpl is sufficiently up-to-date.
37	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
38)
39
40// Encapsulates a waypoint. Waypoints mark both the beginning and end of a
41// route, and include intermediate stops along the route.
42type Waypoint struct {
43	state         protoimpl.MessageState
44	sizeCache     protoimpl.SizeCache
45	unknownFields protoimpl.UnknownFields
46
47	// Different ways to represent a location.
48	//
49	// Types that are assignable to LocationType:
50	//	*Waypoint_Location
51	//	*Waypoint_PlaceId
52	LocationType isWaypoint_LocationType `protobuf_oneof:"location_type"`
53	// Marks this waypoint as a milestone, as opposed to a stopping point. For
54	// each non-via waypoint in the request, the response appends an entry to the
55	// `legs` array to provide the details for stopovers on that leg of the
56	// trip. Set this value to true when you want the route to pass through this
57	// waypoint without stopping over. Via waypoints don't cause an entry to be
58	// added to the `legs` array, but they do route the journey through the
59	// waypoint. You can only set this value on waypoints that are intermediates.
60	// If you set this field on terminal waypoints, then the request fails.
61	Via bool `protobuf:"varint,3,opt,name=via,proto3" json:"via,omitempty"`
62	// Indicates that the waypoint is meant for vehicles to stop at, where the
63	// intention is to either pickup or drop-off. When you set this value, the
64	// calculated route won't include non-`via` waypoints on roads that are
65	// unsuitable for pickup and drop-off. This option works only for `DRIVE` and
66	// `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
67	VehicleStopover bool `protobuf:"varint,4,opt,name=vehicle_stopover,json=vehicleStopover,proto3" json:"vehicle_stopover,omitempty"`
68	// Indicates that the location of this waypoint is meant to have a preference
69	// for the vehicle to stop at a particular side of road. When you set this
70	// value, the route will pass through the location so that the vehicle can
71	// stop at the side of road that the location is biased towards from the
72	// center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
73	// travel modes, and when the 'location_type' is set to 'location'.
74	SideOfRoad bool `protobuf:"varint,5,opt,name=side_of_road,json=sideOfRoad,proto3" json:"side_of_road,omitempty"`
75}
76
77func (x *Waypoint) Reset() {
78	*x = Waypoint{}
79	if protoimpl.UnsafeEnabled {
80		mi := &file_google_maps_routes_v1_waypoint_proto_msgTypes[0]
81		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
82		ms.StoreMessageInfo(mi)
83	}
84}
85
86func (x *Waypoint) String() string {
87	return protoimpl.X.MessageStringOf(x)
88}
89
90func (*Waypoint) ProtoMessage() {}
91
92func (x *Waypoint) ProtoReflect() protoreflect.Message {
93	mi := &file_google_maps_routes_v1_waypoint_proto_msgTypes[0]
94	if protoimpl.UnsafeEnabled && x != nil {
95		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
96		if ms.LoadMessageInfo() == nil {
97			ms.StoreMessageInfo(mi)
98		}
99		return ms
100	}
101	return mi.MessageOf(x)
102}
103
104// Deprecated: Use Waypoint.ProtoReflect.Descriptor instead.
105func (*Waypoint) Descriptor() ([]byte, []int) {
106	return file_google_maps_routes_v1_waypoint_proto_rawDescGZIP(), []int{0}
107}
108
109func (m *Waypoint) GetLocationType() isWaypoint_LocationType {
110	if m != nil {
111		return m.LocationType
112	}
113	return nil
114}
115
116func (x *Waypoint) GetLocation() *Location {
117	if x, ok := x.GetLocationType().(*Waypoint_Location); ok {
118		return x.Location
119	}
120	return nil
121}
122
123func (x *Waypoint) GetPlaceId() string {
124	if x, ok := x.GetLocationType().(*Waypoint_PlaceId); ok {
125		return x.PlaceId
126	}
127	return ""
128}
129
130func (x *Waypoint) GetVia() bool {
131	if x != nil {
132		return x.Via
133	}
134	return false
135}
136
137func (x *Waypoint) GetVehicleStopover() bool {
138	if x != nil {
139		return x.VehicleStopover
140	}
141	return false
142}
143
144func (x *Waypoint) GetSideOfRoad() bool {
145	if x != nil {
146		return x.SideOfRoad
147	}
148	return false
149}
150
151type isWaypoint_LocationType interface {
152	isWaypoint_LocationType()
153}
154
155type Waypoint_Location struct {
156	// A point specified using geographic coordinates, including an optional
157	// heading.
158	Location *Location `protobuf:"bytes,1,opt,name=location,proto3,oneof"`
159}
160
161type Waypoint_PlaceId struct {
162	// The POI Place ID associated with the waypoint.
163	PlaceId string `protobuf:"bytes,2,opt,name=place_id,json=placeId,proto3,oneof"`
164}
165
166func (*Waypoint_Location) isWaypoint_LocationType() {}
167
168func (*Waypoint_PlaceId) isWaypoint_LocationType() {}
169
170// Encapsulates a location (a geographic point, and an optional heading).
171type Location struct {
172	state         protoimpl.MessageState
173	sizeCache     protoimpl.SizeCache
174	unknownFields protoimpl.UnknownFields
175
176	// The waypoint's geographic coordinates.
177	LatLng *latlng.LatLng `protobuf:"bytes,1,opt,name=lat_lng,json=latLng,proto3" json:"lat_lng,omitempty"`
178	// The compass heading associated with the direction of the flow of traffic.
179	// This value is used to specify the side of the road to use for pickup and
180	// drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
181	// of due North, 90 specifies a heading of due East, etc. You can use this
182	// field only for `DRIVE` and `TWO_WHEELER` travel modes.
183	Heading *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=heading,proto3" json:"heading,omitempty"`
184}
185
186func (x *Location) Reset() {
187	*x = Location{}
188	if protoimpl.UnsafeEnabled {
189		mi := &file_google_maps_routes_v1_waypoint_proto_msgTypes[1]
190		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
191		ms.StoreMessageInfo(mi)
192	}
193}
194
195func (x *Location) String() string {
196	return protoimpl.X.MessageStringOf(x)
197}
198
199func (*Location) ProtoMessage() {}
200
201func (x *Location) ProtoReflect() protoreflect.Message {
202	mi := &file_google_maps_routes_v1_waypoint_proto_msgTypes[1]
203	if protoimpl.UnsafeEnabled && x != nil {
204		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
205		if ms.LoadMessageInfo() == nil {
206			ms.StoreMessageInfo(mi)
207		}
208		return ms
209	}
210	return mi.MessageOf(x)
211}
212
213// Deprecated: Use Location.ProtoReflect.Descriptor instead.
214func (*Location) Descriptor() ([]byte, []int) {
215	return file_google_maps_routes_v1_waypoint_proto_rawDescGZIP(), []int{1}
216}
217
218func (x *Location) GetLatLng() *latlng.LatLng {
219	if x != nil {
220		return x.LatLng
221	}
222	return nil
223}
224
225func (x *Location) GetHeading() *wrapperspb.Int32Value {
226	if x != nil {
227		return x.Heading
228	}
229	return nil
230}
231
232var File_google_maps_routes_v1_waypoint_proto protoreflect.FileDescriptor
233
234var file_google_maps_routes_v1_waypoint_proto_rawDesc = []byte{
235	0x0a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f,
236	0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74,
237	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6d,
238	0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67,
239	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77,
240	0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67,
241	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6c, 0x61, 0x74, 0x6c, 0x6e,
242	0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x08, 0x57, 0x61, 0x79, 0x70,
243	0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
244	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
245	0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c,
246	0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74,
247	0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
248	0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x49, 0x64,
249	0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76,
250	0x69, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x74,
251	0x6f, 0x70, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x76, 0x65,
252	0x68, 0x69, 0x63, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a,
253	0x0c, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20,
254	0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x69, 0x64, 0x65, 0x4f, 0x66, 0x52, 0x6f, 0x61, 0x64, 0x42,
255	0x0f, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65,
256	0x22, 0x6f, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x07,
257	0x6c, 0x61, 0x74, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
258	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4c, 0x61, 0x74, 0x4c,
259	0x6e, 0x67, 0x52, 0x06, 0x6c, 0x61, 0x74, 0x4c, 0x6e, 0x67, 0x12, 0x35, 0x0a, 0x07, 0x68, 0x65,
260	0x61, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f,
261	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e,
262	0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e,
263	0x67, 0x42, 0xa3, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
264	0x2e, 0x6d, 0x61, 0x70, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x42,
265	0x0d, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
266	0x5a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e,
267	0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f,
268	0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x75,
269	0x74, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0xf8, 0x01, 0x01,
270	0xa2, 0x02, 0x04, 0x47, 0x4d, 0x52, 0x53, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
271	0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca,
272	0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x4d, 0x61, 0x70, 0x73, 0x5c, 0x52, 0x6f,
273	0x75, 0x74, 0x65, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
274}
275
276var (
277	file_google_maps_routes_v1_waypoint_proto_rawDescOnce sync.Once
278	file_google_maps_routes_v1_waypoint_proto_rawDescData = file_google_maps_routes_v1_waypoint_proto_rawDesc
279)
280
281func file_google_maps_routes_v1_waypoint_proto_rawDescGZIP() []byte {
282	file_google_maps_routes_v1_waypoint_proto_rawDescOnce.Do(func() {
283		file_google_maps_routes_v1_waypoint_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_maps_routes_v1_waypoint_proto_rawDescData)
284	})
285	return file_google_maps_routes_v1_waypoint_proto_rawDescData
286}
287
288var file_google_maps_routes_v1_waypoint_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
289var file_google_maps_routes_v1_waypoint_proto_goTypes = []interface{}{
290	(*Waypoint)(nil),              // 0: google.maps.routes.v1.Waypoint
291	(*Location)(nil),              // 1: google.maps.routes.v1.Location
292	(*latlng.LatLng)(nil),         // 2: google.type.LatLng
293	(*wrapperspb.Int32Value)(nil), // 3: google.protobuf.Int32Value
294}
295var file_google_maps_routes_v1_waypoint_proto_depIdxs = []int32{
296	1, // 0: google.maps.routes.v1.Waypoint.location:type_name -> google.maps.routes.v1.Location
297	2, // 1: google.maps.routes.v1.Location.lat_lng:type_name -> google.type.LatLng
298	3, // 2: google.maps.routes.v1.Location.heading:type_name -> google.protobuf.Int32Value
299	3, // [3:3] is the sub-list for method output_type
300	3, // [3:3] is the sub-list for method input_type
301	3, // [3:3] is the sub-list for extension type_name
302	3, // [3:3] is the sub-list for extension extendee
303	0, // [0:3] is the sub-list for field type_name
304}
305
306func init() { file_google_maps_routes_v1_waypoint_proto_init() }
307func file_google_maps_routes_v1_waypoint_proto_init() {
308	if File_google_maps_routes_v1_waypoint_proto != nil {
309		return
310	}
311	if !protoimpl.UnsafeEnabled {
312		file_google_maps_routes_v1_waypoint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
313			switch v := v.(*Waypoint); i {
314			case 0:
315				return &v.state
316			case 1:
317				return &v.sizeCache
318			case 2:
319				return &v.unknownFields
320			default:
321				return nil
322			}
323		}
324		file_google_maps_routes_v1_waypoint_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
325			switch v := v.(*Location); i {
326			case 0:
327				return &v.state
328			case 1:
329				return &v.sizeCache
330			case 2:
331				return &v.unknownFields
332			default:
333				return nil
334			}
335		}
336	}
337	file_google_maps_routes_v1_waypoint_proto_msgTypes[0].OneofWrappers = []interface{}{
338		(*Waypoint_Location)(nil),
339		(*Waypoint_PlaceId)(nil),
340	}
341	type x struct{}
342	out := protoimpl.TypeBuilder{
343		File: protoimpl.DescBuilder{
344			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
345			RawDescriptor: file_google_maps_routes_v1_waypoint_proto_rawDesc,
346			NumEnums:      0,
347			NumMessages:   2,
348			NumExtensions: 0,
349			NumServices:   0,
350		},
351		GoTypes:           file_google_maps_routes_v1_waypoint_proto_goTypes,
352		DependencyIndexes: file_google_maps_routes_v1_waypoint_proto_depIdxs,
353		MessageInfos:      file_google_maps_routes_v1_waypoint_proto_msgTypes,
354	}.Build()
355	File_google_maps_routes_v1_waypoint_proto = out.File
356	file_google_maps_routes_v1_waypoint_proto_rawDesc = nil
357	file_google_maps_routes_v1_waypoint_proto_goTypes = nil
358	file_google_maps_routes_v1_waypoint_proto_depIdxs = nil
359}
360