regular routes journeys, persistent KV to store return states, ...

This commit is contained in:
Arnaud Delcasse 2023-04-03 20:35:12 +02:00
parent 0ae5730e7f
commit 2f536dfb19
21 changed files with 1722 additions and 1070 deletions

View File

@ -14,7 +14,7 @@ func (h *CarpoolServiceHandler) Book(booking ocss.Booking) (*internal.Booking, e
futureBooking.Roles = []string{} futureBooking.Roles = []string{}
if booking.Driver.Operator == "ridygo.fr" { if booking.Driver.Operator == "ridygo.fr" {
futureBooking.Roles = append(futureBooking.Roles, "driver") futureBooking.Roles = append(futureBooking.Roles, "driver")
previous_search_result, err := h.Storage.GetSearchResult("driver", booking.DriverJourneyID) previous_search_result, err := h.Storage.GetSearchResult(booking.DriverJourneyID)
if err == nil { if err == nil {
futureBooking.DriverJourney = &internal.PlannedJourney{ futureBooking.DriverJourney = &internal.PlannedJourney{
Route: internal.RegularRoute(*previous_search_result.Route), Route: internal.RegularRoute(*previous_search_result.Route),
@ -25,7 +25,7 @@ func (h *CarpoolServiceHandler) Book(booking ocss.Booking) (*internal.Booking, e
if booking.Passenger.Operator == "ridygo.fr" { if booking.Passenger.Operator == "ridygo.fr" {
futureBooking.Roles = append(futureBooking.Roles, "passenger") futureBooking.Roles = append(futureBooking.Roles, "passenger")
previous_search_result, err := h.Storage.GetSearchResult("passenger", booking.PassengerJourneyID) previous_search_result, err := h.Storage.GetSearchResult(booking.PassengerJourneyID)
if err == nil { if err == nil {
futureBooking.PassengerJourney = &internal.PlannedJourney{ futureBooking.PassengerJourney = &internal.PlannedJourney{
Route: internal.RegularRoute(*previous_search_result.Route), Route: internal.RegularRoute(*previous_search_result.Route),

View File

@ -78,6 +78,8 @@ func (h *CarpoolServiceHandler) GetUserPlanning(userid string, minDepartureDate
return nil, err return nil, err
} }
all_schedules := []internal.PlannedRouteSchedule{}
for _, r := range routes { for _, r := range routes {
rr := internal.RegularRoute(*r) rr := internal.RegularRoute(*r)
schedules, err := rr.PlannedJourneySchedules(minDepartureDate, maxDepartureDate) schedules, err := rr.PlannedJourneySchedules(minDepartureDate, maxDepartureDate)
@ -86,6 +88,8 @@ func (h *CarpoolServiceHandler) GetUserPlanning(userid string, minDepartureDate
return nil, err return nil, err
} }
all_schedules = append(all_schedules, schedules...)
for _, s := range schedules { for _, s := range schedules {
log.Debug(). log.Debug().
Str("route id", s.Route.ExtraMembers.MustString("id")). Str("route id", s.Route.ExtraMembers.MustString("id")).
@ -97,5 +101,13 @@ func (h *CarpoolServiceHandler) GetUserPlanning(userid string, minDepartureDate
} }
} }
if len(all_schedules) > 0 {
err = h.Storage.StoreRouteSchedules(all_schedules)
if err != nil {
log.Error().Err(err).Msg("could not store route schedules")
return nil, err
}
}
return results, nil return results, nil
} }

View File

@ -49,8 +49,6 @@ func (h *CarpoolServiceHandler) GetDriverJourneys(departure orb.Point, arrival o
return nil, err return nil, err
} }
log.Debug().Any("tileset", tileset).Msg("got tileset")
candidate_routes := tileset.GetTiledRoutes() candidate_routes := tileset.GetTiledRoutes()
journeys := []internal.SearchResult{} journeys := []internal.SearchResult{}
@ -86,10 +84,12 @@ func (h *CarpoolServiceHandler) GetDriverJourneys(departure orb.Point, arrival o
} }
} }
err = h.Storage.StoreSearchResults("driver", journeys) if len(journeys) > 0 {
if err != nil { err = h.Storage.StoreSearchResults(journeys)
log.Error().Err(err).Msg("Error saving search results") if err != nil {
return nil, err log.Error().Err(err).Msg("Error saving search results")
return nil, err
}
} }
return journeys, nil return journeys, nil
@ -149,8 +149,6 @@ func (h *CarpoolServiceHandler) GetPassengerJourneys(departure orb.Point, arriva
return nil, err return nil, err
} }
log.Debug().Any("tileset", tileset).Msg("got tileset")
candidate_routes := tileset.GetTiledRoutes() candidate_routes := tileset.GetTiledRoutes()
journeys := []internal.SearchResult{} journeys := []internal.SearchResult{}
@ -159,8 +157,6 @@ func (h *CarpoolServiceHandler) GetPassengerJourneys(departure orb.Point, arriva
for _, r := range candidate_routes { for _, r := range candidate_routes {
ls := decodedPolyline ls := decodedPolyline
// distanceFromDeparture, indexDeparture := planar.DistanceFromWithIndex(ls, r.Route.Features[0].Point())
// distanceFromArrival, indexArrival := planar.DistanceFromWithIndex(ls, r.Route.Features[1].Point())
distanceFromDeparture, indexDeparture := geoutils.DistanceFromLineString(r.Route.Features[0].Point(), ls) distanceFromDeparture, indexDeparture := geoutils.DistanceFromLineString(r.Route.Features[0].Point(), ls)
distanceFromArrival, indexArrival := geoutils.DistanceFromLineString(r.Route.Features[1].Point(), ls) distanceFromArrival, indexArrival := geoutils.DistanceFromLineString(r.Route.Features[1].Point(), ls)
@ -184,36 +180,13 @@ func (h *CarpoolServiceHandler) GetPassengerJourneys(departure orb.Point, arriva
} }
} }
err = h.Storage.StoreSearchResults("passenger", journeys) if len(journeys) > 0 {
if err != nil { err = h.Storage.StoreSearchResults(journeys)
log.Error().Err(err).Msg("Error saving search results") if err != nil {
return nil, err log.Error().Err(err).Msg("Error saving search results")
return nil, err
}
} }
return journeys, nil return journeys, nil
} }
// //distance to Linestring computes the distance from point to the given linestring anf returns this minimum distance and the segment number
// func distanceToLineSTring(point orb.Point, lineString orb.LineString) (distance float64, closest_segment_index int) {
// minDistance := math.Inf(1)
// closest := -1
// for i := 0; i < len(lineString)-1; i++ {
// segment1 := lineString[i]
// segment2 := lineString[i+1]
// dist := distanceToSegment(point, segment1, segment2)
// if dist < minDistance {
// minDistance = dist
// closest = i
// }
// }
// return minDistance, closest
// }
// //distanceToSegment computes the distance to the segment defined with a starting and a ending point
// func distanceToSegment(point orb.Point, start orb.Point, end orb.Point) float64 {
// len := (end.Lon()-start.Lon())*(end.Lon()-start.Lon()) + (end.Lat()-start.Lat())*(end.Lat()-start.Lat())
// s := ((start.Lat()-point.Lat())*(end.Lon()-start.Lon()) - (start.Lon()-point.Lon())*(end.Lat()-start.Lat())) / len
// distance := math.Abs(s) * math.Sqrt(len)
// return distance
// }

View File

@ -6,11 +6,13 @@ import (
"strings" "strings"
"time" "time"
"github.com/google/uuid"
"github.com/paulmach/orb/geojson" "github.com/paulmach/orb/geojson"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )
type PlannedRouteSchedule struct { type PlannedRouteSchedule struct {
ID string `bson:"_id"`
Route RegularRoute Route RegularRoute
DepartureDate time.Time DepartureDate time.Time
} }
@ -43,6 +45,7 @@ func (rr RegularRoute) PlannedJourneySchedules(mindate time.Time, maxdate time.T
m, _ := strconv.Atoi(splitted[1]) m, _ := strconv.Atoi(splitted[1])
t := time.Date(current_date.Year(), current_date.Month(), current_date.Day(), h, m, 0, 0, time.Local) t := time.Date(current_date.Year(), current_date.Month(), current_date.Day(), h, m, 0, 0, time.Local)
results = append(results, PlannedRouteSchedule{ results = append(results, PlannedRouteSchedule{
ID: uuid.NewString(),
Route: rr, Route: rr,
DepartureDate: t, DepartureDate: t,
}) })

View File

@ -1,6 +1,10 @@
package ocss package ocss
import "time" import (
"bytes"
"encoding/json"
"time"
)
type CarpoolBookingStatus int64 type CarpoolBookingStatus int64
@ -12,6 +16,40 @@ const (
CarpoolBookingValidated CarpoolBookingValidated
) )
var carpoolBookingStatustoID = map[string]CarpoolBookingStatus{
"WAITING_CONFIRMATION": CarpoolBookingWaitingConfirmation,
"CONFIRMED": CarpoolBookingConfirmed,
"CANCELLED": CarpoolBookingCancelled,
"COMPLETED_PENDING_VALIDATION": CarpoolBookingCompletedPendingValidation,
"VALIDATED": CarpoolBookingValidated,
}
var carpoolBookingStatustoString = map[CarpoolBookingStatus]string{
CarpoolBookingWaitingConfirmation: "WAITING_CONFIRMATION",
CarpoolBookingConfirmed: "CONFIRMED",
CarpoolBookingCancelled: "CANCELLED",
CarpoolBookingCompletedPendingValidation: "COMPLETED_PENDING_VALIDATION",
CarpoolBookingValidated: "VALIDATED",
}
func (s CarpoolBookingStatus) MarshalJSON() ([]byte, error) {
buffer := bytes.NewBufferString(`"`)
buffer.WriteString(carpoolBookingStatustoString[s])
buffer.WriteString(`"`)
return buffer.Bytes(), nil
}
func (bs *CarpoolBookingStatus) UnmarshalJSON(b []byte) error {
var j string
err := json.Unmarshal(b, &j)
if err != nil {
return err
}
// Note that if the string cannot be found then it will be set to the zero value, 'Created' in this case.
*bs = carpoolBookingStatustoID[j]
return nil
}
type CarpoolBookingEventData struct { type CarpoolBookingEventData struct {
CarpoolBooking CarpoolBooking
DriverCarpoolBooking DriverCarpoolBooking

View File

@ -48,6 +48,15 @@ func (t *JSONTime) UnmarshalJSON(b []byte) error {
return nil return nil
} }
func (t *JSONTime) ToTime() *time.Time {
if t == nil {
return nil
}
time := time.Time(*t)
return &time
}
type JourneySchedule struct { type JourneySchedule struct {
ID *string `json:"id,omitempty"` ID *string `json:"id,omitempty"`
PassengerPickupDate JSONTime `json:"passengerPickupDate"` PassengerPickupDate JSONTime `json:"passengerPickupDate"`
@ -61,7 +70,7 @@ type DriverJourney struct {
DriverTrip DriverTrip
JourneySchedule JourneySchedule
AvailableSteats *int `json:"requestedSeats,omitempty"` AvailableSteats *int64 `json:"requestedSeats,omitempty"`
Price *Price `json:"price,omitempty"` Price *Price `json:"price,omitempty"`
} }

View File

@ -1,5 +1,10 @@
package ocss package ocss
import (
"bytes"
"encoding/json"
)
type Day int64 type Day int64
const ( const (
@ -12,6 +17,44 @@ const (
Sunday Sunday
) )
var daytoID = map[string]Day{
"MON": Monday,
"TUE": Tuesday,
"WED": Wednesday,
"THU": Thursday,
"FRI": Friday,
"SAT": Saturday,
"SUN": Sunday,
}
var daytoString = map[Day]string{
Monday: "MON",
Tuesday: "TUE",
Wednesday: "WED",
Thursday: "THU",
Friday: "FRI",
Saturday: "SAT",
Sunday: "SUN",
}
func (s Day) MarshalJSON() ([]byte, error) {
buffer := bytes.NewBufferString(`"`)
buffer.WriteString(daytoString[s])
buffer.WriteString(`"`)
return buffer.Bytes(), nil
}
func (bs *Day) UnmarshalJSON(b []byte) error {
var j string
err := json.Unmarshal(b, &j)
if err != nil {
return err
}
// Note that if the string cannot be found then it will be set to the zero value, 'Created' in this case.
*bs = daytoID[j]
return nil
}
type Schedule struct { type Schedule struct {
PassengerPickupDay *Day `json:"passengerPickupDay,omitempty"` PassengerPickupDay *Day `json:"passengerPickupDay,omitempty"`

View File

@ -1,5 +1,10 @@
package ocss package ocss
import (
"bytes"
"encoding/json"
)
type Gender int64 type Gender int64
const ( const (
@ -8,6 +13,36 @@ const (
Other Other
) )
var gendertoID = map[string]Gender{
"F": Female,
"M": Male,
"O": Other,
}
var gendertoString = map[Gender]string{
Female: "F",
Male: "M",
Other: "O",
}
func (s Gender) MarshalJSON() ([]byte, error) {
buffer := bytes.NewBufferString(`"`)
buffer.WriteString(gendertoString[s])
buffer.WriteString(`"`)
return buffer.Bytes(), nil
}
func (bs *Gender) UnmarshalJSON(b []byte) error {
var j string
err := json.Unmarshal(b, &j)
if err != nil {
return err
}
// Note that if the string cannot be found then it will be set to the zero value, 'Created' in this case.
*bs = gendertoID[j]
return nil
}
type User struct { type User struct {
ID string `json:"id"` ID string `json:"id"`
Operator string `json:"operator"` Operator string `json:"operator"`

File diff suppressed because it is too large Load Diff

View File

@ -21,32 +21,32 @@ message CarpoolServiceDriverJourney {
double passenger_pickup_lng = 4; double passenger_pickup_lng = 4;
double passenger_drop_lat = 5; double passenger_drop_lat = 5;
double passenger_drop_lng = 6; double passenger_drop_lng = 6;
string passenger_pickup_address = 7; optional string passenger_pickup_address = 7;
string passenger_drop_address = 8; optional string passenger_drop_address = 8;
int64 distance = 9; optional int64 distance = 9;
double driver_departure_lat = 10; optional double driver_departure_lat = 10;
double driver_departure_lng = 11; optional double driver_departure_lng = 11;
double driver_arrival_lat = 12; optional double driver_arrival_lat = 12;
double driver_arrival_lng = 13; optional double driver_arrival_lng = 13;
string driver_departure_address = 14; optional string driver_departure_address = 14;
string driver_arrival_address = 15; optional string driver_arrival_address = 15;
int64 duration = 16; int64 duration = 16;
string journey_polyline = 17; optional string journey_polyline = 17;
string web_url = 18; optional string web_url = 18;
CarpoolServiceUser driver = 19; CarpoolServiceUser driver = 19;
int64 departure_to_pickup_walking_distance = 20; optional int64 departure_to_pickup_walking_distance = 20;
int64 departure_to_pickup_walking_duration = 21; optional int64 departure_to_pickup_walking_duration = 21;
string departure_to_pickup_walking_polyline = 22; optional string departure_to_pickup_walking_polyline = 22;
int64 dropoff_to_arrival_walking_distance = 23; optional int64 dropoff_to_arrival_walking_distance = 23;
int64 dropoff_to_arrival_walking_duration = 24; optional int64 dropoff_to_arrival_walking_duration = 24;
string dropoff_to_arrival_walking_polyline = 25; optional string dropoff_to_arrival_walking_polyline = 25;
CarpoolServiceCar car = 26; optional CarpoolServiceCar car = 26;
google.protobuf.Timestamp passenger_pickup_date = 27; google.protobuf.Timestamp passenger_pickup_date = 27;
google.protobuf.Timestamp driver_departure_date = 28; optional google.protobuf.Timestamp driver_departure_date = 28;
CarpoolServiceJourneyType type = 29; CarpoolServiceJourneyType type = 29;
int64 available_seats = 30; optional int64 available_seats = 30;
CarpoolServicePrice price = 31; optional CarpoolServicePrice price = 31;
CarpoolServicePreferences preferences = 32; optional CarpoolServicePreferences preferences = 32;
} }
message CarpoolServicePassengerJourney { message CarpoolServicePassengerJourney {
@ -56,24 +56,24 @@ message CarpoolServicePassengerJourney {
double passenger_pickup_lng = 4; double passenger_pickup_lng = 4;
double passenger_drop_lat = 5; double passenger_drop_lat = 5;
double passenger_drop_lng = 6; double passenger_drop_lng = 6;
string passenger_pickup_address = 7; optional string passenger_pickup_address = 7;
string passenger_drop_address = 8; optional string passenger_drop_address = 8;
int64 distance = 9; optional int64 distance = 9;
double driver_departure_lat = 10; optional double driver_departure_lat = 10;
double driver_departure_lng = 11; optional double driver_departure_lng = 11;
double driver_arrival_lat = 12; optional double driver_arrival_lat = 12;
double driver_arrival_lng = 13; optional double driver_arrival_lng = 13;
string driver_departure_address = 14; optional string driver_departure_address = 14;
string driver_arrival_address = 15; optional string driver_arrival_address = 15;
int64 duration = 16; int64 duration = 16;
string journey_polyline = 17; optional string journey_polyline = 17;
string web_url = 18; optional string web_url = 18;
CarpoolServiceUser passenger = 19; CarpoolServiceUser passenger = 19;
google.protobuf.Timestamp passenger_pickup_date = 27; google.protobuf.Timestamp passenger_pickup_date = 27;
google.protobuf.Timestamp driver_departure_date = 28; optional google.protobuf.Timestamp driver_departure_date = 28;
CarpoolServiceJourneyType type = 29; CarpoolServiceJourneyType type = 29;
int64 requested_seats = 30; optional int64 requested_seats = 30;
CarpoolServicePreferences preferences = 32; optional CarpoolServicePreferences preferences = 32;
} }
message CarpoolServiceDriverRegularTrip { message CarpoolServiceDriverRegularTrip {
@ -83,8 +83,8 @@ message CarpoolServiceDriverRegularTrip {
double passenger_pickup_lng = 4; double passenger_pickup_lng = 4;
double passenger_drop_lat = 5; double passenger_drop_lat = 5;
double passenger_drop_lng = 6; double passenger_drop_lng = 6;
string passenger_pickup_address = 7; optional string passenger_pickup_address = 7;
string passenger_drop_address = 8; optional string passenger_drop_address = 8;
int64 distance = 9; int64 distance = 9;
double driver_departure_lat = 10; double driver_departure_lat = 10;
double driver_departure_lng = 11; double driver_departure_lng = 11;
@ -156,11 +156,11 @@ message CarpoolServiceBooking {
} }
message CarpoolServicePreferences { message CarpoolServicePreferences {
bool smoking = 1; optional bool smoking = 1;
bool animals = 2; optional bool animals = 2;
bool music = 3; optional bool music = 3;
bool is_talker = 4; optional bool is_talker = 4;
int64 luggage_size = 5; optional int64 luggage_size = 5;
} }
message CarpoolServiceUser { message CarpoolServiceUser {
@ -176,14 +176,14 @@ message CarpoolServiceUser {
} }
message CarpoolServiceCar { message CarpoolServiceCar {
string model = 1; optional string model = 1;
string brand = 2; optional string brand = 2;
} }
message CarpoolServicePrice { message CarpoolServicePrice {
CarpoolServicePriceType type = 1; optional CarpoolServicePriceType type = 1;
double amount = 2; optional double amount = 2;
string currency = 3; optional string currency = 3;
} }
message CarpoolServiceSchedule { message CarpoolServiceSchedule {
@ -196,7 +196,7 @@ message CarpoolServiceJourneySchedule {
string id = 1; string id = 1;
google.protobuf.Timestamp passenger_pickup_date = 2; google.protobuf.Timestamp passenger_pickup_date = 2;
google.protobuf.Timestamp driver_departure_date = 3; google.protobuf.Timestamp driver_departure_date = 3;
string web_url = 4; optional string web_url = 4;
CarpoolServiceJourneyType type = 5; CarpoolServiceJourneyType type = 5;
} }

View File

@ -313,10 +313,10 @@ type DriverJourneysRequest struct {
ArrivalLat float64 `protobuf:"fixed64,3,opt,name=arrival_lat,json=arrivalLat,proto3" json:"arrival_lat,omitempty"` ArrivalLat float64 `protobuf:"fixed64,3,opt,name=arrival_lat,json=arrivalLat,proto3" json:"arrival_lat,omitempty"`
ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"` ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"`
DepartureDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=departure_date,json=departureDate,proto3" json:"departure_date,omitempty"` DepartureDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=departure_date,json=departureDate,proto3" json:"departure_date,omitempty"`
TimeDelta int64 `protobuf:"varint,6,opt,name=time_delta,json=timeDelta,proto3" json:"time_delta,omitempty"` TimeDelta *int64 `protobuf:"varint,6,opt,name=time_delta,json=timeDelta,proto3,oneof" json:"time_delta,omitempty"`
DepartureRadius float64 `protobuf:"fixed64,7,opt,name=departure_radius,json=departureRadius,proto3" json:"departure_radius,omitempty"` DepartureRadius *float64 `protobuf:"fixed64,7,opt,name=departure_radius,json=departureRadius,proto3,oneof" json:"departure_radius,omitempty"`
ArrivalRadius float64 `protobuf:"fixed64,8,opt,name=arrival_radius,json=arrivalRadius,proto3" json:"arrival_radius,omitempty"` ArrivalRadius *float64 `protobuf:"fixed64,8,opt,name=arrival_radius,json=arrivalRadius,proto3,oneof" json:"arrival_radius,omitempty"`
Count int64 `protobuf:"varint,9,opt,name=count,proto3" json:"count,omitempty"` Count *int64 `protobuf:"varint,9,opt,name=count,proto3,oneof" json:"count,omitempty"`
} }
func (x *DriverJourneysRequest) Reset() { func (x *DriverJourneysRequest) Reset() {
@ -387,29 +387,29 @@ func (x *DriverJourneysRequest) GetDepartureDate() *timestamppb.Timestamp {
} }
func (x *DriverJourneysRequest) GetTimeDelta() int64 { func (x *DriverJourneysRequest) GetTimeDelta() int64 {
if x != nil { if x != nil && x.TimeDelta != nil {
return x.TimeDelta return *x.TimeDelta
} }
return 0 return 0
} }
func (x *DriverJourneysRequest) GetDepartureRadius() float64 { func (x *DriverJourneysRequest) GetDepartureRadius() float64 {
if x != nil { if x != nil && x.DepartureRadius != nil {
return x.DepartureRadius return *x.DepartureRadius
} }
return 0 return 0
} }
func (x *DriverJourneysRequest) GetArrivalRadius() float64 { func (x *DriverJourneysRequest) GetArrivalRadius() float64 {
if x != nil { if x != nil && x.ArrivalRadius != nil {
return x.ArrivalRadius return *x.ArrivalRadius
} }
return 0 return 0
} }
func (x *DriverJourneysRequest) GetCount() int64 { func (x *DriverJourneysRequest) GetCount() int64 {
if x != nil { if x != nil && x.Count != nil {
return x.Count return *x.Count
} }
return 0 return 0
} }
@ -471,10 +471,10 @@ type PassengerJourneysRequest struct {
ArrivalLat float64 `protobuf:"fixed64,3,opt,name=arrival_lat,json=arrivalLat,proto3" json:"arrival_lat,omitempty"` ArrivalLat float64 `protobuf:"fixed64,3,opt,name=arrival_lat,json=arrivalLat,proto3" json:"arrival_lat,omitempty"`
ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"` ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"`
DepartureDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=departure_date,json=departureDate,proto3" json:"departure_date,omitempty"` DepartureDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=departure_date,json=departureDate,proto3" json:"departure_date,omitempty"`
TimeDelta int64 `protobuf:"varint,6,opt,name=time_delta,json=timeDelta,proto3" json:"time_delta,omitempty"` TimeDelta *int64 `protobuf:"varint,6,opt,name=time_delta,json=timeDelta,proto3,oneof" json:"time_delta,omitempty"`
DepartureRadius float64 `protobuf:"fixed64,7,opt,name=departure_radius,json=departureRadius,proto3" json:"departure_radius,omitempty"` DepartureRadius *float64 `protobuf:"fixed64,7,opt,name=departure_radius,json=departureRadius,proto3,oneof" json:"departure_radius,omitempty"`
ArrivalRadius float64 `protobuf:"fixed64,8,opt,name=arrival_radius,json=arrivalRadius,proto3" json:"arrival_radius,omitempty"` ArrivalRadius *float64 `protobuf:"fixed64,8,opt,name=arrival_radius,json=arrivalRadius,proto3,oneof" json:"arrival_radius,omitempty"`
Count int64 `protobuf:"varint,9,opt,name=count,proto3" json:"count,omitempty"` Count *int64 `protobuf:"varint,9,opt,name=count,proto3,oneof" json:"count,omitempty"`
} }
func (x *PassengerJourneysRequest) Reset() { func (x *PassengerJourneysRequest) Reset() {
@ -545,29 +545,29 @@ func (x *PassengerJourneysRequest) GetDepartureDate() *timestamppb.Timestamp {
} }
func (x *PassengerJourneysRequest) GetTimeDelta() int64 { func (x *PassengerJourneysRequest) GetTimeDelta() int64 {
if x != nil { if x != nil && x.TimeDelta != nil {
return x.TimeDelta return *x.TimeDelta
} }
return 0 return 0
} }
func (x *PassengerJourneysRequest) GetDepartureRadius() float64 { func (x *PassengerJourneysRequest) GetDepartureRadius() float64 {
if x != nil { if x != nil && x.DepartureRadius != nil {
return x.DepartureRadius return *x.DepartureRadius
} }
return 0 return 0
} }
func (x *PassengerJourneysRequest) GetArrivalRadius() float64 { func (x *PassengerJourneysRequest) GetArrivalRadius() float64 {
if x != nil { if x != nil && x.ArrivalRadius != nil {
return x.ArrivalRadius return *x.ArrivalRadius
} }
return 0 return 0
} }
func (x *PassengerJourneysRequest) GetCount() int64 { func (x *PassengerJourneysRequest) GetCount() int64 {
if x != nil { if x != nil && x.Count != nil {
return x.Count return *x.Count
} }
return 0 return 0
} }
@ -630,12 +630,12 @@ type DriverRegularTripsRequest struct {
ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"` ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"`
DepartureTimeOfDay string `protobuf:"bytes,5,opt,name=departure_time_of_day,json=departureTimeOfDay,proto3" json:"departure_time_of_day,omitempty"` DepartureTimeOfDay string `protobuf:"bytes,5,opt,name=departure_time_of_day,json=departureTimeOfDay,proto3" json:"departure_time_of_day,omitempty"`
DepartureWeekDays []string `protobuf:"bytes,6,rep,name=departure_week_days,json=departureWeekDays,proto3" json:"departure_week_days,omitempty"` DepartureWeekDays []string `protobuf:"bytes,6,rep,name=departure_week_days,json=departureWeekDays,proto3" json:"departure_week_days,omitempty"`
TimeDelta int64 `protobuf:"varint,7,opt,name=time_delta,json=timeDelta,proto3" json:"time_delta,omitempty"` TimeDelta *int64 `protobuf:"varint,7,opt,name=time_delta,json=timeDelta,proto3,oneof" json:"time_delta,omitempty"`
DepartureRadius float64 `protobuf:"fixed64,8,opt,name=departure_radius,json=departureRadius,proto3" json:"departure_radius,omitempty"` DepartureRadius *float64 `protobuf:"fixed64,8,opt,name=departure_radius,json=departureRadius,proto3,oneof" json:"departure_radius,omitempty"`
ArrivalRadius float64 `protobuf:"fixed64,9,opt,name=arrival_radius,json=arrivalRadius,proto3" json:"arrival_radius,omitempty"` ArrivalRadius *float64 `protobuf:"fixed64,9,opt,name=arrival_radius,json=arrivalRadius,proto3,oneof" json:"arrival_radius,omitempty"`
MinDepartureDate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=min_departure_date,json=minDepartureDate,proto3" json:"min_departure_date,omitempty"` MinDepartureDate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=min_departure_date,json=minDepartureDate,proto3,oneof" json:"min_departure_date,omitempty"`
MaxDepartureDate *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=max_departure_date,json=maxDepartureDate,proto3" json:"max_departure_date,omitempty"` MaxDepartureDate *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=max_departure_date,json=maxDepartureDate,proto3,oneof" json:"max_departure_date,omitempty"`
Count int64 `protobuf:"varint,12,opt,name=count,proto3" json:"count,omitempty"` Count *int64 `protobuf:"varint,12,opt,name=count,proto3,oneof" json:"count,omitempty"`
} }
func (x *DriverRegularTripsRequest) Reset() { func (x *DriverRegularTripsRequest) Reset() {
@ -713,22 +713,22 @@ func (x *DriverRegularTripsRequest) GetDepartureWeekDays() []string {
} }
func (x *DriverRegularTripsRequest) GetTimeDelta() int64 { func (x *DriverRegularTripsRequest) GetTimeDelta() int64 {
if x != nil { if x != nil && x.TimeDelta != nil {
return x.TimeDelta return *x.TimeDelta
} }
return 0 return 0
} }
func (x *DriverRegularTripsRequest) GetDepartureRadius() float64 { func (x *DriverRegularTripsRequest) GetDepartureRadius() float64 {
if x != nil { if x != nil && x.DepartureRadius != nil {
return x.DepartureRadius return *x.DepartureRadius
} }
return 0 return 0
} }
func (x *DriverRegularTripsRequest) GetArrivalRadius() float64 { func (x *DriverRegularTripsRequest) GetArrivalRadius() float64 {
if x != nil { if x != nil && x.ArrivalRadius != nil {
return x.ArrivalRadius return *x.ArrivalRadius
} }
return 0 return 0
} }
@ -748,8 +748,8 @@ func (x *DriverRegularTripsRequest) GetMaxDepartureDate() *timestamppb.Timestamp
} }
func (x *DriverRegularTripsRequest) GetCount() int64 { func (x *DriverRegularTripsRequest) GetCount() int64 {
if x != nil { if x != nil && x.Count != nil {
return x.Count return *x.Count
} }
return 0 return 0
} }
@ -812,12 +812,12 @@ type PassengerRegularTripsRequest struct {
ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"` ArrivalLng float64 `protobuf:"fixed64,4,opt,name=arrival_lng,json=arrivalLng,proto3" json:"arrival_lng,omitempty"`
DepartureTimeOfDay string `protobuf:"bytes,5,opt,name=departure_time_of_day,json=departureTimeOfDay,proto3" json:"departure_time_of_day,omitempty"` DepartureTimeOfDay string `protobuf:"bytes,5,opt,name=departure_time_of_day,json=departureTimeOfDay,proto3" json:"departure_time_of_day,omitempty"`
DepartureWeekDays []string `protobuf:"bytes,6,rep,name=departure_week_days,json=departureWeekDays,proto3" json:"departure_week_days,omitempty"` DepartureWeekDays []string `protobuf:"bytes,6,rep,name=departure_week_days,json=departureWeekDays,proto3" json:"departure_week_days,omitempty"`
TimeDelta int64 `protobuf:"varint,7,opt,name=time_delta,json=timeDelta,proto3" json:"time_delta,omitempty"` TimeDelta *int64 `protobuf:"varint,7,opt,name=time_delta,json=timeDelta,proto3,oneof" json:"time_delta,omitempty"`
DepartureRadius float64 `protobuf:"fixed64,8,opt,name=departure_radius,json=departureRadius,proto3" json:"departure_radius,omitempty"` DepartureRadius *float64 `protobuf:"fixed64,8,opt,name=departure_radius,json=departureRadius,proto3,oneof" json:"departure_radius,omitempty"`
ArrivalRadius float64 `protobuf:"fixed64,9,opt,name=arrival_radius,json=arrivalRadius,proto3" json:"arrival_radius,omitempty"` ArrivalRadius *float64 `protobuf:"fixed64,9,opt,name=arrival_radius,json=arrivalRadius,proto3,oneof" json:"arrival_radius,omitempty"`
MinDepartureDate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=min_departure_date,json=minDepartureDate,proto3" json:"min_departure_date,omitempty"` MinDepartureDate *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=min_departure_date,json=minDepartureDate,proto3,oneof" json:"min_departure_date,omitempty"`
MaxDepartureDate *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=max_departure_date,json=maxDepartureDate,proto3" json:"max_departure_date,omitempty"` MaxDepartureDate *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=max_departure_date,json=maxDepartureDate,proto3,oneof" json:"max_departure_date,omitempty"`
Count int64 `protobuf:"varint,12,opt,name=count,proto3" json:"count,omitempty"` Count *int64 `protobuf:"varint,12,opt,name=count,proto3,oneof" json:"count,omitempty"`
} }
func (x *PassengerRegularTripsRequest) Reset() { func (x *PassengerRegularTripsRequest) Reset() {
@ -895,22 +895,22 @@ func (x *PassengerRegularTripsRequest) GetDepartureWeekDays() []string {
} }
func (x *PassengerRegularTripsRequest) GetTimeDelta() int64 { func (x *PassengerRegularTripsRequest) GetTimeDelta() int64 {
if x != nil { if x != nil && x.TimeDelta != nil {
return x.TimeDelta return *x.TimeDelta
} }
return 0 return 0
} }
func (x *PassengerRegularTripsRequest) GetDepartureRadius() float64 { func (x *PassengerRegularTripsRequest) GetDepartureRadius() float64 {
if x != nil { if x != nil && x.DepartureRadius != nil {
return x.DepartureRadius return *x.DepartureRadius
} }
return 0 return 0
} }
func (x *PassengerRegularTripsRequest) GetArrivalRadius() float64 { func (x *PassengerRegularTripsRequest) GetArrivalRadius() float64 {
if x != nil { if x != nil && x.ArrivalRadius != nil {
return x.ArrivalRadius return *x.ArrivalRadius
} }
return 0 return 0
} }
@ -930,8 +930,8 @@ func (x *PassengerRegularTripsRequest) GetMaxDepartureDate() *timestamppb.Timest
} }
func (x *PassengerRegularTripsRequest) GetCount() int64 { func (x *PassengerRegularTripsRequest) GetCount() int64 {
if x != nil { if x != nil && x.Count != nil {
return x.Count return *x.Count
} }
return 0 return 0
} }
@ -1317,7 +1317,7 @@ var file_carpool_service_proto_rawDesc = []byte{
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x52, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xed, 0x02, 0x0a, 0x15, 0x44, 0x72, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x03, 0x0a, 0x15, 0x44, 0x72,
0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65,
0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61,
@ -1332,214 +1332,243 @@ var file_carpool_service_proto_rawDesc = []byte{
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61,
0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65,
0x61, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x6c, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01,
0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x48, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64,
0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x69, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61,
0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x64, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02,
0x69, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88,
0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5f, 0x0a, 0x16, 0x44, 0x72, 0x69, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28,
0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x03, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a,
0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x0b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x42, 0x13, 0x0a, 0x11,
0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x43, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75,
0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x72, 0x69, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61,
0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x64, 0x69, 0x75, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5f,
0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22, 0xf0, 0x02, 0x0a, 0x18, 0x50, 0x0a, 0x16, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73,
0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x64, 0x72, 0x69, 0x76,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x0b, 0x32, 0x1c, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69,
0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52,
0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22,
0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6e, 0xc5, 0x03, 0x0a, 0x18, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75,
0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x74, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20,
0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x6e, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61,
0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c,
0x4c, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x75, 0x72, 0x65, 0x4c, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6c, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76,
0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x61, 0x6c, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72,
0x65, 0x6c, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61,
0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x0f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x64, 0x65,
0x12, 0x25, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x74,
0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48,
0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12,
0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6b, 0x0a, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64,
0x19, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x69, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x70,
0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x70, 0x61, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12,
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x2a, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63,
0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52, 0x11, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x05, 0x63, 0x6f,
0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22, 0xa5, 0x04, 0x0a, 0x19, 0x44, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f,
0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61,
0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x08, 0x0a,
0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6b, 0x0a, 0x19, 0x50, 0x61, 0x73, 0x73, 0x65,
0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x02, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70,
0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65,
0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x32, 0x1f, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x4c, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65,
0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x79, 0x52, 0x11, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72,
0x6c, 0x4c, 0x6e, 0x67, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22, 0xb2, 0x05, 0x0a, 0x19, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52,
0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x05, 0x20, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f,
0x6d, 0x65, 0x4f, 0x66, 0x44, 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x61, 0x72, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72,
0x74, 0x75, 0x72, 0x65, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x06, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72,
0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x57, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c,
0x65, 0x65, 0x6b, 0x44, 0x61, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b,
0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x61, 0x74, 0x12, 0x1f, 0x0a,
0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01,
0x52, 0x0f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x6e, 0x67, 0x12, 0x31,
0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x0a, 0x15, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x69, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64,
0x61, 0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x44, 0x61,
0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x77,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x65, 0x65, 0x6b, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x57, 0x65, 0x65, 0x6b, 0x44, 0x61, 0x79,
0x52, 0x10, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18,
0x74, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65, 0x6c,
0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x48,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69,
0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52,
0x6e, 0x74, 0x22, 0x70, 0x0a, 0x1a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88, 0x01,
0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x01, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75,
0x12, 0x52, 0x0a, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x61, 0x72, 0x5f, 0x74, 0x72, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x03, 0x52, 0x10, 0x6d, 0x69, 0x6e,
0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01,
0x52, 0x12, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72,
0x72, 0x69, 0x70, 0x73, 0x22, 0xa8, 0x04, 0x0a, 0x1c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44,
0x72, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12,
0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05,
0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74,
0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x6e, 0x67, 0x12, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65,
0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x03, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x11,
0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x61, 0x74, 0x0a, 0x0f, 0x5f, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75,
0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x6e, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6d, 0x61, 0x78,
0x67, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x42,
0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x70, 0x0a, 0x1a, 0x44, 0x72, 0x69,
0x52, 0x12, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52,
0x66, 0x44, 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65,
0x65, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x74, 0x72, 0x69, 0x70, 0x73, 0x18,
0x09, 0x52, 0x11, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x57, 0x65, 0x65, 0x6b, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53,
0x44, 0x61, 0x79, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75,
0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x12, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52,
0x6c, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x1c,
0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x64, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x25, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20,
0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x61,
0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c,
0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x75, 0x72, 0x65, 0x4c, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6d, 0x6c, 0x5f, 0x6c, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x72,
0x69, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x69, 0x76,
0x48, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6c, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x61, 0x72,
0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x4c, 0x6e, 0x67, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x65, 0x70, 0x61,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x5f, 0x64, 0x61,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75,
0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x44, 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x64,
0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x5f, 0x64, 0x61,
0x73, 0x0a, 0x1d, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x79, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x75, 0x72, 0x65, 0x57, 0x65, 0x65, 0x6b, 0x44, 0x61, 0x79, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x74,
0x12, 0x52, 0x0a, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48,
0x61, 0x72, 0x5f, 0x74, 0x72, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x88, 0x01, 0x01, 0x12,
0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x61, 0x64,
0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x69, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x70,
0x52, 0x12, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12,
0x72, 0x69, 0x70, 0x73, 0x22, 0x48, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x2a, 0x0a, 0x0e, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75,
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x69, 0x76,
0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x6c, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x12, 0x6d,
0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74,
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x61, 0x6d, 0x70, 0x48, 0x03, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74,
0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61,
0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65,
0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x85, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x6d, 0x70, 0x48, 0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75,
0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x0e, 0x32, 0x1c, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x64, 0x65,
0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x6c, 0x74, 0x61, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x65, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x61, 0x72, 0x72,
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f,
0x65, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61,
0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72,
0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f,
0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x75, 0x6e, 0x74, 0x22, 0x73, 0x0a, 0x1d, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72,
0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x46, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70,
0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x74, 0x72, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x69, 0x63, 0x65, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x32, 0xfb, 0x05, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x54, 0x72, 0x69, 0x70, 0x52, 0x12, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75,
0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x22, 0x48, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61,
0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69,
0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x62,
0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43,
0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f,
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x85, 0x01,
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b,
0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x43, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32,
0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b,
0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x72, 0x70,
0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x32, 0xfb, 0x05, 0x0a, 0x0e, 0x43,
0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a,
0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67,
0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61,
0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c,
0x6e, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x65, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x72, 0x69, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x44, 0x72, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x74, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x6e,
0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a,
0x65, 0x79, 0x73, 0x12, 0x19, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x0e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12,
0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x16, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73,
0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72,
0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a,
0x70, 0x73, 0x12, 0x1a, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x19, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x67, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x4a, 0x6f,
0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x15, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x12, 0x4f, 0x0a, 0x12, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61,
0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x12, 0x1d, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x12, 0x1a, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52,
0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c,
0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x00, 0x12, 0x58, 0x0a, 0x15, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65,
0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70, 0x73, 0x12, 0x1d, 0x2e, 0x50, 0x61, 0x73,
0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69,
0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x50, 0x61, 0x73, 0x73,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x54, 0x72, 0x69, 0x70,
0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x55, 0x70, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x43,
0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x43,
0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a,
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15,
0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65,
0x73, 0x65, 0x22, 0x00, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f,
0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x63, 0x61, 0x72, 0x70, 0x6f, 0x6f, 0x6c, 0x2d, 0x73, 0x65, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x2e,
0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f,
0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x63, 0x61, 0x72, 0x70, 0x6f, 0x6f,
0x6c, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1881,6 +1910,10 @@ func file_carpool_service_proto_init() {
} }
} }
} }
file_carpool_service_proto_msgTypes[6].OneofWrappers = []interface{}{}
file_carpool_service_proto_msgTypes[8].OneofWrappers = []interface{}{}
file_carpool_service_proto_msgTypes[10].OneofWrappers = []interface{}{}
file_carpool_service_proto_msgTypes[12].OneofWrappers = []interface{}{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{

View File

@ -18,7 +18,6 @@ service CarpoolService {
rpc PassengerJourneys(PassengerJourneysRequest) returns (PassengerJourneysResponse) {} rpc PassengerJourneys(PassengerJourneysRequest) returns (PassengerJourneysResponse) {}
rpc DriverRegularTrips(DriverRegularTripsRequest) returns (DriverRegularTripsResponse) {} rpc DriverRegularTrips(DriverRegularTripsRequest) returns (DriverRegularTripsResponse) {}
rpc PassengerRegularTrips(PassengerRegularTripsRequest) returns (PassengerRegularTripsResponse) {} rpc PassengerRegularTrips(PassengerRegularTripsRequest) returns (PassengerRegularTripsResponse) {}
rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {} rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {}
rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {} rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {}
rpc GetBooking(GetBookingRequest) returns (GetBookingResponse) {} rpc GetBooking(GetBookingRequest) returns (GetBookingResponse) {}
@ -56,10 +55,10 @@ message DriverJourneysRequest {
double arrival_lat = 3; double arrival_lat = 3;
double arrival_lng = 4; double arrival_lng = 4;
google.protobuf.Timestamp departure_date = 5; google.protobuf.Timestamp departure_date = 5;
int64 time_delta = 6; optional int64 time_delta = 6;
double departure_radius = 7; optional double departure_radius = 7;
double arrival_radius = 8; optional double arrival_radius = 8;
int64 count = 9; optional int64 count = 9;
} }
message DriverJourneysResponse { message DriverJourneysResponse {
@ -72,10 +71,10 @@ message PassengerJourneysRequest {
double arrival_lat = 3; double arrival_lat = 3;
double arrival_lng = 4; double arrival_lng = 4;
google.protobuf.Timestamp departure_date = 5; google.protobuf.Timestamp departure_date = 5;
int64 time_delta = 6; optional int64 time_delta = 6;
double departure_radius = 7; optional double departure_radius = 7;
double arrival_radius = 8; optional double arrival_radius = 8;
int64 count = 9; optional int64 count = 9;
} }
message PassengerJourneysResponse { message PassengerJourneysResponse {
@ -89,12 +88,12 @@ message DriverRegularTripsRequest {
double arrival_lng = 4; double arrival_lng = 4;
string departure_time_of_day = 5; string departure_time_of_day = 5;
repeated string departure_week_days = 6; repeated string departure_week_days = 6;
int64 time_delta = 7; optional int64 time_delta = 7;
double departure_radius = 8; optional double departure_radius = 8;
double arrival_radius = 9; optional double arrival_radius = 9;
google.protobuf.Timestamp min_departure_date = 10; optional google.protobuf.Timestamp min_departure_date = 10;
google.protobuf.Timestamp max_departure_date = 11; optional google.protobuf.Timestamp max_departure_date = 11;
int64 count = 12; optional int64 count = 12;
} }
message DriverRegularTripsResponse { message DriverRegularTripsResponse {
@ -108,12 +107,12 @@ message PassengerRegularTripsRequest {
double arrival_lng = 4; double arrival_lng = 4;
string departure_time_of_day = 5; string departure_time_of_day = 5;
repeated string departure_week_days = 6; repeated string departure_week_days = 6;
int64 time_delta = 7; optional int64 time_delta = 7;
double departure_radius = 8; optional double departure_radius = 8;
double arrival_radius = 9; optional double arrival_radius = 9;
google.protobuf.Timestamp min_departure_date = 10; optional google.protobuf.Timestamp min_departure_date = 10;
google.protobuf.Timestamp max_departure_date = 11; optional google.protobuf.Timestamp max_departure_date = 11;
int64 count = 12; optional int64 count = 12;
} }
message PassengerRegularTripsResponse { message PassengerRegularTripsResponse {

View File

@ -0,0 +1,209 @@
package proto
import (
"time"
"git.coopgo.io/coopgo-platform/carpool-service/interoperability/ocss"
)
func (j *CarpoolServiceDriverJourney) ToOCSS() ocss.DriverJourney {
var departureToPickupWalkingDuration *time.Duration
if j.DepartureToPickupWalkingDuration != nil {
dtpw := time.Duration(*j.DepartureToPickupWalkingDuration)
departureToPickupWalkingDuration = &dtpw
}
var dropoffToArrivalWalkingDuration *time.Duration
if j.DropoffToArrivalWalkingDuration != nil {
dtpw := time.Duration(*j.DropoffToArrivalWalkingDuration)
dropoffToArrivalWalkingDuration = &dtpw
}
var car *ocss.Car
if j.Car != nil {
car = &ocss.Car{
Model: j.Car.Model,
Brand: j.Car.Brand,
}
}
var preferences *ocss.Preferences
if j.Preferences != nil {
preferences = &ocss.Preferences{
Smoking: j.Preferences.Smoking,
Animals: j.Preferences.Animals,
Music: j.Preferences.Music,
IsTalker: j.Preferences.IsTalker,
LuggageSize: j.Preferences.LuggageSize,
}
}
var driverDepartureDate *ocss.JSONTime
if j.DriverDepartureDate != nil {
ddd := ocss.JSONTime(j.DriverDepartureDate.AsTime())
driverDepartureDate = &ddd
}
var price *ocss.Price
if j.Price != nil {
var priceType *ocss.PriceType
if j.Price.Type != nil {
if *j.Price.Type == CarpoolServicePriceType_FREE {
pt := ocss.Free
priceType = &pt
} else if *j.Price.Type == CarpoolServicePriceType_PAYING {
pt := ocss.Paying
priceType = &pt
} else if *j.Price.Type == CarpoolServicePriceType_UNKNOWN {
pt := ocss.Unknown
priceType = &pt
}
}
price = &ocss.Price{
Amount: j.Price.Amount,
Currency: j.Price.Currency,
Type: priceType,
}
}
return ocss.DriverJourney{
DriverTrip: ocss.DriverTrip{
Driver: ocss.User{
ID: j.Driver.Id,
Operator: j.Driver.Operator,
Alias: j.Driver.Alias,
FirstName: j.Driver.FirstName,
LastName: j.Driver.LastName,
Grade: j.Driver.Grade,
Picture: j.Driver.Picture,
Gender: GenderToOCSS(j.Driver.Gender),
VerifiedIdentity: j.Driver.VerifiedIdentity,
},
DepartureToPickupWalkingDistance: j.DepartureToPickupWalkingDistance,
DepartureToPickupWalkingDuration: departureToPickupWalkingDuration,
DepartureToPickupWalkingPolyline: j.DepartureToPickupWalkingPolyline,
DropoffToArrivalWalkingDistance: j.DropoffToArrivalWalkingDistance,
DropoffToArrivalWalkingDuration: dropoffToArrivalWalkingDuration,
DropoffToArrivalWalkingPolyline: j.DropoffToArrivalWalkingPolyline,
Car: car,
Trip: ocss.Trip{
Operator: j.Operator,
PassengerPickupLat: j.PassengerPickupLat,
PassengerPickupLng: j.PassengerPickupLng,
PassengerDropLat: j.PassengerDropLat,
PassengerDropLng: j.PassengerDropLng,
PassengerPickupAddress: j.PassengerPickupAddress,
PassengerDropAddress: j.PassengerDropAddress,
Duration: time.Duration(j.Duration),
Distance: j.Distance,
DriverDepartureLat: j.DriverDepartureLat,
DriverDepartureLng: j.DriverArrivalLng,
DriverArrivalLat: j.DriverArrivalLat,
DriverArrivalLng: j.DriverArrivalLng,
DriverDepartureAddress: j.DriverDepartureAddress,
DriverArrivalAddress: j.DriverArrivalAddress,
JourneyPolyline: j.JourneyPolyline,
Preferences: preferences,
},
},
JourneySchedule: ocss.JourneySchedule{
PassengerPickupDate: ocss.JSONTime(j.PassengerPickupDate.AsTime()),
DriverDepartureDate: driverDepartureDate,
WebUrl: j.WebUrl,
Type: j.Type.ToOCSS(),
},
AvailableSteats: j.AvailableSeats,
Price: price,
}
}
func (j *CarpoolServicePassengerJourney) ToOCSS() ocss.PassengerJourney {
var preferences *ocss.Preferences
if j.Preferences != nil {
preferences = &ocss.Preferences{
Smoking: j.Preferences.Smoking,
Animals: j.Preferences.Animals,
Music: j.Preferences.Music,
IsTalker: j.Preferences.IsTalker,
LuggageSize: j.Preferences.LuggageSize,
}
}
var driverDepartureDate *ocss.JSONTime
if j.DriverDepartureDate != nil {
ddd := ocss.JSONTime(j.DriverDepartureDate.AsTime())
driverDepartureDate = &ddd
}
return ocss.PassengerJourney{
PassengerTrip: ocss.PassengerTrip{
Passenger: ocss.User{
ID: j.Passenger.Id,
Operator: j.Passenger.Operator,
Alias: j.Passenger.Alias,
FirstName: j.Passenger.FirstName,
LastName: j.Passenger.LastName,
Grade: j.Passenger.Grade,
Picture: j.Passenger.Picture,
Gender: GenderToOCSS(j.Passenger.Gender),
VerifiedIdentity: j.Passenger.VerifiedIdentity,
},
Trip: ocss.Trip{
Operator: j.Operator,
PassengerPickupLat: j.PassengerPickupLat,
PassengerPickupLng: j.PassengerPickupLng,
PassengerDropLat: j.PassengerDropLat,
PassengerDropLng: j.PassengerDropLng,
PassengerPickupAddress: j.PassengerPickupAddress,
PassengerDropAddress: j.PassengerDropAddress,
Duration: time.Duration(j.Duration),
Distance: j.Distance,
DriverDepartureLat: j.DriverDepartureLat,
DriverDepartureLng: j.DriverArrivalLng,
DriverArrivalLat: j.DriverArrivalLat,
DriverArrivalLng: j.DriverArrivalLng,
DriverDepartureAddress: j.DriverDepartureAddress,
DriverArrivalAddress: j.DriverArrivalAddress,
JourneyPolyline: j.JourneyPolyline,
Preferences: preferences,
},
},
JourneySchedule: ocss.JourneySchedule{
PassengerPickupDate: ocss.JSONTime(j.PassengerPickupDate.AsTime()),
DriverDepartureDate: driverDepartureDate,
WebUrl: j.WebUrl,
Type: j.Type.ToOCSS(),
},
RequestedSteats: j.RequestedSeats,
}
}
func (t CarpoolServiceJourneyType) ToOCSS() ocss.JourneyScheduleType {
if t == CarpoolServiceJourneyType_DYNAMIC {
return ocss.Dynamic
} else if t == CarpoolServiceJourneyType_LINE {
return ocss.Line
} else {
return ocss.Planned
}
}
func GenderToOCSS(g *string) *ocss.Gender {
if g == nil {
return nil
}
var gender ocss.Gender
if *g == "F" {
gender = ocss.Female
} else if *g == "M" {
gender = ocss.Male
} else if *g == "O" {
gender = ocss.Other
}
return &gender
}

View File

@ -0,0 +1,68 @@
package grpcserver
import (
"context"
"git.coopgo.io/coopgo-platform/carpool-service/servers/grpc/proto"
"github.com/paulmach/orb/geojson"
"github.com/rs/zerolog/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (s *CarpoolServiceServerImpl) CreateRegularRoutes(ctx context.Context, req *proto.CreateRegularRoutesRequest) (*proto.CreateRegularRoutesResponse, error) {
log.Debug().Msg("grpc CarpoolService - CreateTrips")
routes := []*geojson.FeatureCollection{}
for _, r := range req.Routes {
route, err := geojson.UnmarshalFeatureCollection([]byte(r.Serialized))
if err == nil {
routes = append(routes, route)
}
}
if len(routes) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "no route to create")
}
if err := s.Handler.CreateRegularRoutes(routes); err != nil {
return nil, status.Errorf(codes.Internal, "could not create routes in CreateRegularRoutes : %s", err.Error())
}
return &proto.CreateRegularRoutesResponse{}, nil
}
func (s *CarpoolServiceServerImpl) DeleteRegularRoutes(context.Context, *proto.DeleteRegularRoutesRequest) (*proto.DeleteRegularRoutesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTrips not implemented")
}
func (s *CarpoolServiceServerImpl) GetUserPlanning(ctx context.Context, req *proto.GetUserPlanningRequest) (*proto.GetUserPlanningResponse, error) {
log.Debug().Msg("grpc CarpoolService - GetRegularUserRoutes")
planned_schedules, err := s.Handler.GetUserPlanning(req.UserId, req.MinDepartureDate.AsTime(), req.MaxDepartureDate.AsTime())
if err != nil {
return nil, status.Errorf(codes.Internal, "could not get user planning : %s", err.Error())
}
results := map[string]*proto.CarpoolRoutesCollection{}
for k, scheds := range planned_schedules {
results[k] = &proto.CarpoolRoutesCollection{
Collection: []*proto.CarpoolFeatureCollection{},
}
for _, s := range scheds {
s.Route.ExtraMembers["departure_date"] = s.DepartureDate
s.Route.ExtraMembers["id"] = s.ID
fcraw, _ := s.Route.FeatureCollection().MarshalJSON()
results[k].Collection = append(results[k].Collection, &proto.CarpoolFeatureCollection{
Serialized: string(fcraw),
})
}
}
return &proto.GetUserPlanningResponse{
RoutesByDates: results,
}, nil
}

View File

@ -0,0 +1,167 @@
package grpcserver
import (
"context"
"time"
"git.coopgo.io/coopgo-platform/carpool-service/servers/grpc/proto"
"github.com/paulmach/orb"
"github.com/rs/zerolog/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
)
func (s *CarpoolServiceServerImpl) DriverJourneys(ctx context.Context, req *proto.DriverJourneysRequest) (*proto.DriverJourneysResponse, error) {
log.Debug().
Str("departure date", req.DepartureDate.String()).
Msg("grpc server - DriverJourneys")
departure := orb.Point{req.DepartureLng, req.DepartureLat}
arrival := orb.Point{req.ArrivalLng, req.ArrivalLat}
td := 900 * time.Second
if req.TimeDelta != nil {
td = time.Duration(*req.TimeDelta) * time.Second
}
departureDate := req.DepartureDate.AsTime()
minDate := departureDate.Add(-td)
maxDate := departureDate.Add(td)
log.Debug().
Str("departure_date", departureDate.Format(time.RFC3339)).
Str("mindate", minDate.Format(time.RFC3339)).
Str("maxdate", maxDate.Format(time.RFC3339)).
Int64("td", int64(td)).
Msg("DriverJourneys show dates")
journeys, err := s.Handler.GetDriverJourneys(departure, arrival, req.DepartureRadius, req.ArrivalRadius, minDate, maxDate, req.Count)
if err != nil {
log.Error().Err(err).Msg("error finding driver journeys")
return nil, err
}
results := []*proto.CarpoolServiceDriverJourney{}
for _, j := range journeys {
properties := j.Route.ExtraMembers["properties"].(map[string]any)
usermap := properties["user"].(map[string]any)
journeyId := j.ID
driverDepartureLat := j.Route.Features[0].Point().Lat()
driverDepartureLng := j.Route.Features[0].Point().Lon()
driverArrivalLat := j.Route.Features[1].Point().Lat()
driverArrivalLng := j.Route.Features[1].Point().Lon()
duration := time.Duration(0)
var distance *int64
if len(j.Itinerary.Legs) > 2 {
duration = j.Itinerary.Legs[1].Duration
dist := int64(j.Itinerary.Legs[1].Distance)
distance = &dist
}
results = append(results, &proto.CarpoolServiceDriverJourney{
Driver: &proto.CarpoolServiceUser{
Id: usermap["id"].(string),
Operator: usermap["operator"].(string),
Alias: usermap["alias"].(string),
},
Operator: "ridygo.fr",
PassengerPickupLat: req.DepartureLat,
PassengerPickupLng: req.DepartureLng,
PassengerDropLat: req.ArrivalLat,
PassengerDropLng: req.ArrivalLng,
DriverDepartureLat: &driverDepartureLat,
DriverDepartureLng: &driverDepartureLng,
DriverArrivalLat: &driverArrivalLat,
DriverArrivalLng: &driverArrivalLng,
Duration: int64(duration),
Distance: distance,
Id: journeyId,
PassengerPickupDate: timestamppb.New(j.DepartureDate.Add(j.Itinerary.Legs[0].Duration)),
DriverDepartureDate: timestamppb.New(j.DepartureDate),
Type: proto.CarpoolServiceJourneyType_PLANNED,
})
}
return &proto.DriverJourneysResponse{
DriverJourneys: results,
}, nil
}
func (s *CarpoolServiceServerImpl) PassengerJourneys(ctx context.Context, req *proto.PassengerJourneysRequest) (*proto.PassengerJourneysResponse, error) {
log.Debug().
Str("departure date", req.DepartureDate.String()).
Msg("grpc server - PassengerJourneys")
departure := orb.Point{req.DepartureLng, req.DepartureLat}
arrival := orb.Point{req.ArrivalLng, req.ArrivalLat}
td := 900 * time.Second
if req.TimeDelta != nil {
td = time.Duration(*req.TimeDelta) * time.Second
}
minDate := req.DepartureDate.AsTime().Add(-td)
maxDate := req.DepartureDate.AsTime().Add(td)
journeys, err := s.Handler.GetPassengerJourneys(departure, arrival, req.DepartureRadius, req.ArrivalRadius, minDate, maxDate, req.Count)
if err != nil {
return nil, err
}
results := []*proto.CarpoolServicePassengerJourney{}
for _, j := range journeys {
properties := j.Route.ExtraMembers["properties"].(map[string]any)
usermap := properties["user"].(map[string]any)
journeyId := j.ID
passengerDepartureLat := j.Route.Features[0].Point().Lat()
passengerDepartureLng := j.Route.Features[0].Point().Lon()
passengerArrivalLat := j.Route.Features[1].Point().Lat()
passengerArrivalLng := j.Route.Features[1].Point().Lon()
passengerDepartureDate := timestamppb.New(j.DepartureDate)
driverDepartureDate := timestamppb.New(j.DepartureDate.Add(-j.Itinerary.Legs[0].Duration))
duration := time.Duration(0)
var distance *int64
log.Debug().Any("itinerary", j.Itinerary).Msg("debug itinerary")
if len(j.Itinerary.Legs) > 2 {
duration = j.Itinerary.Legs[1].Duration / time.Second
dist := int64(j.Itinerary.Legs[1].Distance)
distance = &dist
}
results = append(results, &proto.CarpoolServicePassengerJourney{
Passenger: &proto.CarpoolServiceUser{
Id: usermap["id"].(string),
Operator: usermap["operator"].(string),
Alias: usermap["alias"].(string),
},
Operator: "ridygo.fr",
PassengerPickupLat: passengerDepartureLat,
PassengerPickupLng: passengerDepartureLng,
PassengerDropLat: passengerArrivalLat,
PassengerDropLng: passengerArrivalLng,
DriverDepartureLat: &req.DepartureLat,
DriverDepartureLng: &req.DepartureLng,
DriverArrivalLat: &req.ArrivalLat,
DriverArrivalLng: &req.ArrivalLng,
Duration: int64(duration),
Distance: distance,
Id: journeyId,
PassengerPickupDate: passengerDepartureDate,
DriverDepartureDate: driverDepartureDate,
Type: proto.CarpoolServiceJourneyType_PLANNED,
})
}
return &proto.PassengerJourneysResponse{
PassengerJourneys: results,
}, nil
}
func (s *CarpoolServiceServerImpl) DriverRegularTrips(context.Context, *proto.DriverRegularTripsRequest) (*proto.DriverRegularTripsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DriverRegularTrips not implemented")
}
func (s *CarpoolServiceServerImpl) PassengerRegularTrips(context.Context, *proto.PassengerRegularTripsRequest) (*proto.PassengerRegularTripsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PassengerRegularTrips not implemented")
}

View File

@ -7,7 +7,6 @@ import (
"git.coopgo.io/coopgo-platform/carpool-service/handler" "git.coopgo.io/coopgo-platform/carpool-service/handler"
"git.coopgo.io/coopgo-platform/carpool-service/servers/grpc/proto" "git.coopgo.io/coopgo-platform/carpool-service/servers/grpc/proto"
"github.com/paulmach/orb/geojson"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/spf13/viper" "github.com/spf13/viper"
"google.golang.org/grpc" "google.golang.org/grpc"
@ -28,74 +27,6 @@ func NewCarpoolServiceServer(handler *handler.CarpoolServiceHandler) *CarpoolSer
} }
} }
func (s *CarpoolServiceServerImpl) CreateRegularRoutes(ctx context.Context, req *proto.CreateRegularRoutesRequest) (*proto.CreateRegularRoutesResponse, error) {
log.Debug().Msg("grpc CarpoolService - CreateTrips")
routes := []*geojson.FeatureCollection{}
for _, r := range req.Routes {
route, err := geojson.UnmarshalFeatureCollection([]byte(r.Serialized))
if err == nil {
routes = append(routes, route)
}
}
if len(routes) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "no route to create")
}
if err := s.Handler.CreateRegularRoutes(routes); err != nil {
return nil, status.Errorf(codes.Internal, "could not create routes in CreateRegularRoutes : %s", err.Error())
}
return &proto.CreateRegularRoutesResponse{}, nil
}
func (s *CarpoolServiceServerImpl) DeleteRegularRoutes(context.Context, *proto.DeleteRegularRoutesRequest) (*proto.DeleteRegularRoutesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTrips not implemented")
}
func (s *CarpoolServiceServerImpl) GetUserPlanning(ctx context.Context, req *proto.GetUserPlanningRequest) (*proto.GetUserPlanningResponse, error) {
log.Debug().Msg("grpc CarpoolService - GetRegularUserRoutes")
planned_schedules, err := s.Handler.GetUserPlanning(req.UserId, req.MinDepartureDate.AsTime(), req.MaxDepartureDate.AsTime())
if err != nil {
return nil, status.Errorf(codes.Internal, "could not get user planning : %s", err.Error())
}
results := map[string]*proto.CarpoolRoutesCollection{}
for k, scheds := range planned_schedules {
results[k] = &proto.CarpoolRoutesCollection{
Collection: []*proto.CarpoolFeatureCollection{},
}
for _, s := range scheds {
s.Route.ExtraMembers["departure_date"] = s.DepartureDate
fcraw, _ := s.Route.FeatureCollection().MarshalJSON()
results[k].Collection = append(results[k].Collection, &proto.CarpoolFeatureCollection{
Serialized: string(fcraw),
})
}
}
return &proto.GetUserPlanningResponse{
RoutesByDates: results,
}, nil
}
func (s *CarpoolServiceServerImpl) DriverJourneys(context.Context, *proto.DriverJourneysRequest) (*proto.DriverJourneysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DriverJourneys not implemented")
}
func (s *CarpoolServiceServerImpl) PassengerJourneys(context.Context, *proto.PassengerJourneysRequest) (*proto.PassengerJourneysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PassengerJourneys not implemented")
}
func (s *CarpoolServiceServerImpl) DriverRegularTrips(context.Context, *proto.DriverRegularTripsRequest) (*proto.DriverRegularTripsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DriverRegularTrips not implemented")
}
func (s *CarpoolServiceServerImpl) PassengerRegularTrips(context.Context, *proto.PassengerRegularTripsRequest) (*proto.PassengerRegularTripsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PassengerRegularTrips not implemented")
}
func (s *CarpoolServiceServerImpl) CreateBooking(context.Context, *proto.CreateBookingRequest) (*proto.CreateBookingResponse, error) { func (s *CarpoolServiceServerImpl) CreateBooking(context.Context, *proto.CreateBookingRequest) (*proto.CreateBookingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBooking not implemented") return nil, status.Errorf(codes.Unimplemented, "method CreateBooking not implemented")
} }

View File

@ -12,12 +12,14 @@ import (
) )
type OCSSApiService struct { type OCSSApiService struct {
Handler *handler.CarpoolServiceHandler OperatorId string
Handler *handler.CarpoolServiceHandler
} }
func NewOCSSApiService(handler *handler.CarpoolServiceHandler) (*OCSSApiService, error) { func NewOCSSApiService(cfg *viper.Viper, handler *handler.CarpoolServiceHandler) (*OCSSApiService, error) {
return &OCSSApiService{ return &OCSSApiService{
Handler: handler, OperatorId: cfg.GetString("standards.ocss.operator_id"),
Handler: handler,
}, nil }, nil
} }
@ -31,7 +33,7 @@ func Run(done chan error, cfg *viper.Viper, handler *handler.CarpoolServiceHandl
address = ":" + cfg.GetString("services.ocss_api.port") address = ":" + cfg.GetString("services.ocss_api.port")
) )
service, err := NewOCSSApiService(handler) service, err := NewOCSSApiService(cfg, handler)
if err != nil { if err != nil {
log.Fatal().Err(err).Msg("could not initialize OCSS api service") log.Fatal().Err(err).Msg("could not initialize OCSS api service")
return return

View File

@ -23,6 +23,7 @@ type MongoDBStorage struct {
func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) { func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) {
var ( var (
mongodb_uri = cfg.GetString("storage.db.mongodb.uri")
mongodb_host = cfg.GetString("storage.db.mongodb.host") mongodb_host = cfg.GetString("storage.db.mongodb.host")
mongodb_port = cfg.GetString("storage.db.mongodb.port") mongodb_port = cfg.GetString("storage.db.mongodb.port")
mongodb_dbname = cfg.GetString("storage.db.mongodb.db_name") mongodb_dbname = cfg.GetString("storage.db.mongodb.db_name")
@ -31,9 +32,14 @@ func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) {
mongodb_bookings = cfg.GetString("storage.db.mongodb.collections.bookings") mongodb_bookings = cfg.GetString("storage.db.mongodb.collections.bookings")
mongodb_driver_candidate_journeys = cfg.GetString("storage.db.mongodb.collections.driver_candidate_journeys") mongodb_driver_candidate_journeys = cfg.GetString("storage.db.mongodb.collections.driver_candidate_journeys")
mongodb_passenger_candidate_journeys = cfg.GetString("storage.db.mongodb.collections.passenger_candidate_journeys") mongodb_passenger_candidate_journeys = cfg.GetString("storage.db.mongodb.collections.passenger_candidate_journeys")
mongodb_persisted_kv = cfg.GetString("storage.db.mongodb.collections.persisted_kv")
) )
client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://" + mongodb_host + ":" + mongodb_port)) if mongodb_uri == "" {
mongodb_uri = fmt.Sprintf("mongodb://%s:%s/%s", mongodb_host, mongodb_port, mongodb_dbname)
}
client, err := mongo.NewClient(options.Client().ApplyURI(mongodb_uri))
if err != nil { if err != nil {
return MongoDBStorage{}, err return MongoDBStorage{}, err
} }
@ -53,6 +59,7 @@ func NewMongoDBStorage(cfg *viper.Viper) (MongoDBStorage, error) {
"bookings": mongodb_bookings, "bookings": mongodb_bookings,
"driver_candidate_journeys": mongodb_driver_candidate_journeys, "driver_candidate_journeys": mongodb_driver_candidate_journeys,
"passenger_candidate_journeys": mongodb_passenger_candidate_journeys, "passenger_candidate_journeys": mongodb_passenger_candidate_journeys,
"persisted_kv": mongodb_persisted_kv,
}, },
} }
@ -215,29 +222,67 @@ func (s MongoDBStorage) GetPassengerRegularRoutesForTile(day string, gridId int6
return results, nil return results, nil
} }
func (s MongoDBStorage) StoreSearchResults(driverOrPassenger string, searchresults []internal.SearchResult) error { func (s MongoDBStorage) PersistedKVPut(documents []any) error {
collection := s.Client.Database(s.DbName).Collection(s.Collections["persisted_kv"])
log.Debug().Msg("Storage - CreateRegularRoutes")
documents := []any{}
for _, sr := range searchresults {
documents = append(documents, sr)
}
collection := s.Client.Database(s.DbName).Collection(s.Collections[fmt.Sprintf("%s_candidate_journeys", driverOrPassenger)])
if _, err := collection.InsertMany(context.TODO(), documents); err != nil { if _, err := collection.InsertMany(context.TODO(), documents); err != nil {
return err return err
} }
return nil return nil
} }
func (s MongoDBStorage) PersistedKVGet(id string, document any) error {
collection := s.Client.Database(s.DbName).Collection(s.Collections["persisted_kv"])
err := collection.FindOne(context.TODO(), bson.M{"_id": id}).Decode(document)
if err != nil {
return err
}
return nil
}
func (s MongoDBStorage) GetSearchResult(driverOrPassenger, id string) (searchResult *internal.SearchResult, err error) { func (s MongoDBStorage) StoreSearchResults(searchresults []internal.SearchResult) error {
collection := s.Client.Database(s.DbName).Collection(s.Collections[fmt.Sprintf("%s_candidate_journeys", driverOrPassenger)]) log.Debug().Msg("Storage - StoreSearchResults")
err = collection.FindOne(context.TODO(), bson.M{"_id": id}).Decode(searchResult)
return documents := []any{}
for _, sr := range searchresults {
documents = append(documents, sr)
}
return s.PersistedKVPut(documents)
}
func (s MongoDBStorage) GetSearchResult(id string) (*internal.SearchResult, error) {
var result internal.SearchResult
err := s.PersistedKVGet(id, &result)
if err != nil {
return nil, err
}
return &result, nil
}
func (s MongoDBStorage) StoreRouteSchedules(js []internal.PlannedRouteSchedule) error {
log.Debug().Msg("Storage - StoreRouteSchedules")
documents := []any{}
for _, sr := range js {
documents = append(documents, sr)
}
return s.PersistedKVPut(documents)
}
func (s MongoDBStorage) GetRouteSchedules(id string) (*internal.PlannedRouteSchedule, error) {
var result internal.PlannedRouteSchedule
err := s.PersistedKVGet(id, &result)
if err != nil {
return nil, err
}
return &result, nil
} }
func (s MongoDBStorage) CreateBooking(booking internal.Booking) error { func (s MongoDBStorage) CreateBooking(booking internal.Booking) error {

View File

@ -14,11 +14,16 @@ type Storage interface {
GetDriverRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error) GetDriverRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error)
GetPassengerRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error) GetPassengerRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error)
StoreSearchResults(string, []internal.SearchResult) error
GetSearchResult(driverOrPassenger, id string) (*internal.SearchResult, error)
CreateBooking(internal.Booking) error CreateBooking(internal.Booking) error
GetBooking(id string) (*internal.Booking, error) GetBooking(id string) (*internal.Booking, error)
// Caching temporary results
PersistedKVPut(documents []any) error
PersistedKVGet(id string, document any) error
StoreSearchResults([]internal.SearchResult) error
GetSearchResult(id string) (*internal.SearchResult, error)
StoreRouteSchedules([]internal.PlannedRouteSchedule) error
GetRouteSchedules(id string) (*internal.PlannedRouteSchedule, error)
} }
func NewStorage(cfg *viper.Viper) (Storage, error) { func NewStorage(cfg *viper.Viper) (Storage, error) {

View File

@ -2,7 +2,6 @@ package tiles
import ( import (
"github.com/paulmach/orb" "github.com/paulmach/orb"
"github.com/rs/zerolog/log"
) )
// GridId defines the position of a tile // GridId defines the position of a tile
@ -13,17 +12,14 @@ const tilesize float64 = 1.0
// PointGridId returns the id on the grid for a given point // PointGridId returns the id on the grid for a given point
func PointGridId(point orb.Point) GridId { func PointGridId(point orb.Point) GridId {
log.Debug().Any("Point", point).Msg("PointGridId")
width := int64(360 / tilesize) width := int64(360 / tilesize)
gridid := GridId(int64((point.Lat()+90)/tilesize)*width + int64((point.Lon()+180)/tilesize)) gridid := GridId(int64((point.Lat()+90)/tilesize)*width + int64((point.Lon()+180)/tilesize))
log.Debug().Any("value", gridid).Msg("")
return gridid return gridid
} }
// LineStringGridIds returns the list of ids on the grid the linestring goes through. // LineStringGridIds returns the list of ids on the grid the linestring goes through.
// In some really specific cases on tile edges, this could be unaccurate if the polyline was too much simplified // In some really specific cases on tile edges, this could be unaccurate if the polyline was too much simplified
func LineStringGridIds(linestring orb.LineString) []GridId { func LineStringGridIds(linestring orb.LineString) []GridId {
log.Debug().Any("Linestring", linestring).Msg("LineStringGridIds")
results := []GridId{} results := []GridId{}
gidmap := map[int64]bool{} gidmap := map[int64]bool{}

View File

@ -5,7 +5,6 @@ import (
"git.coopgo.io/coopgo-platform/carpool-service/storage" "git.coopgo.io/coopgo-platform/carpool-service/storage"
"github.com/paulmach/orb" "github.com/paulmach/orb"
"github.com/rs/zerolog/log"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
@ -27,11 +26,6 @@ func NewTilesHandler(cfg *viper.Viper, persistantStorage storage.Storage) (*Tile
func (h *TilesHandler) GetTiles(driverOrPassenger string, date time.Time, points ...orb.Point) (*Tileset, error) { func (h *TilesHandler) GetTiles(driverOrPassenger string, date time.Time, points ...orb.Point) (*Tileset, error) {
dateString := date.Format("2006-01-02") dateString := date.Format("2006-01-02")
log.Debug().
Any("points", points).
Str("date", dateString).
Msg("Get Tiles")
result := Tileset{} result := Tileset{}
grid_ids := []GridId{} grid_ids := []GridId{}