...

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

View as plain text