From b8efe7e11b464533e40baf3483e74856c2b5e791 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Fri, 17 Nov 2023 16:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=80=BB=E8=BE=91=E3=80=91=E3=80=90=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9=E3=80=91=E3=80=90?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=9D=A5=E7=9A=84link=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=80=BB=E8=BE=91=E3=80=91=E3=80=90=E7=94=B5=E6=9C=BA?= =?UTF-8?q?UDP=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/drafting.go | 30 - api/projectLink.go | 55 - api/publishedGi.go | 35 +- api/simulation.go | 7 +- api/trainManage.go | 431 ++-- config/config.go | 16 +- db/dbquery/gen.go | 24 + db/dbquery/published.gen.go | 400 ++++ db/dbquery/published_version.gen.go | 404 ++++ db/dbquery/train_info.gen.go | 392 ++++ db/model/published.gen.go | 22 + db/model/published_version.gen.go | 27 + db/model/train_info.gen.go | 20 + dto/projectLink.go | 7 +- dto/published.go | 62 + dto/publishedGi/publishedGi.go | 2 - dto/request_proto/request.pb.go | 2 +- dto/trainManage.go | 67 +- service/projectLink.go | 34 +- service/publishedGi.go | 218 +- service/trainManage.go | 65 + .../electrical_machinery.go | 74 + third_party/message/electrical_machinery.go | 56 + ts/protos/graphicData/ibpGraphics.pb.go | 2 +- ts/protos/graphicData/picture.pb.go | 2 +- ts/protos/graphicData/pslGraphics.pb.go | 2 +- .../relayCabinetLayoutGraphics.pb.go | 2 +- .../graphicData/stationLayoutGraphics.pb.go | 1975 ++++++++++------- ts/protos/state/device_state.pb.go | 2 +- .../wayside/memory/wayside_memory_generate.go | 785 ------- .../wayside/memory/wayside_memory_map.go | 22 +- .../wayside/memory/wayside_memory_train.go | 9 +- .../wayside/memory/wayside_simulation.go | 15 +- ts/test_simulation_manage.go | 22 +- 34 files changed, 3163 insertions(+), 2125 deletions(-) create mode 100644 db/dbquery/published.gen.go create mode 100644 db/dbquery/published_version.gen.go create mode 100644 db/dbquery/train_info.gen.go create mode 100644 db/model/published.gen.go create mode 100644 db/model/published_version.gen.go create mode 100644 db/model/train_info.gen.go create mode 100644 dto/published.go create mode 100644 third_party/electrical_machinery/electrical_machinery.go create mode 100644 third_party/message/electrical_machinery.go delete mode 100644 ts/simulation/wayside/memory/wayside_memory_generate.go diff --git a/api/drafting.go b/api/drafting.go index 6ff0b38..1adff0d 100644 --- a/api/drafting.go +++ b/api/drafting.go @@ -6,14 +6,11 @@ import ( jwt "github.com/appleboy/gin-jwt/v2" "github.com/gin-gonic/gin" - "google.golang.org/protobuf/proto" "joylink.club/bj-rtsts-server/db/model" "joylink.club/bj-rtsts-server/dto" "joylink.club/bj-rtsts-server/middleware" "joylink.club/bj-rtsts-server/service" "joylink.club/bj-rtsts-server/sys_error" - "joylink.club/bj-rtsts-server/ts/protos/graphicData" - "joylink.club/bj-rtsts-server/ts/simulation/wayside/memory" ) func InitDraftingRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { @@ -25,7 +22,6 @@ func InitDraftingRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddlewa authed.GET("/:id", queryDraftingInfo) authed.PUT("/:id", updateDraftingInfo) authed.DELETE("/:id", deleteDrafting) - authed.POST("/calculatelink", generateCalculateLinkData) } // 分页查询草稿 @@ -214,29 +210,3 @@ func deleteDrafting(c *gin.Context) { service.DeleteDraftingById(id) c.JSON(http.StatusOK, true) } - -// 根据地图数据新生成计算的link信息 -// -// @Summary 根据地图数据新生成计算的link信息 -// -// @Security JwtAuth -// -// @Description 根据地图数据新生成计算的link信息 -// @Tags 草稿Api -// @Accept json -// @Produce json -// @Param DraftingMapDataDto query dto.DraftingMapDataDto true "地图信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/drafting/calculatelink [post] -func generateCalculateLinkData(c *gin.Context) { - req := dto.DraftingMapDataDto{} - if err := c.ShouldBind(&req); err != nil { - panic(sys_error.New("link生成失败,参数格式错误", err)) - } - gd := &graphicData.RtssGraphicStorage{} - proto.Unmarshal(req.Proto, gd) - c.JSON(http.StatusOK, memory.BuildCalculateLinkData(gd)) -} diff --git a/api/projectLink.go b/api/projectLink.go index 4f6b8d8..db5a8a6 100644 --- a/api/projectLink.go +++ b/api/projectLink.go @@ -16,8 +16,6 @@ import ( func InitProjectLinkRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { authed := api.Group("/v1/projectLink").Use(authMiddleware.MiddlewareFunc(), middleware.PermissMiddleware) authed.GET("/info/:id", queryProjectLinkInfo) - authed.GET("/mapInfo/trainSize/:id", queryTrainSizeByMapId) - authed.GET("/project/trainSize/:id", queryTrainSizeByPId) authed.POST("", saveProjectLinkInfo) } @@ -47,59 +45,6 @@ func queryProjectLinkInfo(c *gin.Context) { c.JSON(http.StatusOK, service.QueryProjectLinkInfo(int32(int64Id))) } -// 通过项目ID查询项目的关联列车尺寸信息 -// -// @Summary 通过项目ID查询项目的关联列车尺寸信息 -// -// @Security JwtAuth -// -// @Description 通过项目ID查询项目的关联列车尺寸信息 -// @Tags 项目关联信息Api -// @Accept json -// @Produce json -// @Param id path int true "地图ID" -// @Success 200 {object} dto.TrainSizeDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/projectLink/project/trainSize/{id} [get] -func queryTrainSizeByMapId(c *gin.Context) { - id, exist := c.Params.Get("id") - if !exist { - panic(sys_error.New("查询失败,缺少id")) - } - slog.Debug("传入参数id为" + id) - int64Id, _ := strconv.ParseInt(id, 10, 64) - c.JSON(http.StatusOK, service.QueryTrainSizeByMapId(int32(int64Id))) -} - -// 通过地图ID查询项目的关联列车尺寸信息 -// -// @Summary 通过地图ID查询项目的关联列车尺寸信息 -// -// @Security JwtAuth -// -// @Description 通过地图ID查询项目的关联列车尺寸信息 -// @Tags 项目关联信息Api -// @Accept json -// @Produce json -// @Param id path int true "地图ID" -// @Success 200 {object} dto.TrainSizeDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/projectLink/mapInfo/trainSize/{id} [get] -func queryTrainSizeByPId(c *gin.Context) { - id, exist := c.Params.Get("id") - if !exist { - panic(sys_error.New("查询失败,缺少id")) - } - slog.Debug("传入参数id为" + id) - int64Id, _ := strconv.ParseInt(id, 10, 64) - trainSizeArr := service.QueryProjectTrainSize(int32(int64Id)) - c.JSON(http.StatusOK, dto.ConvertFromTrainSizeDto(trainSizeArr)) -} - // 保存项目的所有关联信息 // // @Summary 保存项目的所有关联信息 diff --git a/api/publishedGi.go b/api/publishedGi.go index 37257b5..1b01125 100644 --- a/api/publishedGi.go +++ b/api/publishedGi.go @@ -8,10 +8,11 @@ import ( jwt "github.com/appleboy/gin-jwt/v2" "github.com/gin-gonic/gin" "joylink.club/bj-rtsts-server/db/model" - "joylink.club/bj-rtsts-server/dto/publishedGi" + "joylink.club/bj-rtsts-server/dto" "joylink.club/bj-rtsts-server/middleware" "joylink.club/bj-rtsts-server/service" "joylink.club/bj-rtsts-server/sys_error" + "joylink.club/bj-rtsts-server/ts/simulation/wayside/memory" ) func InitPublishedGiRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { @@ -35,17 +36,17 @@ func InitPublishedGiRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl // @Tags 发布的图形数据Api // @Accept json // @Produce json -// @Param pagePublishedGiReqDto query publishedGi.PublishedGiReqDto true "分页查询参数" +// @Param pagePublishedReqDto query dto.PagePublishedReqDto true "分页查询参数" // @Success 200 {object} dto.PageDto // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto // @Router /api/v1/publishedGi/paging [get] func pageQueryPublishedGi(c *gin.Context) { - req := publishedGi.PublishedGiReqDto{} + req := dto.PagePublishedReqDto{} if err := c.ShouldBind(&req); err != nil { panic(sys_error.New("查询失败,查询参数格式错误", err)) } - page := service.PageQueryPublishedGi(&req) + page := service.PageQueryPublished(&req) c.JSON(http.StatusOK, page) } @@ -59,17 +60,17 @@ func pageQueryPublishedGi(c *gin.Context) { // @Tags 发布的图形数据Api // @Accept json // @Produce json -// @Param publishedGiListReqDto query publishedGi.PublishedGiListReqDto true "查询参数" +// @Param publishedListReqDto query dto.PublishedListReqDto true "查询参数" // @Success 200 {object} []model.PublishedGi // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto // @Router /api/v1/publishedGi/list [get] func listQueryPublishedGi(c *gin.Context) { - req := publishedGi.PublishedGiListReqDto{} + req := dto.PublishedListReqDto{} if err := c.ShouldBindQuery(&req); err != nil { panic(sys_error.New("查询失败,查询参数格式错误", err)) } - list := service.ListQueryPublishedGi(&req) + list := service.ListQueryPublished(&req) c.JSON(http.StatusOK, list) } @@ -84,7 +85,7 @@ func listQueryPublishedGi(c *gin.Context) { // @Accept json // @Produce json // @Param id path int true "id" -// @Success 200 {object} model.PublishedGi +// @Success 200 {object} dto.PublishedDto // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto // @Router /api/v1/publishedGi/{id} [get] @@ -94,7 +95,7 @@ func getPublishedGiById(c *gin.Context) { if err != nil { panic(sys_error.New("查询失败,传入参数格式错误", err)) } - entity := service.GetPublishedGiById(id) + entity := service.GetPublishedById(int32(id)) c.JSON(http.StatusOK, entity) } @@ -108,7 +109,7 @@ func getPublishedGiById(c *gin.Context) { // @Tags 发布的图形数据Api // @Accept json // @Produce json -// @Param PublishReqDto query publishedGi.PublishReqDto true "查询参数" +// @Param PublishReqDto query dto.PublishReqDto true "查询参数" // @Success 200 // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto @@ -116,7 +117,7 @@ func getPublishedGiById(c *gin.Context) { func publishFromDraft(c *gin.Context) { user, _ := c.Get(middleware.IdentityKey) slog.Debug("发布图形数据", user) - req := publishedGi.PublishReqDto{} + req := dto.PublishReqDto{} if err := c.ShouldBind(&req); err != nil { panic(sys_error.New("发布失败,参数格式错误", err)) } @@ -144,7 +145,9 @@ func deletePublishedGiById(c *gin.Context) { if err != nil { panic(sys_error.New("删除失败,传入参数格式错误", err)) } - service.DeletePublishedGiById(id) + mid := int32(id) + service.DeletePublishedById(mid) + memory.DeleteMapVerifyStructure(mid) // 移除内存中的发布信息 } // id 从发布数据拉取信息到草稿 @@ -158,7 +161,7 @@ func deletePublishedGiById(c *gin.Context) { // @Accept json // @Produce json // @Param id path int true "id" -// @Param PublishReqDto query publishedGi.PublishReqDto true "要保存的名称" +// @Param PublishReqDto query dto.PublishReqDto true "要保存的名称" // @Success 200 {object} nil // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto @@ -171,7 +174,7 @@ func saveAsDraftingFromPublish(c *gin.Context) { if err != nil { panic(sys_error.New("另存为草稿失败,传入参数格式错误", err)) } - req := publishedGi.PublishReqDto{} + req := dto.PublishReqDto{} if err := c.ShouldBind(&req); err != nil { panic(sys_error.New("另存为草稿失败,传入参数格式错误", err)) } @@ -188,13 +191,13 @@ func saveAsDraftingFromPublish(c *gin.Context) { // @Tags 发布的图形数据Api // @Accept json // @Produce json -// @Param PublishedGiSingleQueryDto query publishedGi.PublishedGiSingleQueryDto true "查询参数" +// @Param publishedSingleQueryDto query dto.PublishedSingleQueryDto true "查询参数" // @Success 200 {object} []model.PublishedGi // @Failure 401 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto // @Router /api/v1/publishedGi/name [get] func getPublishedGiByName(c *gin.Context) { - param := &publishedGi.PublishedGiSingleQueryDto{} + param := &dto.PublishedSingleQueryDto{} if err := c.ShouldBind(param); err != nil { panic(sys_error.New("查询失败,查询参数格式错误", err)) } diff --git a/api/simulation.go b/api/simulation.go index 9dd21d8..9193c14 100644 --- a/api/simulation.go +++ b/api/simulation.go @@ -46,10 +46,7 @@ func InitSimulationRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle } func initPublishMapInfo() { - mapArr, err := service.ListAllPublishedGi() - if err != nil { - panic("地图加载出错") - } + mapArr := service.ListAllPublished() sort.SliceStable(mapArr, func(i, j int) bool { return mapArr[i].Type != 0 }) for _, v := range mapArr { memory.PublishMapVerifyStructure(v) @@ -77,7 +74,7 @@ func createByProjectId(c *gin.Context) { panic(sys_error.New("测试启动失败,请求参数异常", err)) } // 地图信息 - mapInfos := service.QueryProjectPublishedGi(req.ProjectId) + mapInfos := service.QueryProjectPublished(req.ProjectId) if len(mapInfos) == 0 { panic(sys_error.New("测试启动失败,项目未关联发布图")) } diff --git a/api/trainManage.go b/api/trainManage.go index 10215e8..6e0e8a2 100644 --- a/api/trainManage.go +++ b/api/trainManage.go @@ -15,6 +15,13 @@ import ( func InitTrainManageRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { authed := api.Group("/v1/trainManage").Use(authMiddleware.MiddlewareFunc(), middleware.PermissMiddleware) + authed.GET("/paging", pageQueryTrainInfo) + authed.GET("/list", queryTrainInfoList) + authed.POST("", createTrainInfo) + authed.GET("/:id", queryTrainInfo) + authed.PUT("/:id", updateTrainInfo) + authed.DELETE("/:id", deleteTrainInfo) + authed.GET("/model/paging", pageQueryTrainModel) authed.GET("/model/list", queryTrainModelList) authed.POST("/model", createTrainModel) @@ -35,22 +42,161 @@ func InitTrainManageRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl authed.DELETE("/wheelDiameter/:id", deleteTrainWheelDiameter) } -// 分页查询列车型号列表 +// 分页查询列车列表 // -// @Summary 分页查询列车型号信息列表 +// @Summary 分页查询列车信息列表 // // @Security JwtAuth // -// @Description 可以通过列车型号名称过滤,分页查询列车型号信息列表 +// @Description 可以通过列车名称过滤,分页查询列车信息列表 // @Tags 列车管理Api // @Accept json // @Produce json -// @Param pageTrainManageReqDto query dto.PageTrainManageReqDto true "列车型号查询条件带分页信息" +// @Param pageTrainInfoReqDto query dto.PageTrainInfoReqDto true "列车查询条件带分页信息" // @Success 200 {object} dto.PageDto // @Failure 401 {object} dto.ErrorDto // @Failure 404 {object} dto.ErrorDto // @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model/paging [get] +// @Router /api/v1/trainManage/paging [get] +func pageQueryTrainInfo(c *gin.Context) { + req := dto.PageTrainInfoReqDto{} + if err := c.ShouldBind(&req); err != nil { + panic(sys_error.New("查询失败,参数格式错误", err)) + } + c.JSON(http.StatusOK, service.PageTrainInfoQuery(&req)) +} + +// 查询列车列表 +// +// @Summary 查询列车信息列表 +// +// @Security JwtAuth +// +// @Description 可以通过列车名称过滤,查询列车信息列表 +// @Tags 列车管理Api +// @Accept json +// @Produce json +// @Param trainInfoReqDto query dto.TrainInfoReqDto true "列车查询条件" +// @Success 200 {object} dto.PageDto +// @Failure 401 {object} dto.ErrorDto +// @Failure 404 {object} dto.ErrorDto +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/trainManage/list [get] +func queryTrainInfoList(c *gin.Context) { + req := dto.TrainInfoReqDto{} + if err := c.ShouldBind(&req); err != nil { + panic(sys_error.New("查询失败,参数格式错误", err)) + } + c.JSON(http.StatusOK, service.ListTrainInfoQuery(&req)) +} + +// 创建列车 +// +// @Summary 创建列车 +// +// @Security JwtAuth +// +// @Description 创建列车数据 +// @Tags 列车管理Api +// @Accept json +// @Produce json +// @Param trainInfoDto query dto.TrainInfoDto true "创建的列车信息" +// @Success 200 {object} nil +// @Failure 401 {object} dto.ErrorDto +// @Failure 404 {object} dto.ErrorDto +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/trainManage [post] +func createTrainInfo(c *gin.Context) { + req := dto.TrainInfoDto{} + if err := c.ShouldBind(&req); err != nil { + panic(sys_error.New("保存失败,参数格式错误", err)) + } + + c.JSON(http.StatusOK, service.CreateTrainInfo(&req)) +} + +// 查询列车详情 +// +// @Summary 查询列车详情 +// +// @Security JwtAuth +// +// @Description 查询列车详情 +// @Tags 列车管理Api +// @Accept json +// @Produce json +// @Param id path int true "列车ID" +// @Success 200 {object} model.TrainModel +// @Failure 401 {object} dto.ErrorDto +// @Failure 404 {object} dto.ErrorDto +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/trainManage/{id} [get] +func queryTrainInfo(c *gin.Context) { + id, exist := c.Params.Get("id") + if !exist { + panic(sys_error.New("查询失败,缺少主键")) + } + int64Id, _ := strconv.ParseInt(id, 10, 64) + c.JSON(http.StatusOK, service.QueryTrainInfo(int32(int64Id))) +} + +// 修改列车信息 +// +// @Summary 修改列车信息 +// +// @Security JwtAuth +// +// @Description 修改列车信息 +// @Tags 列车管理Api +// @Accept json +// @Produce json +// @Param id path int true "列车ID" +// @Param trainInfoDto query dto.TrainInfoDto true "修改的列车信息" +// @Success 200 {object} nil +// @Failure 401 {object} dto.ErrorDto +// @Failure 404 {object} dto.ErrorDto +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/trainManage/{id} [put] +func updateTrainInfo(c *gin.Context) { + id, exist := c.Params.Get("id") + if !exist { + panic(sys_error.New("更新失败,缺少主键")) + } + req := dto.TrainInfoDto{} + if err := c.ShouldBind(&req); err != nil { + panic(sys_error.New("更新失败,参数格式错误", err)) + } + int64Id, _ := strconv.ParseInt(id, 10, 64) + c.JSON(http.StatusOK, service.UpdateTrainInfo(int32(int64Id), &req)) +} + +// 删除列车数据 +// +// @Summary 删除列车数据 +// +// @Security JwtAuth +// +// @Description 删除列车数据 +// @Tags 列车管理Api +// @Accept json +// @Produce json +// @Param id path int true "列车ID" +// @Success 200 {object} nil +// @Failure 401 {object} dto.ErrorDto +// @Failure 404 {object} dto.ErrorDto +// @Failure 500 {object} dto.ErrorDto +// @Router /api/v1/trainManage/{id} [delete] +func deleteTrainInfo(c *gin.Context) { + idStr := c.Param("id") + id, err := strconv.Atoi(idStr) + if err != nil { + panic(sys_error.New("删除失败,缺少主键")) + } + service.DeleteTrainInfoById(id) + c.JSON(http.StatusOK, true) +} + +// TODO: 前端修改完毕后以下代码全部作废 func pageQueryTrainModel(c *gin.Context) { req := dto.PageTrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -59,22 +205,6 @@ func pageQueryTrainModel(c *gin.Context) { c.JSON(http.StatusOK, service.PageTrainModelQuery(&req)) } -// 创建列车型号 -// -// @Summary 创建列车型号 -// -// @Security JwtAuth -// -// @Description 创建列车型号数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainModelDto query dto.TrainModelDto true "创建的列车型号信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model [post] func createTrainModel(c *gin.Context) { req := dto.TrainModelDto{} if err := c.ShouldBind(&req); err != nil { @@ -83,22 +213,6 @@ func createTrainModel(c *gin.Context) { c.JSON(http.StatusOK, service.CreateTrainModel(&req)) } -// 查询列车型号详情 -// -// @Summary 查询列车型号详情 -// -// @Security JwtAuth -// -// @Description 查询列车型号详情 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车型号ID" -// @Success 200 {object} model.TrainModel -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model/{id} [get] func queryTrainModel(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -108,23 +222,6 @@ func queryTrainModel(c *gin.Context) { c.JSON(http.StatusOK, service.QueryTrainModel(int32(int64Id))) } -// 修改列车型号信息 -// -// @Summary 修改列车型号信息 -// -// @Security JwtAuth -// -// @Description 修改列车型号信息 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车型号ID" -// @Param trainModelDto query dto.TrainModelDto true "修改的列车型号信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model/{id} [put] func updateTrainModel(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -138,22 +235,6 @@ func updateTrainModel(c *gin.Context) { c.JSON(http.StatusOK, service.UpdateTrainModel(int32(int64Id), &req)) } -// 删除列车型号数据 -// -// @Summary 删除列车型号数据 -// -// @Security JwtAuth -// -// @Description 删除列车型号数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车型号ID" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model/{id} [delete] func deleteTrainModel(c *gin.Context) { idStr := c.Param("id") id, err := strconv.Atoi(idStr) @@ -164,22 +245,6 @@ func deleteTrainModel(c *gin.Context) { c.JSON(http.StatusOK, true) } -// 查询列车型号列表 -// -// @Summary 查询列车型号信息列表 -// -// @Security JwtAuth -// -// @Description 可以通过列车型号名称过滤,查询列车型号信息列表 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainManageReqDto query dto.TrainManageReqDto true "列车型号查询条件" -// @Success 200 {object} dto.PageDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/model/list [get] func queryTrainModelList(c *gin.Context) { req := dto.TrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -188,22 +253,6 @@ func queryTrainModelList(c *gin.Context) { c.JSON(http.StatusOK, service.ListTrainModelQuery(&req)) } -// 分页查询列车尺寸列表 -// -// @Summary 分页查询列车尺寸信息列表 -// -// @Security JwtAuth -// -// @Description 可以通过列车尺寸名称过滤,分页查询列车尺寸信息列表 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param pageTrainManageReqDto query dto.PageTrainManageReqDto true "列车尺寸查询条件带分页信息" -// @Success 200 {object} dto.PageDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size/paging [get] func pageQueryTrainSize(c *gin.Context) { req := dto.PageTrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -212,22 +261,6 @@ func pageQueryTrainSize(c *gin.Context) { c.JSON(http.StatusOK, service.PageTrainSizeQuery(&req)) } -// 查询列车尺寸列表 -// -// @Summary 查询列车尺寸信息列表 -// -// @Security JwtAuth -// -// @Description 可以通过列车尺寸名称过滤,查询列车尺寸信息列表 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainManageReqDto query dto.TrainManageReqDto true "列车尺寸查询条件" -// @Success 200 {object} dto.PageDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size/list [get] func queryTrainSizeList(c *gin.Context) { req := dto.TrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -236,22 +269,6 @@ func queryTrainSizeList(c *gin.Context) { c.JSON(http.StatusOK, service.ListTrainSizeQuery(&req)) } -// 创建列车尺寸 -// -// @Summary 创建列车尺寸 -// -// @Security JwtAuth -// -// @Description 创建列车尺寸数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainSizeDto query dto.TrainSizeDto true "创建的列车尺寸信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size [post] func createTrainSize(c *gin.Context) { req := dto.TrainSizeDto{} if err := c.ShouldBind(&req); err != nil { @@ -260,22 +277,6 @@ func createTrainSize(c *gin.Context) { c.JSON(http.StatusOK, service.CreateTrainSize(&req)) } -// 查询列车尺寸详情 -// -// @Summary 查询列车尺寸详情 -// -// @Security JwtAuth -// -// @Description 查询列车尺寸详情 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车尺寸ID" -// @Success 200 {object} model.TrainSize -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size/{id} [get] func queryTrainSize(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -285,23 +286,6 @@ func queryTrainSize(c *gin.Context) { c.JSON(http.StatusOK, service.QueryTrainSize(int32(int64Id))) } -// 修改列车尺寸信息 -// -// @Summary 修改列车尺寸信息 -// -// @Security JwtAuth -// -// @Description 修改列车尺寸信息 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车尺寸ID" -// @Param trainSizeDto query dto.TrainSizeDto true "修改的列车尺寸信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size/{id} [put] func updateTrainSize(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -315,22 +299,6 @@ func updateTrainSize(c *gin.Context) { c.JSON(http.StatusOK, service.UpdateTrainSize(int32(int64Id), &req)) } -// 删除列车尺寸数据 -// -// @Summary 删除列车尺寸数据 -// -// @Security JwtAuth -// -// @Description 删除列车尺寸数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车尺寸ID" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/size/{id} [delete] func deleteTrainSize(c *gin.Context) { idStr := c.Param("id") id, err := strconv.Atoi(idStr) @@ -341,22 +309,6 @@ func deleteTrainSize(c *gin.Context) { c.JSON(http.StatusOK, true) } -// 分页查询列车轮径列表 -// -// @Summary 分页查询列车轮径信息列表 -// -// @Security JwtAuth -// -// @Description 可以通过列车轮径名称过滤,分页查询列车轮径信息列表 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param pageTrainManageReqDto query dto.PageTrainManageReqDto true "列车轮径查询条件带分页信息" -// @Success 200 {object} dto.PageDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter/paging [get] func pageQueryTrainWheelDiameter(c *gin.Context) { req := dto.PageTrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -365,22 +317,6 @@ func pageQueryTrainWheelDiameter(c *gin.Context) { c.JSON(http.StatusOK, service.PageTrainWheelDiameterQuery(&req)) } -// 查询列车轮径列表 -// -// @Summary 查询列车轮径信息列表 -// -// @Security JwtAuth -// -// @Description 可以通过列车轮径名称过滤,查询列车轮径信息列表 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainManageReqDto query dto.TrainManageReqDto true "列车轮径查询条件" -// @Success 200 {object} dto.PageDto -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter/list [get] func queryTrainWheelDiameterList(c *gin.Context) { req := dto.TrainManageReqDto{} if err := c.ShouldBind(&req); err != nil { @@ -389,22 +325,6 @@ func queryTrainWheelDiameterList(c *gin.Context) { c.JSON(http.StatusOK, service.ListTrainWheelDiameterQuery(&req)) } -// 创建列车轮径 -// -// @Summary 创建列车轮径 -// -// @Security JwtAuth -// -// @Description 创建列车轮径数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param trainWheelDto query dto.TrainWheelDto true "创建的列车轮径信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter [post] func createTrainWheelDiameter(c *gin.Context) { req := dto.TrainWheelDto{} if err := c.ShouldBind(&req); err != nil { @@ -413,22 +333,6 @@ func createTrainWheelDiameter(c *gin.Context) { c.JSON(http.StatusOK, service.CreateTrainWheelDiameter(&req)) } -// 查询列车轮径详情 -// -// @Summary 查询列车轮径详情 -// -// @Security JwtAuth -// -// @Description 查询列车轮径详情 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车轮径ID" -// @Success 200 {object} model.TrainWheel -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter/{id} [get] func queryTrainWheelDiameter(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -438,23 +342,6 @@ func queryTrainWheelDiameter(c *gin.Context) { c.JSON(http.StatusOK, service.QueryTrainWheelDiameter(int32(int64Id))) } -// 修改列车轮径信息 -// -// @Summary 修改列车轮径信息 -// -// @Security JwtAuth -// -// @Description 修改列车轮径信息 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车轮径ID" -// @Param trainWheelDto query dto.TrainWheelDto true "修改的列车轮径信息" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter/{id} [put] func updateTrainWheelDiameter(c *gin.Context) { id, exist := c.Params.Get("id") if !exist { @@ -468,22 +355,6 @@ func updateTrainWheelDiameter(c *gin.Context) { c.JSON(http.StatusOK, service.UpdateTrainWheelDiameter(int32(int64Id), &req)) } -// 删除列车轮径数据 -// -// @Summary 删除列车轮径数据 -// -// @Security JwtAuth -// -// @Description 删除列车轮径数据 -// @Tags 列车管理Api -// @Accept json -// @Produce json -// @Param id path int true "列车轮径ID" -// @Success 200 {object} nil -// @Failure 401 {object} dto.ErrorDto -// @Failure 404 {object} dto.ErrorDto -// @Failure 500 {object} dto.ErrorDto -// @Router /api/v1/trainManage/wheelDiameter/{id} [delete] func deleteTrainWheelDiameter(c *gin.Context) { idStr := c.Param("id") id, err := strconv.Atoi(idStr) diff --git a/config/config.go b/config/config.go index ffb81ed..5346c0a 100644 --- a/config/config.go +++ b/config/config.go @@ -61,11 +61,12 @@ type mqtt struct { // 第三方配置结构 type ThridPartyConfig struct { - Id int32 `json:"id"` - Dynamics DynamicsConfig `json:"dynamics" description:"动力学配置"` - Vobc VobcConfig `json:"vobc" description:"半实物配置"` - Interlocks []InterlockConfig `json:"interlock" description:"联锁配置"` - RsspAxleCfgs []RsspAxleConfig `json:"rsspAxleCfgs" description:"所有联锁集中站计轴RSSP-I配置"` + Id int32 `json:"id"` + Dynamics DynamicsConfig `json:"dynamics" description:"动力学配置"` + Vobc VobcConfig `json:"vobc" description:"半实物配置"` + Interlocks []InterlockConfig `json:"interlock" description:"联锁配置"` + RsspAxleCfgs []RsspAxleConfig `json:"rsspAxleCfgs" description:"所有联锁集中站计轴RSSP-I配置"` + ElectricMachinery ElectricMachineryConfig `json:"electricMachinery" description:"电机配置"` } type DynamicsConfig struct { Ip string `json:"ip" description:"IP配置"` @@ -88,6 +89,11 @@ type InterlockConfig struct { Open bool `json:"open" description:"是否开启"` Code string `json:"code" description:"所属集中站"` } +type ElectricMachineryConfig struct { + Ip string `json:"ip" description:"IP配置"` + RemotePort int `json:"remotePort" description:"远端接收信息端口"` + Open bool `json:"open" description:"是否开启"` +} // RsspAxleConfig 计轴区段与联锁安全通信配置 type RsspAxleConfig struct { diff --git a/db/dbquery/gen.go b/db/dbquery/gen.go index 1b81c08..849dd4c 100644 --- a/db/dbquery/gen.go +++ b/db/dbquery/gen.go @@ -27,7 +27,10 @@ var ( ProjectPublishLink *projectPublishLink ProjectRunConfig *projectRunConfig ProjectTrainSizeLink *projectTrainSizeLink + Published *published PublishedGi *publishedGi + PublishedVersion *publishedVersion + TrainInfo *trainInfo TrainModel *trainModel TrainSensor *trainSensor TrainSize *trainSize @@ -47,7 +50,10 @@ func SetDefault(db *gorm.DB, opts ...gen.DOOption) { ProjectPublishLink = &Q.ProjectPublishLink ProjectRunConfig = &Q.ProjectRunConfig ProjectTrainSizeLink = &Q.ProjectTrainSizeLink + Published = &Q.Published PublishedGi = &Q.PublishedGi + PublishedVersion = &Q.PublishedVersion + TrainInfo = &Q.TrainInfo TrainModel = &Q.TrainModel TrainSensor = &Q.TrainSensor TrainSize = &Q.TrainSize @@ -68,7 +74,10 @@ func Use(db *gorm.DB, opts ...gen.DOOption) *Query { ProjectPublishLink: newProjectPublishLink(db, opts...), ProjectRunConfig: newProjectRunConfig(db, opts...), ProjectTrainSizeLink: newProjectTrainSizeLink(db, opts...), + Published: newPublished(db, opts...), PublishedGi: newPublishedGi(db, opts...), + PublishedVersion: newPublishedVersion(db, opts...), + TrainInfo: newTrainInfo(db, opts...), TrainModel: newTrainModel(db, opts...), TrainSensor: newTrainSensor(db, opts...), TrainSize: newTrainSize(db, opts...), @@ -90,7 +99,10 @@ type Query struct { ProjectPublishLink projectPublishLink ProjectRunConfig projectRunConfig ProjectTrainSizeLink projectTrainSizeLink + Published published PublishedGi publishedGi + PublishedVersion publishedVersion + TrainInfo trainInfo TrainModel trainModel TrainSensor trainSensor TrainSize trainSize @@ -113,7 +125,10 @@ func (q *Query) clone(db *gorm.DB) *Query { ProjectPublishLink: q.ProjectPublishLink.clone(db), ProjectRunConfig: q.ProjectRunConfig.clone(db), ProjectTrainSizeLink: q.ProjectTrainSizeLink.clone(db), + Published: q.Published.clone(db), PublishedGi: q.PublishedGi.clone(db), + PublishedVersion: q.PublishedVersion.clone(db), + TrainInfo: q.TrainInfo.clone(db), TrainModel: q.TrainModel.clone(db), TrainSensor: q.TrainSensor.clone(db), TrainSize: q.TrainSize.clone(db), @@ -143,7 +158,10 @@ func (q *Query) ReplaceDB(db *gorm.DB) *Query { ProjectPublishLink: q.ProjectPublishLink.replaceDB(db), ProjectRunConfig: q.ProjectRunConfig.replaceDB(db), ProjectTrainSizeLink: q.ProjectTrainSizeLink.replaceDB(db), + Published: q.Published.replaceDB(db), PublishedGi: q.PublishedGi.replaceDB(db), + PublishedVersion: q.PublishedVersion.replaceDB(db), + TrainInfo: q.TrainInfo.replaceDB(db), TrainModel: q.TrainModel.replaceDB(db), TrainSensor: q.TrainSensor.replaceDB(db), TrainSize: q.TrainSize.replaceDB(db), @@ -163,7 +181,10 @@ type queryCtx struct { ProjectPublishLink IProjectPublishLinkDo ProjectRunConfig IProjectRunConfigDo ProjectTrainSizeLink IProjectTrainSizeLinkDo + Published IPublishedDo PublishedGi IPublishedGiDo + PublishedVersion IPublishedVersionDo + TrainInfo ITrainInfoDo TrainModel ITrainModelDo TrainSensor ITrainSensorDo TrainSize ITrainSizeDo @@ -183,7 +204,10 @@ func (q *Query) WithContext(ctx context.Context) *queryCtx { ProjectPublishLink: q.ProjectPublishLink.WithContext(ctx), ProjectRunConfig: q.ProjectRunConfig.WithContext(ctx), ProjectTrainSizeLink: q.ProjectTrainSizeLink.WithContext(ctx), + Published: q.Published.WithContext(ctx), PublishedGi: q.PublishedGi.WithContext(ctx), + PublishedVersion: q.PublishedVersion.WithContext(ctx), + TrainInfo: q.TrainInfo.WithContext(ctx), TrainModel: q.TrainModel.WithContext(ctx), TrainSensor: q.TrainSensor.WithContext(ctx), TrainSize: q.TrainSize.WithContext(ctx), diff --git a/db/dbquery/published.gen.go b/db/dbquery/published.gen.go new file mode 100644 index 0000000..6dd9a2f --- /dev/null +++ b/db/dbquery/published.gen.go @@ -0,0 +1,400 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package dbquery + +import ( + "context" + + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + + "gorm.io/gen" + "gorm.io/gen/field" + + "gorm.io/plugin/dbresolver" + + "joylink.club/bj-rtsts-server/db/model" +) + +func newPublished(db *gorm.DB, opts ...gen.DOOption) published { + _published := published{} + + _published.publishedDo.UseDB(db, opts...) + _published.publishedDo.UseModel(&model.Published{}) + + tableName := _published.publishedDo.TableName() + _published.ALL = field.NewAsterisk(tableName) + _published.ID = field.NewInt32(tableName, "id") + _published.Code = field.NewString(tableName, "code") + _published.Category = field.NewString(tableName, "category") + _published.DataID = field.NewInt32(tableName, "data_id") + _published.Type = field.NewInt32(tableName, "type") + _published.Status = field.NewInt32(tableName, "status") + + _published.fillFieldMap() + + return _published +} + +type published struct { + publishedDo + + ALL field.Asterisk + ID field.Int32 // id + Code field.String // 发布名称 + Category field.String // 厂家信息 + DataID field.Int32 // 版本Id + Type field.Int32 // 数据类型 + Status field.Int32 // 显示状态 + + fieldMap map[string]field.Expr +} + +func (p published) Table(newTableName string) *published { + p.publishedDo.UseTable(newTableName) + return p.updateTableName(newTableName) +} + +func (p published) As(alias string) *published { + p.publishedDo.DO = *(p.publishedDo.As(alias).(*gen.DO)) + return p.updateTableName(alias) +} + +func (p *published) updateTableName(table string) *published { + p.ALL = field.NewAsterisk(table) + p.ID = field.NewInt32(table, "id") + p.Code = field.NewString(table, "code") + p.Category = field.NewString(table, "category") + p.DataID = field.NewInt32(table, "data_id") + p.Type = field.NewInt32(table, "type") + p.Status = field.NewInt32(table, "status") + + p.fillFieldMap() + + return p +} + +func (p *published) GetFieldByName(fieldName string) (field.OrderExpr, bool) { + _f, ok := p.fieldMap[fieldName] + if !ok || _f == nil { + return nil, false + } + _oe, ok := _f.(field.OrderExpr) + return _oe, ok +} + +func (p *published) fillFieldMap() { + p.fieldMap = make(map[string]field.Expr, 6) + p.fieldMap["id"] = p.ID + p.fieldMap["code"] = p.Code + p.fieldMap["category"] = p.Category + p.fieldMap["data_id"] = p.DataID + p.fieldMap["type"] = p.Type + p.fieldMap["status"] = p.Status +} + +func (p published) clone(db *gorm.DB) published { + p.publishedDo.ReplaceConnPool(db.Statement.ConnPool) + return p +} + +func (p published) replaceDB(db *gorm.DB) published { + p.publishedDo.ReplaceDB(db) + return p +} + +type publishedDo struct{ gen.DO } + +type IPublishedDo interface { + gen.SubQuery + Debug() IPublishedDo + WithContext(ctx context.Context) IPublishedDo + WithResult(fc func(tx gen.Dao)) gen.ResultInfo + ReplaceDB(db *gorm.DB) + ReadDB() IPublishedDo + WriteDB() IPublishedDo + As(alias string) gen.Dao + Session(config *gorm.Session) IPublishedDo + Columns(cols ...field.Expr) gen.Columns + Clauses(conds ...clause.Expression) IPublishedDo + Not(conds ...gen.Condition) IPublishedDo + Or(conds ...gen.Condition) IPublishedDo + Select(conds ...field.Expr) IPublishedDo + Where(conds ...gen.Condition) IPublishedDo + Order(conds ...field.Expr) IPublishedDo + Distinct(cols ...field.Expr) IPublishedDo + Omit(cols ...field.Expr) IPublishedDo + Join(table schema.Tabler, on ...field.Expr) IPublishedDo + LeftJoin(table schema.Tabler, on ...field.Expr) IPublishedDo + RightJoin(table schema.Tabler, on ...field.Expr) IPublishedDo + Group(cols ...field.Expr) IPublishedDo + Having(conds ...gen.Condition) IPublishedDo + Limit(limit int) IPublishedDo + Offset(offset int) IPublishedDo + Count() (count int64, err error) + Scopes(funcs ...func(gen.Dao) gen.Dao) IPublishedDo + Unscoped() IPublishedDo + Create(values ...*model.Published) error + CreateInBatches(values []*model.Published, batchSize int) error + Save(values ...*model.Published) error + First() (*model.Published, error) + Take() (*model.Published, error) + Last() (*model.Published, error) + Find() ([]*model.Published, error) + FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Published, err error) + FindInBatches(result *[]*model.Published, batchSize int, fc func(tx gen.Dao, batch int) error) error + Pluck(column field.Expr, dest interface{}) error + Delete(...*model.Published) (info gen.ResultInfo, err error) + Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + Updates(value interface{}) (info gen.ResultInfo, err error) + UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + UpdateColumns(value interface{}) (info gen.ResultInfo, err error) + UpdateFrom(q gen.SubQuery) gen.Dao + Attrs(attrs ...field.AssignExpr) IPublishedDo + Assign(attrs ...field.AssignExpr) IPublishedDo + Joins(fields ...field.RelationField) IPublishedDo + Preload(fields ...field.RelationField) IPublishedDo + FirstOrInit() (*model.Published, error) + FirstOrCreate() (*model.Published, error) + FindByPage(offset int, limit int) (result []*model.Published, count int64, err error) + ScanByPage(result interface{}, offset int, limit int) (count int64, err error) + Scan(result interface{}) (err error) + Returning(value interface{}, columns ...string) IPublishedDo + UnderlyingDB() *gorm.DB + schema.Tabler +} + +func (p publishedDo) Debug() IPublishedDo { + return p.withDO(p.DO.Debug()) +} + +func (p publishedDo) WithContext(ctx context.Context) IPublishedDo { + return p.withDO(p.DO.WithContext(ctx)) +} + +func (p publishedDo) ReadDB() IPublishedDo { + return p.Clauses(dbresolver.Read) +} + +func (p publishedDo) WriteDB() IPublishedDo { + return p.Clauses(dbresolver.Write) +} + +func (p publishedDo) Session(config *gorm.Session) IPublishedDo { + return p.withDO(p.DO.Session(config)) +} + +func (p publishedDo) Clauses(conds ...clause.Expression) IPublishedDo { + return p.withDO(p.DO.Clauses(conds...)) +} + +func (p publishedDo) Returning(value interface{}, columns ...string) IPublishedDo { + return p.withDO(p.DO.Returning(value, columns...)) +} + +func (p publishedDo) Not(conds ...gen.Condition) IPublishedDo { + return p.withDO(p.DO.Not(conds...)) +} + +func (p publishedDo) Or(conds ...gen.Condition) IPublishedDo { + return p.withDO(p.DO.Or(conds...)) +} + +func (p publishedDo) Select(conds ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Select(conds...)) +} + +func (p publishedDo) Where(conds ...gen.Condition) IPublishedDo { + return p.withDO(p.DO.Where(conds...)) +} + +func (p publishedDo) Order(conds ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Order(conds...)) +} + +func (p publishedDo) Distinct(cols ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Distinct(cols...)) +} + +func (p publishedDo) Omit(cols ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Omit(cols...)) +} + +func (p publishedDo) Join(table schema.Tabler, on ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Join(table, on...)) +} + +func (p publishedDo) LeftJoin(table schema.Tabler, on ...field.Expr) IPublishedDo { + return p.withDO(p.DO.LeftJoin(table, on...)) +} + +func (p publishedDo) RightJoin(table schema.Tabler, on ...field.Expr) IPublishedDo { + return p.withDO(p.DO.RightJoin(table, on...)) +} + +func (p publishedDo) Group(cols ...field.Expr) IPublishedDo { + return p.withDO(p.DO.Group(cols...)) +} + +func (p publishedDo) Having(conds ...gen.Condition) IPublishedDo { + return p.withDO(p.DO.Having(conds...)) +} + +func (p publishedDo) Limit(limit int) IPublishedDo { + return p.withDO(p.DO.Limit(limit)) +} + +func (p publishedDo) Offset(offset int) IPublishedDo { + return p.withDO(p.DO.Offset(offset)) +} + +func (p publishedDo) Scopes(funcs ...func(gen.Dao) gen.Dao) IPublishedDo { + return p.withDO(p.DO.Scopes(funcs...)) +} + +func (p publishedDo) Unscoped() IPublishedDo { + return p.withDO(p.DO.Unscoped()) +} + +func (p publishedDo) Create(values ...*model.Published) error { + if len(values) == 0 { + return nil + } + return p.DO.Create(values) +} + +func (p publishedDo) CreateInBatches(values []*model.Published, batchSize int) error { + return p.DO.CreateInBatches(values, batchSize) +} + +// Save : !!! underlying implementation is different with GORM +// The method is equivalent to executing the statement: db.Clauses(clause.OnConflict{UpdateAll: true}).Create(values) +func (p publishedDo) Save(values ...*model.Published) error { + if len(values) == 0 { + return nil + } + return p.DO.Save(values) +} + +func (p publishedDo) First() (*model.Published, error) { + if result, err := p.DO.First(); err != nil { + return nil, err + } else { + return result.(*model.Published), nil + } +} + +func (p publishedDo) Take() (*model.Published, error) { + if result, err := p.DO.Take(); err != nil { + return nil, err + } else { + return result.(*model.Published), nil + } +} + +func (p publishedDo) Last() (*model.Published, error) { + if result, err := p.DO.Last(); err != nil { + return nil, err + } else { + return result.(*model.Published), nil + } +} + +func (p publishedDo) Find() ([]*model.Published, error) { + result, err := p.DO.Find() + return result.([]*model.Published), err +} + +func (p publishedDo) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Published, err error) { + buf := make([]*model.Published, 0, batchSize) + err = p.DO.FindInBatches(&buf, batchSize, func(tx gen.Dao, batch int) error { + defer func() { results = append(results, buf...) }() + return fc(tx, batch) + }) + return results, err +} + +func (p publishedDo) FindInBatches(result *[]*model.Published, batchSize int, fc func(tx gen.Dao, batch int) error) error { + return p.DO.FindInBatches(result, batchSize, fc) +} + +func (p publishedDo) Attrs(attrs ...field.AssignExpr) IPublishedDo { + return p.withDO(p.DO.Attrs(attrs...)) +} + +func (p publishedDo) Assign(attrs ...field.AssignExpr) IPublishedDo { + return p.withDO(p.DO.Assign(attrs...)) +} + +func (p publishedDo) Joins(fields ...field.RelationField) IPublishedDo { + for _, _f := range fields { + p = *p.withDO(p.DO.Joins(_f)) + } + return &p +} + +func (p publishedDo) Preload(fields ...field.RelationField) IPublishedDo { + for _, _f := range fields { + p = *p.withDO(p.DO.Preload(_f)) + } + return &p +} + +func (p publishedDo) FirstOrInit() (*model.Published, error) { + if result, err := p.DO.FirstOrInit(); err != nil { + return nil, err + } else { + return result.(*model.Published), nil + } +} + +func (p publishedDo) FirstOrCreate() (*model.Published, error) { + if result, err := p.DO.FirstOrCreate(); err != nil { + return nil, err + } else { + return result.(*model.Published), nil + } +} + +func (p publishedDo) FindByPage(offset int, limit int) (result []*model.Published, count int64, err error) { + result, err = p.Offset(offset).Limit(limit).Find() + if err != nil { + return + } + + if size := len(result); 0 < limit && 0 < size && size < limit { + count = int64(size + offset) + return + } + + count, err = p.Offset(-1).Limit(-1).Count() + return +} + +func (p publishedDo) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) { + count, err = p.Count() + if err != nil { + return + } + + err = p.Offset(offset).Limit(limit).Scan(result) + return +} + +func (p publishedDo) Scan(result interface{}) (err error) { + return p.DO.Scan(result) +} + +func (p publishedDo) Delete(models ...*model.Published) (result gen.ResultInfo, err error) { + return p.DO.Delete(models) +} + +func (p *publishedDo) withDO(do gen.Dao) *publishedDo { + p.DO = *do.(*gen.DO) + return p +} diff --git a/db/dbquery/published_version.gen.go b/db/dbquery/published_version.gen.go new file mode 100644 index 0000000..2ac0ea2 --- /dev/null +++ b/db/dbquery/published_version.gen.go @@ -0,0 +1,404 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package dbquery + +import ( + "context" + + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + + "gorm.io/gen" + "gorm.io/gen/field" + + "gorm.io/plugin/dbresolver" + + "joylink.club/bj-rtsts-server/db/model" +) + +func newPublishedVersion(db *gorm.DB, opts ...gen.DOOption) publishedVersion { + _publishedVersion := publishedVersion{} + + _publishedVersion.publishedVersionDo.UseDB(db, opts...) + _publishedVersion.publishedVersionDo.UseModel(&model.PublishedVersion{}) + + tableName := _publishedVersion.publishedVersionDo.TableName() + _publishedVersion.ALL = field.NewAsterisk(tableName) + _publishedVersion.ID = field.NewInt32(tableName, "id") + _publishedVersion.Proto = field.NewBytes(tableName, "proto") + _publishedVersion.UserID = field.NewInt32(tableName, "user_id") + _publishedVersion.PublishAt = field.NewTime(tableName, "publish_at") + _publishedVersion.Note = field.NewString(tableName, "note") + _publishedVersion.Version = field.NewInt32(tableName, "version") + _publishedVersion.Code = field.NewString(tableName, "code") + + _publishedVersion.fillFieldMap() + + return _publishedVersion +} + +type publishedVersion struct { + publishedVersionDo + + ALL field.Asterisk + ID field.Int32 // id + Proto field.Bytes // 图形界面数据 + UserID field.Int32 // 发布用户id + PublishAt field.Time // 发布时间 + Note field.String // 发布描述 + Version field.Int32 // 版本 + Code field.String // 数据名称 + + fieldMap map[string]field.Expr +} + +func (p publishedVersion) Table(newTableName string) *publishedVersion { + p.publishedVersionDo.UseTable(newTableName) + return p.updateTableName(newTableName) +} + +func (p publishedVersion) As(alias string) *publishedVersion { + p.publishedVersionDo.DO = *(p.publishedVersionDo.As(alias).(*gen.DO)) + return p.updateTableName(alias) +} + +func (p *publishedVersion) updateTableName(table string) *publishedVersion { + p.ALL = field.NewAsterisk(table) + p.ID = field.NewInt32(table, "id") + p.Proto = field.NewBytes(table, "proto") + p.UserID = field.NewInt32(table, "user_id") + p.PublishAt = field.NewTime(table, "publish_at") + p.Note = field.NewString(table, "note") + p.Version = field.NewInt32(table, "version") + p.Code = field.NewString(table, "code") + + p.fillFieldMap() + + return p +} + +func (p *publishedVersion) GetFieldByName(fieldName string) (field.OrderExpr, bool) { + _f, ok := p.fieldMap[fieldName] + if !ok || _f == nil { + return nil, false + } + _oe, ok := _f.(field.OrderExpr) + return _oe, ok +} + +func (p *publishedVersion) fillFieldMap() { + p.fieldMap = make(map[string]field.Expr, 7) + p.fieldMap["id"] = p.ID + p.fieldMap["proto"] = p.Proto + p.fieldMap["user_id"] = p.UserID + p.fieldMap["publish_at"] = p.PublishAt + p.fieldMap["note"] = p.Note + p.fieldMap["version"] = p.Version + p.fieldMap["code"] = p.Code +} + +func (p publishedVersion) clone(db *gorm.DB) publishedVersion { + p.publishedVersionDo.ReplaceConnPool(db.Statement.ConnPool) + return p +} + +func (p publishedVersion) replaceDB(db *gorm.DB) publishedVersion { + p.publishedVersionDo.ReplaceDB(db) + return p +} + +type publishedVersionDo struct{ gen.DO } + +type IPublishedVersionDo interface { + gen.SubQuery + Debug() IPublishedVersionDo + WithContext(ctx context.Context) IPublishedVersionDo + WithResult(fc func(tx gen.Dao)) gen.ResultInfo + ReplaceDB(db *gorm.DB) + ReadDB() IPublishedVersionDo + WriteDB() IPublishedVersionDo + As(alias string) gen.Dao + Session(config *gorm.Session) IPublishedVersionDo + Columns(cols ...field.Expr) gen.Columns + Clauses(conds ...clause.Expression) IPublishedVersionDo + Not(conds ...gen.Condition) IPublishedVersionDo + Or(conds ...gen.Condition) IPublishedVersionDo + Select(conds ...field.Expr) IPublishedVersionDo + Where(conds ...gen.Condition) IPublishedVersionDo + Order(conds ...field.Expr) IPublishedVersionDo + Distinct(cols ...field.Expr) IPublishedVersionDo + Omit(cols ...field.Expr) IPublishedVersionDo + Join(table schema.Tabler, on ...field.Expr) IPublishedVersionDo + LeftJoin(table schema.Tabler, on ...field.Expr) IPublishedVersionDo + RightJoin(table schema.Tabler, on ...field.Expr) IPublishedVersionDo + Group(cols ...field.Expr) IPublishedVersionDo + Having(conds ...gen.Condition) IPublishedVersionDo + Limit(limit int) IPublishedVersionDo + Offset(offset int) IPublishedVersionDo + Count() (count int64, err error) + Scopes(funcs ...func(gen.Dao) gen.Dao) IPublishedVersionDo + Unscoped() IPublishedVersionDo + Create(values ...*model.PublishedVersion) error + CreateInBatches(values []*model.PublishedVersion, batchSize int) error + Save(values ...*model.PublishedVersion) error + First() (*model.PublishedVersion, error) + Take() (*model.PublishedVersion, error) + Last() (*model.PublishedVersion, error) + Find() ([]*model.PublishedVersion, error) + FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.PublishedVersion, err error) + FindInBatches(result *[]*model.PublishedVersion, batchSize int, fc func(tx gen.Dao, batch int) error) error + Pluck(column field.Expr, dest interface{}) error + Delete(...*model.PublishedVersion) (info gen.ResultInfo, err error) + Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + Updates(value interface{}) (info gen.ResultInfo, err error) + UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + UpdateColumns(value interface{}) (info gen.ResultInfo, err error) + UpdateFrom(q gen.SubQuery) gen.Dao + Attrs(attrs ...field.AssignExpr) IPublishedVersionDo + Assign(attrs ...field.AssignExpr) IPublishedVersionDo + Joins(fields ...field.RelationField) IPublishedVersionDo + Preload(fields ...field.RelationField) IPublishedVersionDo + FirstOrInit() (*model.PublishedVersion, error) + FirstOrCreate() (*model.PublishedVersion, error) + FindByPage(offset int, limit int) (result []*model.PublishedVersion, count int64, err error) + ScanByPage(result interface{}, offset int, limit int) (count int64, err error) + Scan(result interface{}) (err error) + Returning(value interface{}, columns ...string) IPublishedVersionDo + UnderlyingDB() *gorm.DB + schema.Tabler +} + +func (p publishedVersionDo) Debug() IPublishedVersionDo { + return p.withDO(p.DO.Debug()) +} + +func (p publishedVersionDo) WithContext(ctx context.Context) IPublishedVersionDo { + return p.withDO(p.DO.WithContext(ctx)) +} + +func (p publishedVersionDo) ReadDB() IPublishedVersionDo { + return p.Clauses(dbresolver.Read) +} + +func (p publishedVersionDo) WriteDB() IPublishedVersionDo { + return p.Clauses(dbresolver.Write) +} + +func (p publishedVersionDo) Session(config *gorm.Session) IPublishedVersionDo { + return p.withDO(p.DO.Session(config)) +} + +func (p publishedVersionDo) Clauses(conds ...clause.Expression) IPublishedVersionDo { + return p.withDO(p.DO.Clauses(conds...)) +} + +func (p publishedVersionDo) Returning(value interface{}, columns ...string) IPublishedVersionDo { + return p.withDO(p.DO.Returning(value, columns...)) +} + +func (p publishedVersionDo) Not(conds ...gen.Condition) IPublishedVersionDo { + return p.withDO(p.DO.Not(conds...)) +} + +func (p publishedVersionDo) Or(conds ...gen.Condition) IPublishedVersionDo { + return p.withDO(p.DO.Or(conds...)) +} + +func (p publishedVersionDo) Select(conds ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Select(conds...)) +} + +func (p publishedVersionDo) Where(conds ...gen.Condition) IPublishedVersionDo { + return p.withDO(p.DO.Where(conds...)) +} + +func (p publishedVersionDo) Order(conds ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Order(conds...)) +} + +func (p publishedVersionDo) Distinct(cols ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Distinct(cols...)) +} + +func (p publishedVersionDo) Omit(cols ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Omit(cols...)) +} + +func (p publishedVersionDo) Join(table schema.Tabler, on ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Join(table, on...)) +} + +func (p publishedVersionDo) LeftJoin(table schema.Tabler, on ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.LeftJoin(table, on...)) +} + +func (p publishedVersionDo) RightJoin(table schema.Tabler, on ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.RightJoin(table, on...)) +} + +func (p publishedVersionDo) Group(cols ...field.Expr) IPublishedVersionDo { + return p.withDO(p.DO.Group(cols...)) +} + +func (p publishedVersionDo) Having(conds ...gen.Condition) IPublishedVersionDo { + return p.withDO(p.DO.Having(conds...)) +} + +func (p publishedVersionDo) Limit(limit int) IPublishedVersionDo { + return p.withDO(p.DO.Limit(limit)) +} + +func (p publishedVersionDo) Offset(offset int) IPublishedVersionDo { + return p.withDO(p.DO.Offset(offset)) +} + +func (p publishedVersionDo) Scopes(funcs ...func(gen.Dao) gen.Dao) IPublishedVersionDo { + return p.withDO(p.DO.Scopes(funcs...)) +} + +func (p publishedVersionDo) Unscoped() IPublishedVersionDo { + return p.withDO(p.DO.Unscoped()) +} + +func (p publishedVersionDo) Create(values ...*model.PublishedVersion) error { + if len(values) == 0 { + return nil + } + return p.DO.Create(values) +} + +func (p publishedVersionDo) CreateInBatches(values []*model.PublishedVersion, batchSize int) error { + return p.DO.CreateInBatches(values, batchSize) +} + +// Save : !!! underlying implementation is different with GORM +// The method is equivalent to executing the statement: db.Clauses(clause.OnConflict{UpdateAll: true}).Create(values) +func (p publishedVersionDo) Save(values ...*model.PublishedVersion) error { + if len(values) == 0 { + return nil + } + return p.DO.Save(values) +} + +func (p publishedVersionDo) First() (*model.PublishedVersion, error) { + if result, err := p.DO.First(); err != nil { + return nil, err + } else { + return result.(*model.PublishedVersion), nil + } +} + +func (p publishedVersionDo) Take() (*model.PublishedVersion, error) { + if result, err := p.DO.Take(); err != nil { + return nil, err + } else { + return result.(*model.PublishedVersion), nil + } +} + +func (p publishedVersionDo) Last() (*model.PublishedVersion, error) { + if result, err := p.DO.Last(); err != nil { + return nil, err + } else { + return result.(*model.PublishedVersion), nil + } +} + +func (p publishedVersionDo) Find() ([]*model.PublishedVersion, error) { + result, err := p.DO.Find() + return result.([]*model.PublishedVersion), err +} + +func (p publishedVersionDo) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.PublishedVersion, err error) { + buf := make([]*model.PublishedVersion, 0, batchSize) + err = p.DO.FindInBatches(&buf, batchSize, func(tx gen.Dao, batch int) error { + defer func() { results = append(results, buf...) }() + return fc(tx, batch) + }) + return results, err +} + +func (p publishedVersionDo) FindInBatches(result *[]*model.PublishedVersion, batchSize int, fc func(tx gen.Dao, batch int) error) error { + return p.DO.FindInBatches(result, batchSize, fc) +} + +func (p publishedVersionDo) Attrs(attrs ...field.AssignExpr) IPublishedVersionDo { + return p.withDO(p.DO.Attrs(attrs...)) +} + +func (p publishedVersionDo) Assign(attrs ...field.AssignExpr) IPublishedVersionDo { + return p.withDO(p.DO.Assign(attrs...)) +} + +func (p publishedVersionDo) Joins(fields ...field.RelationField) IPublishedVersionDo { + for _, _f := range fields { + p = *p.withDO(p.DO.Joins(_f)) + } + return &p +} + +func (p publishedVersionDo) Preload(fields ...field.RelationField) IPublishedVersionDo { + for _, _f := range fields { + p = *p.withDO(p.DO.Preload(_f)) + } + return &p +} + +func (p publishedVersionDo) FirstOrInit() (*model.PublishedVersion, error) { + if result, err := p.DO.FirstOrInit(); err != nil { + return nil, err + } else { + return result.(*model.PublishedVersion), nil + } +} + +func (p publishedVersionDo) FirstOrCreate() (*model.PublishedVersion, error) { + if result, err := p.DO.FirstOrCreate(); err != nil { + return nil, err + } else { + return result.(*model.PublishedVersion), nil + } +} + +func (p publishedVersionDo) FindByPage(offset int, limit int) (result []*model.PublishedVersion, count int64, err error) { + result, err = p.Offset(offset).Limit(limit).Find() + if err != nil { + return + } + + if size := len(result); 0 < limit && 0 < size && size < limit { + count = int64(size + offset) + return + } + + count, err = p.Offset(-1).Limit(-1).Count() + return +} + +func (p publishedVersionDo) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) { + count, err = p.Count() + if err != nil { + return + } + + err = p.Offset(offset).Limit(limit).Scan(result) + return +} + +func (p publishedVersionDo) Scan(result interface{}) (err error) { + return p.DO.Scan(result) +} + +func (p publishedVersionDo) Delete(models ...*model.PublishedVersion) (result gen.ResultInfo, err error) { + return p.DO.Delete(models) +} + +func (p *publishedVersionDo) withDO(do gen.Dao) *publishedVersionDo { + p.DO = *do.(*gen.DO) + return p +} diff --git a/db/dbquery/train_info.gen.go b/db/dbquery/train_info.gen.go new file mode 100644 index 0000000..22857db --- /dev/null +++ b/db/dbquery/train_info.gen.go @@ -0,0 +1,392 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package dbquery + +import ( + "context" + + "gorm.io/gorm" + "gorm.io/gorm/clause" + "gorm.io/gorm/schema" + + "gorm.io/gen" + "gorm.io/gen/field" + + "gorm.io/plugin/dbresolver" + + "joylink.club/bj-rtsts-server/db/model" +) + +func newTrainInfo(db *gorm.DB, opts ...gen.DOOption) trainInfo { + _trainInfo := trainInfo{} + + _trainInfo.trainInfoDo.UseDB(db, opts...) + _trainInfo.trainInfoDo.UseModel(&model.TrainInfo{}) + + tableName := _trainInfo.trainInfoDo.TableName() + _trainInfo.ALL = field.NewAsterisk(tableName) + _trainInfo.ID = field.NewInt32(tableName, "id") + _trainInfo.Name = field.NewString(tableName, "name") + _trainInfo.Proto = field.NewBytes(tableName, "proto") + _trainInfo.Description = field.NewString(tableName, "description") + + _trainInfo.fillFieldMap() + + return _trainInfo +} + +type trainInfo struct { + trainInfoDo + + ALL field.Asterisk + ID field.Int32 // id + Name field.String // 列车信息 + Proto field.Bytes // 列车参数信息 + Description field.String // 其他描述内容 + + fieldMap map[string]field.Expr +} + +func (t trainInfo) Table(newTableName string) *trainInfo { + t.trainInfoDo.UseTable(newTableName) + return t.updateTableName(newTableName) +} + +func (t trainInfo) As(alias string) *trainInfo { + t.trainInfoDo.DO = *(t.trainInfoDo.As(alias).(*gen.DO)) + return t.updateTableName(alias) +} + +func (t *trainInfo) updateTableName(table string) *trainInfo { + t.ALL = field.NewAsterisk(table) + t.ID = field.NewInt32(table, "id") + t.Name = field.NewString(table, "name") + t.Proto = field.NewBytes(table, "proto") + t.Description = field.NewString(table, "description") + + t.fillFieldMap() + + return t +} + +func (t *trainInfo) GetFieldByName(fieldName string) (field.OrderExpr, bool) { + _f, ok := t.fieldMap[fieldName] + if !ok || _f == nil { + return nil, false + } + _oe, ok := _f.(field.OrderExpr) + return _oe, ok +} + +func (t *trainInfo) fillFieldMap() { + t.fieldMap = make(map[string]field.Expr, 4) + t.fieldMap["id"] = t.ID + t.fieldMap["name"] = t.Name + t.fieldMap["proto"] = t.Proto + t.fieldMap["description"] = t.Description +} + +func (t trainInfo) clone(db *gorm.DB) trainInfo { + t.trainInfoDo.ReplaceConnPool(db.Statement.ConnPool) + return t +} + +func (t trainInfo) replaceDB(db *gorm.DB) trainInfo { + t.trainInfoDo.ReplaceDB(db) + return t +} + +type trainInfoDo struct{ gen.DO } + +type ITrainInfoDo interface { + gen.SubQuery + Debug() ITrainInfoDo + WithContext(ctx context.Context) ITrainInfoDo + WithResult(fc func(tx gen.Dao)) gen.ResultInfo + ReplaceDB(db *gorm.DB) + ReadDB() ITrainInfoDo + WriteDB() ITrainInfoDo + As(alias string) gen.Dao + Session(config *gorm.Session) ITrainInfoDo + Columns(cols ...field.Expr) gen.Columns + Clauses(conds ...clause.Expression) ITrainInfoDo + Not(conds ...gen.Condition) ITrainInfoDo + Or(conds ...gen.Condition) ITrainInfoDo + Select(conds ...field.Expr) ITrainInfoDo + Where(conds ...gen.Condition) ITrainInfoDo + Order(conds ...field.Expr) ITrainInfoDo + Distinct(cols ...field.Expr) ITrainInfoDo + Omit(cols ...field.Expr) ITrainInfoDo + Join(table schema.Tabler, on ...field.Expr) ITrainInfoDo + LeftJoin(table schema.Tabler, on ...field.Expr) ITrainInfoDo + RightJoin(table schema.Tabler, on ...field.Expr) ITrainInfoDo + Group(cols ...field.Expr) ITrainInfoDo + Having(conds ...gen.Condition) ITrainInfoDo + Limit(limit int) ITrainInfoDo + Offset(offset int) ITrainInfoDo + Count() (count int64, err error) + Scopes(funcs ...func(gen.Dao) gen.Dao) ITrainInfoDo + Unscoped() ITrainInfoDo + Create(values ...*model.TrainInfo) error + CreateInBatches(values []*model.TrainInfo, batchSize int) error + Save(values ...*model.TrainInfo) error + First() (*model.TrainInfo, error) + Take() (*model.TrainInfo, error) + Last() (*model.TrainInfo, error) + Find() ([]*model.TrainInfo, error) + FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TrainInfo, err error) + FindInBatches(result *[]*model.TrainInfo, batchSize int, fc func(tx gen.Dao, batch int) error) error + Pluck(column field.Expr, dest interface{}) error + Delete(...*model.TrainInfo) (info gen.ResultInfo, err error) + Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + Updates(value interface{}) (info gen.ResultInfo, err error) + UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) + UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) + UpdateColumns(value interface{}) (info gen.ResultInfo, err error) + UpdateFrom(q gen.SubQuery) gen.Dao + Attrs(attrs ...field.AssignExpr) ITrainInfoDo + Assign(attrs ...field.AssignExpr) ITrainInfoDo + Joins(fields ...field.RelationField) ITrainInfoDo + Preload(fields ...field.RelationField) ITrainInfoDo + FirstOrInit() (*model.TrainInfo, error) + FirstOrCreate() (*model.TrainInfo, error) + FindByPage(offset int, limit int) (result []*model.TrainInfo, count int64, err error) + ScanByPage(result interface{}, offset int, limit int) (count int64, err error) + Scan(result interface{}) (err error) + Returning(value interface{}, columns ...string) ITrainInfoDo + UnderlyingDB() *gorm.DB + schema.Tabler +} + +func (t trainInfoDo) Debug() ITrainInfoDo { + return t.withDO(t.DO.Debug()) +} + +func (t trainInfoDo) WithContext(ctx context.Context) ITrainInfoDo { + return t.withDO(t.DO.WithContext(ctx)) +} + +func (t trainInfoDo) ReadDB() ITrainInfoDo { + return t.Clauses(dbresolver.Read) +} + +func (t trainInfoDo) WriteDB() ITrainInfoDo { + return t.Clauses(dbresolver.Write) +} + +func (t trainInfoDo) Session(config *gorm.Session) ITrainInfoDo { + return t.withDO(t.DO.Session(config)) +} + +func (t trainInfoDo) Clauses(conds ...clause.Expression) ITrainInfoDo { + return t.withDO(t.DO.Clauses(conds...)) +} + +func (t trainInfoDo) Returning(value interface{}, columns ...string) ITrainInfoDo { + return t.withDO(t.DO.Returning(value, columns...)) +} + +func (t trainInfoDo) Not(conds ...gen.Condition) ITrainInfoDo { + return t.withDO(t.DO.Not(conds...)) +} + +func (t trainInfoDo) Or(conds ...gen.Condition) ITrainInfoDo { + return t.withDO(t.DO.Or(conds...)) +} + +func (t trainInfoDo) Select(conds ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Select(conds...)) +} + +func (t trainInfoDo) Where(conds ...gen.Condition) ITrainInfoDo { + return t.withDO(t.DO.Where(conds...)) +} + +func (t trainInfoDo) Order(conds ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Order(conds...)) +} + +func (t trainInfoDo) Distinct(cols ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Distinct(cols...)) +} + +func (t trainInfoDo) Omit(cols ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Omit(cols...)) +} + +func (t trainInfoDo) Join(table schema.Tabler, on ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Join(table, on...)) +} + +func (t trainInfoDo) LeftJoin(table schema.Tabler, on ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.LeftJoin(table, on...)) +} + +func (t trainInfoDo) RightJoin(table schema.Tabler, on ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.RightJoin(table, on...)) +} + +func (t trainInfoDo) Group(cols ...field.Expr) ITrainInfoDo { + return t.withDO(t.DO.Group(cols...)) +} + +func (t trainInfoDo) Having(conds ...gen.Condition) ITrainInfoDo { + return t.withDO(t.DO.Having(conds...)) +} + +func (t trainInfoDo) Limit(limit int) ITrainInfoDo { + return t.withDO(t.DO.Limit(limit)) +} + +func (t trainInfoDo) Offset(offset int) ITrainInfoDo { + return t.withDO(t.DO.Offset(offset)) +} + +func (t trainInfoDo) Scopes(funcs ...func(gen.Dao) gen.Dao) ITrainInfoDo { + return t.withDO(t.DO.Scopes(funcs...)) +} + +func (t trainInfoDo) Unscoped() ITrainInfoDo { + return t.withDO(t.DO.Unscoped()) +} + +func (t trainInfoDo) Create(values ...*model.TrainInfo) error { + if len(values) == 0 { + return nil + } + return t.DO.Create(values) +} + +func (t trainInfoDo) CreateInBatches(values []*model.TrainInfo, batchSize int) error { + return t.DO.CreateInBatches(values, batchSize) +} + +// Save : !!! underlying implementation is different with GORM +// The method is equivalent to executing the statement: db.Clauses(clause.OnConflict{UpdateAll: true}).Create(values) +func (t trainInfoDo) Save(values ...*model.TrainInfo) error { + if len(values) == 0 { + return nil + } + return t.DO.Save(values) +} + +func (t trainInfoDo) First() (*model.TrainInfo, error) { + if result, err := t.DO.First(); err != nil { + return nil, err + } else { + return result.(*model.TrainInfo), nil + } +} + +func (t trainInfoDo) Take() (*model.TrainInfo, error) { + if result, err := t.DO.Take(); err != nil { + return nil, err + } else { + return result.(*model.TrainInfo), nil + } +} + +func (t trainInfoDo) Last() (*model.TrainInfo, error) { + if result, err := t.DO.Last(); err != nil { + return nil, err + } else { + return result.(*model.TrainInfo), nil + } +} + +func (t trainInfoDo) Find() ([]*model.TrainInfo, error) { + result, err := t.DO.Find() + return result.([]*model.TrainInfo), err +} + +func (t trainInfoDo) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.TrainInfo, err error) { + buf := make([]*model.TrainInfo, 0, batchSize) + err = t.DO.FindInBatches(&buf, batchSize, func(tx gen.Dao, batch int) error { + defer func() { results = append(results, buf...) }() + return fc(tx, batch) + }) + return results, err +} + +func (t trainInfoDo) FindInBatches(result *[]*model.TrainInfo, batchSize int, fc func(tx gen.Dao, batch int) error) error { + return t.DO.FindInBatches(result, batchSize, fc) +} + +func (t trainInfoDo) Attrs(attrs ...field.AssignExpr) ITrainInfoDo { + return t.withDO(t.DO.Attrs(attrs...)) +} + +func (t trainInfoDo) Assign(attrs ...field.AssignExpr) ITrainInfoDo { + return t.withDO(t.DO.Assign(attrs...)) +} + +func (t trainInfoDo) Joins(fields ...field.RelationField) ITrainInfoDo { + for _, _f := range fields { + t = *t.withDO(t.DO.Joins(_f)) + } + return &t +} + +func (t trainInfoDo) Preload(fields ...field.RelationField) ITrainInfoDo { + for _, _f := range fields { + t = *t.withDO(t.DO.Preload(_f)) + } + return &t +} + +func (t trainInfoDo) FirstOrInit() (*model.TrainInfo, error) { + if result, err := t.DO.FirstOrInit(); err != nil { + return nil, err + } else { + return result.(*model.TrainInfo), nil + } +} + +func (t trainInfoDo) FirstOrCreate() (*model.TrainInfo, error) { + if result, err := t.DO.FirstOrCreate(); err != nil { + return nil, err + } else { + return result.(*model.TrainInfo), nil + } +} + +func (t trainInfoDo) FindByPage(offset int, limit int) (result []*model.TrainInfo, count int64, err error) { + result, err = t.Offset(offset).Limit(limit).Find() + if err != nil { + return + } + + if size := len(result); 0 < limit && 0 < size && size < limit { + count = int64(size + offset) + return + } + + count, err = t.Offset(-1).Limit(-1).Count() + return +} + +func (t trainInfoDo) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) { + count, err = t.Count() + if err != nil { + return + } + + err = t.Offset(offset).Limit(limit).Scan(result) + return +} + +func (t trainInfoDo) Scan(result interface{}) (err error) { + return t.DO.Scan(result) +} + +func (t trainInfoDo) Delete(models ...*model.TrainInfo) (result gen.ResultInfo, err error) { + return t.DO.Delete(models) +} + +func (t *trainInfoDo) withDO(do gen.Dao) *trainInfoDo { + t.DO = *do.(*gen.DO) + return t +} diff --git a/db/model/published.gen.go b/db/model/published.gen.go new file mode 100644 index 0000000..2f7ccfe --- /dev/null +++ b/db/model/published.gen.go @@ -0,0 +1,22 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package model + +const TableNamePublished = "published" + +// Published mapped from table +type Published struct { + ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id + Code string `gorm:"column:code;not null;comment:发布名称" json:"code"` // 发布名称 + Category string `gorm:"column:category;comment:厂家信息" json:"category"` // 厂家信息 + DataID int32 `gorm:"column:data_id;comment:版本Id" json:"data_id"` // 版本Id + Type int32 `gorm:"column:type;comment:数据类型" json:"type"` // 数据类型 + Status int32 `gorm:"column:status;default:1;comment:显示状态" json:"status"` // 显示状态 +} + +// TableName Published's table name +func (*Published) TableName() string { + return TableNamePublished +} diff --git a/db/model/published_version.gen.go b/db/model/published_version.gen.go new file mode 100644 index 0000000..29f307b --- /dev/null +++ b/db/model/published_version.gen.go @@ -0,0 +1,27 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package model + +import ( + "time" +) + +const TableNamePublishedVersion = "published_version" + +// PublishedVersion mapped from table +type PublishedVersion struct { + ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id + Proto []byte `gorm:"column:proto;not null;comment:图形界面数据" json:"proto"` // 图形界面数据 + UserID int32 `gorm:"column:user_id;not null;comment:发布用户id" json:"user_id"` // 发布用户id + PublishAt time.Time `gorm:"column:publish_at;not null;comment:发布时间" json:"publish_at"` // 发布时间 + Note string `gorm:"column:note;comment:发布描述" json:"note"` // 发布描述 + Version int32 `gorm:"column:version;comment:版本" json:"version"` // 版本 + Code string `gorm:"column:code;comment:数据名称" json:"code"` // 数据名称 +} + +// TableName PublishedVersion's table name +func (*PublishedVersion) TableName() string { + return TableNamePublishedVersion +} diff --git a/db/model/train_info.gen.go b/db/model/train_info.gen.go new file mode 100644 index 0000000..5289b11 --- /dev/null +++ b/db/model/train_info.gen.go @@ -0,0 +1,20 @@ +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. +// Code generated by gorm.io/gen. DO NOT EDIT. + +package model + +const TableNameTrainInfo = "train_info" + +// TrainInfo mapped from table +type TrainInfo struct { + ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id + Name string `gorm:"column:name;not null;comment:列车信息" json:"name"` // 列车信息 + Proto []byte `gorm:"column:proto;not null;comment:列车参数信息" json:"proto"` // 列车参数信息 + Description string `gorm:"column:description;comment:其他描述内容" json:"description"` // 其他描述内容 +} + +// TableName TrainInfo's table name +func (*TrainInfo) TableName() string { + return TableNameTrainInfo +} diff --git a/dto/projectLink.go b/dto/projectLink.go index 6b50a87..d25ff02 100644 --- a/dto/projectLink.go +++ b/dto/projectLink.go @@ -6,13 +6,11 @@ type ProjectLinkRspDto struct { Pid int32 `json:"pid" form:"pid"` Name string `json:"name" form:"name"` Code string `json:"code" form:"code"` - TrainSizeLinks []*TrainSizeDto `json:"trainSizeLinks" form:"trainSizeLinks"` PublishedGiLinks []*PublishedGiLinkDto `json:"mapInfoLinks" form:"mapInfoLinks"` } type ProjectLinkReqDto struct { Pid int32 `json:"pid" form:"pid"` - Sids []*int32 `json:"sids" form:"sids"` Mids []*int32 `json:"mids" form:"mids"` } @@ -28,15 +26,14 @@ func ConvertProjectLink(gi *model.Project) *ProjectLinkRspDto { Pid: gi.ID, Name: gi.Name, Code: gi.Code, - TrainSizeLinks: []*TrainSizeDto{}, PublishedGiLinks: []*PublishedGiLinkDto{}, } } -func ConvertFromPublishedGiLink(giSlice []*model.PublishedGi) []*PublishedGiLinkDto { +func ConvertFromPublishedGiLink(giSlice []*model.Published) []*PublishedGiLinkDto { var result []*PublishedGiLinkDto for _, gi := range giSlice { - result = append(result, &PublishedGiLinkDto{Id: gi.ID, Name: gi.Name, Category: gi.Category, Type: gi.Type}) + result = append(result, &PublishedGiLinkDto{Id: gi.ID, Name: gi.Code, Category: gi.Category, Type: gi.Type}) } return result } diff --git a/dto/published.go b/dto/published.go new file mode 100644 index 0000000..9f143cc --- /dev/null +++ b/dto/published.go @@ -0,0 +1,62 @@ +package dto + +import "joylink.club/bj-rtsts-server/db/model" + +type PagePublishedReqDto struct { + PageQueryDto + Name string `json:"name" form:"name"` +} + +type PublishedListReqDto struct { + Name string `json:"name" form:"name"` +} + +type PublishedDto struct { + ID int32 `json:"id"` + Name string `json:"name"` + Proto []byte `json:"proto"` + UserID int32 `json:"userID"` + Note string `json:"note"` + Type int32 `json:"type"` + Category string `json:"category" form:"category"` + PublishAt JsonTime `json:"publishAt" time_format:"2006-01-02 15:04:05"` +} + +func ConvertFromPublisheds(ps []*model.Published, ds []*model.PublishedVersion) []*PublishedDto { + vm := make(map[int32]*model.PublishedVersion) + for _, m := range ds { + vm[m.ID] = m + } + var result []*PublishedDto + for _, p := range ps { + result = append(result, ConvertFromPublished(p, vm[p.DataID])) + } + return result +} + +func ConvertFromPublished(gi *model.Published, d *model.PublishedVersion) *PublishedDto { + return &PublishedDto{ + ID: gi.ID, + Name: gi.Code, + Category: gi.Category, + Type: gi.Type, + Proto: d.Proto, + UserID: d.UserID, + Note: d.Note, + PublishAt: JsonTime(d.PublishAt), + } +} + +type PublishReqDto struct { + //发布后的名称 + Name string `json:"name" form:"name"` + //草稿数据的id + DraftId int32 `json:"draftId" form:"draftId"` + Note string `json:"note" form:"note"` +} + +// PublishedGiSingleQueryDto 单个查询发布地图数据 +type PublishedSingleQueryDto struct { + Name string `json:"name" form:"name"` + Detail bool `json:"detail" form:"detail"` +} diff --git a/dto/publishedGi/publishedGi.go b/dto/publishedGi/publishedGi.go index 381e0c8..5457e24 100644 --- a/dto/publishedGi/publishedGi.go +++ b/dto/publishedGi/publishedGi.go @@ -8,8 +8,6 @@ import ( type PublishedGiReqDto struct { dto.PageQueryDto Name string `json:"name" form:"name"` - - Time dto.JsonTime `json:"time" form:"time" time_format:"2006-01-02 15:04:05"` } type PublishedGiListReqDto struct { diff --git a/dto/request_proto/request.pb.go b/dto/request_proto/request.pb.go index bf96f27..e8b1df2 100644 --- a/dto/request_proto/request.pb.go +++ b/dto/request_proto/request.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: request.proto diff --git a/dto/trainManage.go b/dto/trainManage.go index 229440a..d05c5c1 100644 --- a/dto/trainManage.go +++ b/dto/trainManage.go @@ -1,7 +1,72 @@ package dto -import "joylink.club/bj-rtsts-server/db/model" +import ( + "google.golang.org/protobuf/proto" + "joylink.club/bj-rtsts-server/db/model" + "joylink.club/bj-rtsts-server/ts/protos/graphicData" +) +type PageTrainInfoReqDto struct { + PageQueryDto + Name string `json:"name" form:"name"` +} + +type TrainInfoReqDto struct { + Name string `json:"name" form:"name"` +} + +type TrainInfoDto struct { + Id int32 `json:"id" form:"id"` + Name string `json:"name" form:"name"` + TrainModel int32 `json:"train_model" form:"train_model"` + CarriageLength int32 `json:"carriage_length" form:"carriage_length"` + TotalLength int32 `json:"total_length" form:"total_length"` + MinDiameter int32 `json:"min_diameter" form:"min_diameter"` + MaxDiameter int32 `json:"max_diameter" form:"max_diameter"` + TrainSets string `json:"train_sets" form:"train_sets"` + Description string `json:"description" form:"description"` +} + +func ConvertToTrainInfoDto(trailInfos []*model.TrainInfo) []*TrainInfoDto { + var result []*TrainInfoDto + for _, t := range trailInfos { + result = append(result, ConvertDtoFromTrainInfo(t)) + } + return result +} + +func ConvertDtoFromTrainInfo(t *model.TrainInfo) *TrainInfoDto { + message := &graphicData.Train{} + proto.Unmarshal(t.Proto, message) + return &TrainInfoDto{ + Id: t.ID, + Name: t.Name, + Description: t.Description, + TrainModel: int32(message.TrainModel), + CarriageLength: message.CarriageLength, + TotalLength: message.TotalLength, + MinDiameter: message.MinDiameter, + MaxDiameter: message.MaxDiameter, + TrainSets: message.TrainSets, + } +} + +func ConvertTrainInfoFromDto(t *TrainInfoDto) *model.TrainInfo { + info := &model.TrainInfo{Name: t.Name, Description: t.Description} + message := &graphicData.Train{ + TrainModel: graphicData.Train_TrainModel(t.TrainModel), + CarriageLength: t.CarriageLength, + TotalLength: t.TotalLength, + MinDiameter: t.MinDiameter, + MaxDiameter: t.MaxDiameter, + TrainSets: t.TrainSets, + } + b, _ := proto.Marshal(message) + info.Proto = b + return info +} + +// TODO: 前端修改完毕后以下代码全部删除 type PageTrainManageReqDto struct { PageQueryDto Name string `json:"name" form:"name"` diff --git a/service/projectLink.go b/service/projectLink.go index b511da7..f9b7d55 100644 --- a/service/projectLink.go +++ b/service/projectLink.go @@ -13,54 +13,22 @@ func QueryProjectLinkInfo(id int32) *dto.ProjectLinkRspDto { panic(proErr) } projectLink := dto.ConvertProjectLink(pro) - // 关联列车尺寸列表 - projectLink.TrainSizeLinks = dto.ConvertFromTrainSizeDto(QueryProjectTrainSize(id)) // 关联地图列表 - projectLink.PublishedGiLinks = dto.ConvertFromPublishedGiLink(QueryProjectPublishedGi(id)) + projectLink.PublishedGiLinks = dto.ConvertFromPublishedGiLink(QueryProjectPublished(id)) return projectLink } -// 通过地图ID获取列车尺寸列表 -func QueryTrainSizeByMapId(mid int32) []*dto.TrainSizeDto { - pl, err := dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Mid.Eq(mid)).First() - if err != nil { - panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) - } - return dto.ConvertFromTrainSizeDto(QueryProjectTrainSize(pl.Pid)) -} - // 更新项目关联关系 func UpdateProjectLink(req *dto.ProjectLinkReqDto) { - // 删除原来信息 - delProjectSizeLink(req.Pid) delProjectMapLink(req.Pid) - // 保存新关联关系 - saveProjectSize(req.Pid, req.Sids) saveProjectMapLink(req.Pid, req.Mids) } -// 删除项目列车尺寸关联关系 -func delProjectSizeLink(pid int32) { - dbquery.ProjectTrainSizeLink.Where(dbquery.ProjectTrainSizeLink.Pid.Eq(pid)).Delete() -} - // 删除项目地图关联关系 func delProjectMapLink(pid int32) { dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Pid.Eq(pid)).Delete() } -// 保存项目尺寸关联关系 -func saveProjectSize(pid int32, sids []*int32) { - if len(sids) == 0 { - return - } - sizeInfos := make([]*model.ProjectTrainSizeLink, len(sids)) - for i, sid := range sids { - sizeInfos[i] = &model.ProjectTrainSizeLink{Pid: pid, Sid: *sid} - } - dbquery.ProjectTrainSizeLink.Save(sizeInfos...) -} - // 保存项目地图关联关系 func saveProjectMapLink(pid int32, mids []*int32) { if len(mids) == 0 { diff --git a/service/publishedGi.go b/service/publishedGi.go index 59d6abd..cb2c223 100644 --- a/service/publishedGi.go +++ b/service/publishedGi.go @@ -5,141 +5,172 @@ import ( "sync" "time" + "gorm.io/gorm/clause" "joylink.club/bj-rtsts-server/db/dbquery" "joylink.club/bj-rtsts-server/db/model" "joylink.club/bj-rtsts-server/dto" - "joylink.club/bj-rtsts-server/dto/publishedGi" - "joylink.club/bj-rtsts-server/ts/simulation/wayside/memory" + "joylink.club/bj-rtsts-server/sys_error" ) var publishMapMutex sync.Mutex -func PageQueryPublishedGi(req *publishedGi.PublishedGiReqDto) *dto.PageDto { - dp := dbquery.PublishedGi +// 查找发布地图分页信息 +func PageQueryPublished(req *dto.PagePublishedReqDto) *dto.PageDto { + dp := dbquery.Published where := dp.Where(dp.Status.Eq(1)) if req.Name != "" { - where = where.Where(dp.Name.Like(fmt.Sprintf("%%%s%%", req.Name))) + where = where.Where(dp.Code.Like(fmt.Sprintf("%%%s%%", req.Name))) } - result, count, err := where.Omit(dbquery.PublishedGi.Proto).Debug().FindByPage(req.Offset(), req.Size) + result, count, err := where.Debug().FindByPage(req.Offset(), req.Size) if err != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()}) + panic(sys_error.New("查询发布地图信息失败", err)) + } + var dataIds []int32 // 数据列表 + for _, r := range result { + dataIds = append(dataIds, r.DataID) + } + pv := dbquery.PublishedVersion + protoDatas, err := pv.Select(pv.ID, pv.Note, pv.PublishAt).Where(pv.ID.In(dataIds...)).Find() + if err != nil { + panic(sys_error.New("查询发布地图信息失败", err)) } return &dto.PageDto{ Total: int(count), PageQueryDto: req.PageQueryDto, - Records: publishedGi.ConvertFromSlice(result), + Records: dto.ConvertFromPublisheds(result, protoDatas), } } -func ListQueryPublishedGi(req *publishedGi.PublishedGiListReqDto) []*publishedGi.PublishedGiDto { - where := dbquery.PublishedGi.Omit(dbquery.PublishedGi.Proto).Where(dbquery.PublishedGi.Status.Eq(1)) +// 地图信息列表信息 +func ListQueryPublished(req *dto.PublishedListReqDto) []*dto.PublishedDto { + where := dbquery.Published.Where(dbquery.Published.Status.Eq(1)) if req.Name != "" { where = where.Where(dbquery.PublishedGi.Name.Like(fmt.Sprintf("%%%s%%", req.Name))) } - if req.Type != 0 { - where = where.Where(dbquery.PublishedGi.Type.Eq(req.Type)) - } - if req.Category != "" { - where = where.Where(dbquery.PublishedGi.Category.Eq(req.Category)) - } - find, err := where.Debug().Find() + result, err := where.Debug().Find() if err != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()}) + panic(sys_error.New("查询发布地图信息失败", err)) } - return publishedGi.ConvertFromSlice(find) -} - -func ListAllPublishedGi() ([]*model.PublishedGi, error) { - return dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.Status.Eq(1)).Find() -} - -func GetPublishedGiById(id int) *model.PublishedGi { - data, err := dbquery.PublishedGi.Where(dbquery.PublishedGi.ID.Eq(int32(id))).Debug().First() + var dataIds []int32 // 数据列表 + for _, r := range result { + dataIds = append(dataIds, r.DataID) + } + pv := dbquery.PublishedVersion + protoDatas, err := pv.Select(pv.ID, pv.Proto, pv.Note, pv.PublishAt).Where(pv.ID.In(dataIds...)).Find() if err != nil { - panic(err) + panic(sys_error.New("查询发布地图信息失败", err)) } - return data + return dto.ConvertFromPublisheds(result, protoDatas) } -func PublishFormDraft(req *publishedGi.PublishReqDto, user *model.User) { +// 项目启动时查询发布地图信息 +func ListAllPublished() []*dto.PublishedDto { + p := dbquery.Published + result, err := p.Select(p.ID, p.Code, p.Type, p.DataID).Where(dbquery.Published.Status.Eq(1)).Debug().Find() + if err != nil { + panic(sys_error.New("查询发布地图信息失败", err)) + } + var dataIds []int32 // 数据列表 + for _, r := range result { + dataIds = append(dataIds, r.DataID) + } + pv := dbquery.PublishedVersion + protoDatas, err := pv.Select(pv.ID, pv.Proto, pv.Note, pv.PublishAt).Where(pv.ID.In(dataIds...)).Find() + if err != nil { + panic(sys_error.New("查询发布地图信息失败", err)) + } + return dto.ConvertFromPublisheds(result, protoDatas) +} + +// 查询详细信息 +func GetPublishedById(id int32) *dto.PublishedDto { + data, err := dbquery.Published.Where(dbquery.Published.ID.Eq(id)).Debug().First() + if err != nil { + panic(sys_error.New("查询发布地图信息失败", err)) + } + pv := dbquery.PublishedVersion + protoData, err := pv.Where(pv.ID.Eq(data.DataID)).Debug().First() + if err != nil { + panic(sys_error.New("查询发布地图信息失败", err)) + } + return dto.ConvertFromPublished(data, protoData) +} + +// 草稿发布 +func PublishFormDraft(req *dto.PublishReqDto, user *model.User) { publishMapMutex.Lock() defer publishMapMutex.Unlock() draft := QueryDrafting(req.DraftId) if draft.Proto == nil || len(draft.Proto) == 0 { - panic(fmt.Sprintf("草稿[%v]绘图数据信息为空", req.DraftId)) + panic(sys_error.New(fmt.Sprintf("草稿[%v]绘图数据信息为空", req.DraftId))) } - //需要删除的同名数据 - oldData, _ := dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.Name.Eq(req.Name)).Find() - oldDataLen := len(oldData) - mids := make([]int32, oldDataLen) - if oldDataLen > 0 { - // 逻辑删除 - dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.Name.Eq(req.Name)).UpdateColumn(dbquery.PublishedGi.Status, 0) - for i, v := range oldData { - mids[i] = v.ID - memory.DeleteMapVerifyStructure(v.ID) // 移除内存中的发布信息 - } + // 查询版本信息 + vds, _ := dbquery.PublishedVersion.Select(dbquery.PublishedVersion.Version). + Where(dbquery.PublishedVersion.Code.Eq(req.Name)).Order(dbquery.PublishedVersion.Version.Desc()).Find() + var version int32 = 1 + if len(vds) > 0 { + version = version + vds[len(vds)-1].Version } - entity := model.PublishedGi{ - Name: req.Name, + // 存入新版本数据 + err := dbquery.PublishedVersion.Save(&model.PublishedVersion{ + Code: req.Name, Proto: draft.Proto, UserID: user.ID, PublishAt: time.Now(), - Category: draft.Category, Note: req.Note, - Type: draft.Type, - Status: 1, - } - //插入新数据 - err := dbquery.PublishedGi.Debug().Create(&entity) + Version: version, + }) if err != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: fmt.Sprintf("数据创建失败:\n%s", err.Error())}) + panic(sys_error.New("发布草稿数据失败", err)) } - newData, _ := dbquery.PublishedGi. - Where(dbquery.PublishedGi.Name.Eq(req.Name), dbquery.PublishedGi.Status.Eq(1)). - Order(dbquery.PublishedGi.PublishAt.Desc()).First() - // 对项目关联的地图进行修改 - if oldDataLen > 0 { - dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Mid.In(mids...)).UpdateColumn(dbquery.ProjectPublishLink.Mid, newData.ID) - } - // 地图信息更新到缓存 - if newData != nil { - memory.PublishMapVerifyStructure(newData) + versionData, err := dbquery.PublishedVersion.Select(dbquery.PublishedVersion.ID). + Where(dbquery.PublishedVersion.Code.Eq(req.Name), dbquery.PublishedVersion.Version.Eq(version)).First() + if err != nil { + panic(sys_error.New("发布草稿数据失败", err)) } + // 更新发布数据 + dbquery.Published.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: dbquery.Published.Code.ColumnName().String()}}, + DoUpdates: clause.AssignmentColumns([]string{dbquery.Published.DataID.ColumnName().String()}), + }).Create(&model.Published{Code: req.Name, Type: draft.Type, Category: draft.Category, DataID: versionData.ID, Status: 1}) } -func DeletePublishedGiById(id int) { - mid := int32(id) - dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.ID.Eq(mid)).UpdateColumn(dbquery.PublishedGi.Status, 0) - memory.DeleteMapVerifyStructure(int32(id)) // 移除内存中的发布信息 - dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Mid.In(mid)).Delete() +// 删除发布图 +func DeletePublishedById(id int32) { + dbquery.Published.Debug().Where(dbquery.Published.ID.Eq(id)).UpdateColumn(dbquery.Published.Status, 0) + dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Mid.In(id)).Delete() } +// 另存为草稿 func SaveAsDraftingFromPublish(id int32, user *model.User, name string) { num, _ := dbquery.Drafting.Where(dbquery.Drafting.Name.Eq(name)).Count() if num > 0 { // 处理重名情况 - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: fmt.Sprintf("草稿【%s】已存在", name)}) + panic(sys_error.New(fmt.Sprintf("草稿【%s】已存在", name))) } - publishedGi, err := dbquery.PublishedGi.Where(dbquery.PublishedGi.ID.Eq(id)).Debug().First() + published, err := dbquery.Published.Where(dbquery.Published.ID.Eq(id)).Debug().First() if err != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()}) + panic(sys_error.New("查询发布数据出错", err)) } - drafting := &model.Drafting{ + versionData, err := dbquery.PublishedVersion.Where(dbquery.PublishedVersion.ID.Eq(published.DataID)).First() + if err != nil { + panic(sys_error.New("查询发布数据出错", err)) + } + err1 := dbquery.Drafting.Save(&model.Drafting{ Name: name, - Category: publishedGi.Category, - Proto: publishedGi.Proto, + Category: published.Category, + Proto: versionData.Proto, CreatorID: user.ID, CreatedAt: time.Now(), UpdateAt: time.Now(), - Type: publishedGi.Type, - } - err1 := dbquery.Drafting.Save(drafting) + Type: published.Type, + }) if err1 != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err1.Error()}) + panic(sys_error.New("保存草稿出错", err1)) } } -func QueryProjectPublishedGi(id int32) []*model.PublishedGi { +// 查询项目关联的详细数据 +func QueryProjectPublished(id int32) []*model.Published { // 获取项目关联的发布地图 dppl := dbquery.ProjectPublishLink links, _ := dppl.Select(dppl.Mid).Where(dppl.Pid.Eq(id)).Find() @@ -150,25 +181,28 @@ func QueryProjectPublishedGi(id int32) []*model.PublishedGi { for i, m := range links { mids[i] = m.Mid } - dp := dbquery.PublishedGi - publishedGis, _ := dp. - Select(dp.ID, dp.Name, dp.Category, dp.Type). + dp := dbquery.Published + publisheds, _ := dp. + Select(dp.ID, dp.Code, dp.Category, dp.Type). Where(dp.ID.In(mids...), dp.Status.Eq(1)). - Order(dp.Type, dp.Name). + Order(dp.Type, dp.Code). Find() - return publishedGis + return publisheds } -func GetPublishedGiByName(param *publishedGi.PublishedGiSingleQueryDto) *model.PublishedGi { - where := dbquery.PublishedGi. - Where(dbquery.PublishedGi.Name.Eq(param.Name)). - Where(dbquery.PublishedGi.Status.Eq(1)) - if !param.Detail { - where = where.Omit(dbquery.PublishedGi.Proto) - } - data, err := where.Debug().First() +// 根据名称获取地图详细信息 +func GetPublishedGiByName(param *dto.PublishedSingleQueryDto) *dto.PublishedDto { + published, err := dbquery.Published.Where(dbquery.Published.Code.Eq(param.Name), dbquery.Published.Status.Eq(1)).Debug().First() if err != nil { - panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()}) + panic(sys_error.New("查询发布数据出错", err)) } - return data + detailData := &model.PublishedVersion{} + if param.Detail { + versionData, err := dbquery.PublishedVersion.Where(dbquery.PublishedVersion.ID.Eq(published.DataID)).First() + if err != nil { + panic(sys_error.New("查询发布数据出错", err)) + } + detailData = versionData + } + return dto.ConvertFromPublished(published, detailData) } diff --git a/service/trainManage.go b/service/trainManage.go index c36e46e..e2b60be 100644 --- a/service/trainManage.go +++ b/service/trainManage.go @@ -9,6 +9,71 @@ import ( "joylink.club/bj-rtsts-server/dto" ) +// 查询列车信息列表 +func PageTrainInfoQuery(query *dto.PageTrainInfoReqDto) *dto.PageDto { + d := dbquery.TrainInfo + dq := d.Where() + if query.Name != "" { + dq = dq.Where(d.Name.Like(fmt.Sprintf("%%%s%%", query.Name))) + } + records, total, err := dq.Debug().Select(d.ID, d.Name, d.Proto, d.Description).FindByPage(query.Offset(), query.Size) + if err != nil { + panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) + } + return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: dto.ConvertToTrainInfoDto(records)} +} + +// 查询列车信息列表 +func ListTrainInfoQuery(query *dto.TrainInfoReqDto) []*model.TrainInfo { + d := dbquery.TrainInfo + dq := d.Where() + if query.Name != "" { + dq = dq.Where(d.Name.Like(fmt.Sprintf("%%%s%%", query.Name))) + } + records, err := dq.Debug().Select(d.ID, d.Name, d.Proto).Find() + if err != nil { + panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) + } + return records +} + +// 创建列车信息 +func CreateTrainInfo(td *dto.TrainInfoDto) bool { + d := dto.ConvertTrainInfoFromDto(td) + err := dbquery.TrainInfo.Save(d) + if err != nil { + panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) + } + return true +} + +// 查询列车信息 +func QueryTrainInfo(id int32) *dto.TrainInfoDto { + dt := dbquery.TrainInfo + data, err := dt.Where(dt.ID.Eq(id)).Debug().First() + if err != nil { + panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) + } + return dto.ConvertDtoFromTrainInfo(data) +} + +// 更新列车信息 +func UpdateTrainInfo(id int32, td *dto.TrainInfoDto) bool { + d := dto.ConvertTrainInfoFromDto(td) + d.ID = id + _, err2 := dbquery.TrainInfo.Updates(d) + if err2 != nil { + panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err2.Error()}) + } + return true +} + +// 删除列车信息 +func DeleteTrainInfoById(id int) { + _, _ = dbquery.TrainInfo.Debug().Where(dbquery.TrainInfo.ID.Eq(int32(id))).Delete() +} + +// TODO:前端修改完毕,以下代码全部删除 // 查询列车型号信息列表 func PageTrainModelQuery(query *dto.PageTrainManageReqDto) *dto.PageDto { d := dbquery.TrainModel diff --git a/third_party/electrical_machinery/electrical_machinery.go b/third_party/electrical_machinery/electrical_machinery.go new file mode 100644 index 0000000..e72684f --- /dev/null +++ b/third_party/electrical_machinery/electrical_machinery.go @@ -0,0 +1,74 @@ +package electrical_machinery + +import ( + "fmt" + "sync" + + "joylink.club/bj-rtsts-server/config" + "joylink.club/bj-rtsts-server/third_party/message" + "joylink.club/bj-rtsts-server/third_party/udp" +) + +// 电机转速UDP +type ElectricMachinery interface { + Start(manager ElectricMachineryMessageManager) // 启动电机转速UDP消息处理 + Stop() // 停止电机转速消息处理 + SendElectricMachineryMessage(info *message.ElectricMachinery) // 发送电机转速消息 +} + +type ElectricMachineryMessageManager interface { + GetElectricMachineryRunConfig() *config.ElectricMachineryConfig // 获取电机转速参数 +} + +type electricalMachineryImpl struct { + electricalMachineryUdpClient udp.UdpClient + + manager ElectricMachineryMessageManager + runConfig *config.ElectricMachineryConfig +} + +func (s *electricalMachineryImpl) Start(manager ElectricMachineryMessageManager) { + if manager == nil { + panic("启动电机转速消息服务错误: ElectricMachineryMessageManager不能为nil") + } + if s.manager != nil { + panic("启动电机转速消息服务错误: 存在正在运行的任务") + } + s.runConfig = manager.GetElectricMachineryRunConfig() + if s.runConfig == nil || s.runConfig.Ip == "" || !s.runConfig.Open { + return + } + // 初始化客户端、服务端 + s.initElectricalMachinery() + s.manager = manager +} + +func (s *electricalMachineryImpl) Stop() { + initMutex.Lock() + defer initMutex.Unlock() + _default = nil + if s.electricalMachineryUdpClient != nil { + s.electricalMachineryUdpClient.Close() + } + s.manager = nil +} + +func (s *electricalMachineryImpl) SendElectricMachineryMessage(info *message.ElectricMachinery) { + s.electricalMachineryUdpClient.Send(info.Encode()) +} + +func (s *electricalMachineryImpl) initElectricalMachinery() { + s.electricalMachineryUdpClient = udp.NewClient(fmt.Sprintf("%v:%v", s.runConfig.Ip, s.runConfig.RemotePort)) +} + +var _default ElectricMachinery +var initMutex sync.Mutex + +func Default() ElectricMachinery { + initMutex.Lock() + defer initMutex.Unlock() + if _default == nil { + _default = &electricalMachineryImpl{} + } + return _default +} diff --git a/third_party/message/electrical_machinery.go b/third_party/message/electrical_machinery.go new file mode 100644 index 0000000..a01bea3 --- /dev/null +++ b/third_party/message/electrical_machinery.go @@ -0,0 +1,56 @@ +package message + +import ( + "encoding/binary" + "math" +) + +// 速度转转速计算公式: +// 转速=车速 ÷ 车轮周长 +// 车的轮径为d,车速为v1,电机转速为v2 +// 公式为:V2=V1÷(πd)×60 +type ElectricMachinery struct { + Speed float32 // 车速,m/s + WheelDiameter int32 // 轮径,mm + IsBack bool // 是否倒车 +} + +func (t *ElectricMachinery) Encode() []byte { + b := []byte{0x01, 0x10, 0x60, 0xff, 0x00, 0x02, 0x04} + rotarySpeed := t.Speed * 60 / (float32(math.Pi) * float32(t.WheelDiameter) / 1000) + if t.IsBack { + b = binary.BigEndian.AppendUint32(b, uint32(0-rotarySpeed)) + } else { + b = binary.BigEndian.AppendUint32(b, uint32(rotarySpeed)) + } + crc := chkcrc(b) // crc校验码 + b = binary.BigEndian.AppendUint16(b, crc) + return b +} + +// 生成crc +func chkcrc(data []byte) uint16 { + var crc uint16 = 0xFFFF + for i := 0; i < len(data); i++ { + crc = calccrc(data[i], crc) + } + hi := crc % 256 + lo := crc / 256 + crc = (hi << 8) | lo + return crc +} + +// 计算crc +func calccrc(crcbuf byte, crc uint16) uint16 { + crc = crc ^ uint16(crcbuf) + for i := 0; i < 8; i++ { + chk := crc & 1 + crc = crc >> 1 + crc = crc & 0x7fff + if chk == 1 { + crc = crc ^ 0xa001 + } + crc = crc & 0xffff + } + return crc +} diff --git a/ts/protos/graphicData/ibpGraphics.pb.go b/ts/protos/graphicData/ibpGraphics.pb.go index 90d7633..ed3142d 100644 --- a/ts/protos/graphicData/ibpGraphics.pb.go +++ b/ts/protos/graphicData/ibpGraphics.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: ibpGraphics.proto diff --git a/ts/protos/graphicData/picture.pb.go b/ts/protos/graphicData/picture.pb.go index 32a004e..c59a50e 100644 --- a/ts/protos/graphicData/picture.pb.go +++ b/ts/protos/graphicData/picture.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: picture.proto diff --git a/ts/protos/graphicData/pslGraphics.pb.go b/ts/protos/graphicData/pslGraphics.pb.go index de96dad..43d468d 100644 --- a/ts/protos/graphicData/pslGraphics.pb.go +++ b/ts/protos/graphicData/pslGraphics.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: pslGraphics.proto diff --git a/ts/protos/graphicData/relayCabinetLayoutGraphics.pb.go b/ts/protos/graphicData/relayCabinetLayoutGraphics.pb.go index 2feb101..b4a25eb 100644 --- a/ts/protos/graphicData/relayCabinetLayoutGraphics.pb.go +++ b/ts/protos/graphicData/relayCabinetLayoutGraphics.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: relayCabinetLayoutGraphics.proto diff --git a/ts/protos/graphicData/stationLayoutGraphics.pb.go b/ts/protos/graphicData/stationLayoutGraphics.pb.go index 5c27321..77f40d7 100644 --- a/ts/protos/graphicData/stationLayoutGraphics.pb.go +++ b/ts/protos/graphicData/stationLayoutGraphics.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: stationLayoutGraphics.proto @@ -165,7 +165,7 @@ func (Turnout_SwitchMachineType) EnumDescriptor() ([]byte, []int) { // 信号机模型类型枚举 // 从左向右,最左边为靠近灯座的灯 // 如果没有说明,默认不封灯,无引导 -// F-封 D-单 Y-有、带 +// F-封 D-单 Y-有、带 Y-引导 // H-红 L-绿 U-黄 A-蓝 B-白 type Signal_Model int32 @@ -586,6 +586,58 @@ func (Beacon_BeaconType) EnumDescriptor() ([]byte, []int) { return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{34, 0} } +type Train_TrainModel int32 + +const ( + Train_A Train_TrainModel = 0 + Train_B Train_TrainModel = 1 + Train_C Train_TrainModel = 2 + Train_D Train_TrainModel = 3 +) + +// Enum value maps for Train_TrainModel. +var ( + Train_TrainModel_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", + 3: "D", + } + Train_TrainModel_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, + "D": 3, + } +) + +func (x Train_TrainModel) Enum() *Train_TrainModel { + p := new(Train_TrainModel) + *p = x + return p +} + +func (x Train_TrainModel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Train_TrainModel) Descriptor() protoreflect.EnumDescriptor { + return file_stationLayoutGraphics_proto_enumTypes[11].Descriptor() +} + +func (Train_TrainModel) Type() protoreflect.EnumType { + return &file_stationLayoutGraphics_proto_enumTypes[11] +} + +func (x Train_TrainModel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Train_TrainModel.Descriptor instead. +func (Train_TrainModel) EnumDescriptor() ([]byte, []int) { + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{45, 0} +} + type RtssGraphicStorage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -624,11 +676,13 @@ type RtssGraphicStorage struct { UniqueIdPrefix *UniqueIdOfStationLayout `protobuf:"bytes,31,opt,name=UniqueIdPrefix,proto3" json:"UniqueIdPrefix,omitempty"` //设备唯一编码--前缀 KilometerConvertList []*KilometerConvert `protobuf:"bytes,32,rep,name=kilometerConvertList,proto3" json:"kilometerConvertList,omitempty"` //公里标转换列表 ScreenDoors []*ScreenDoor `protobuf:"bytes,33,rep,name=screenDoors,proto3" json:"screenDoors,omitempty"` - StationRelateDeviceList []*StationRelateDevice `protobuf:"bytes,34,rep,name=stationRelateDeviceList,proto3" json:"stationRelateDeviceList,omitempty"` // 关联设备列表 - SectionCodePointList []*SectionCodePoint `protobuf:"bytes,35,rep,name=sectionCodePointList,proto3" json:"sectionCodePointList,omitempty"` // 物理区段码位表 - ScreenDoorConfig *ScreenDoorConfig `protobuf:"bytes,36,opt,name=screenDoorConfig,proto3" json:"screenDoorConfig,omitempty"` //屏蔽门的配置--子屏蔽门的数量和编组列表 - Beacons []*Beacon `protobuf:"bytes,37,rep,name=beacons,proto3" json:"beacons,omitempty"` + StationRelateDeviceList []*StationRelateDevice `protobuf:"bytes,34,rep,name=stationRelateDeviceList,proto3" json:"stationRelateDeviceList,omitempty"` // 关联设备列表 + SectionCodePointList []*SectionCodePoint `protobuf:"bytes,35,rep,name=sectionCodePointList,proto3" json:"sectionCodePointList,omitempty"` // 物理区段码位表 + ScreenDoorConfig *ScreenDoorConfig `protobuf:"bytes,36,opt,name=screenDoorConfig,proto3" json:"screenDoorConfig,omitempty"` //屏蔽门的配置--子屏蔽门的数量和编组列表 + Beacons []*Beacon `protobuf:"bytes,37,rep,name=beacons,proto3" json:"beacons,omitempty"` // 信标 GenerateAxleCountingConfig *GenerateAxleCountingConfig `protobuf:"bytes,38,opt,name=generateAxleCountingConfig,proto3" json:"generateAxleCountingConfig,omitempty"` //一键生成计轴的配置 + DepartureTimers []*DepartureTimer `protobuf:"bytes,39,rep,name=departureTimers,proto3" json:"departureTimers,omitempty"` // 发车计时器 + AutoReturnBoxs []*AutoReturnBox `protobuf:"bytes,40,rep,name=autoReturnBoxs,proto3" json:"autoReturnBoxs,omitempty"` // 自动折返按钮箱 } func (x *RtssGraphicStorage) Reset() { @@ -887,6 +941,20 @@ func (x *RtssGraphicStorage) GetGenerateAxleCountingConfig() *GenerateAxleCounti return nil } +func (x *RtssGraphicStorage) GetDepartureTimers() []*DepartureTimer { + if x != nil { + return x.DepartureTimers + } + return nil +} + +func (x *RtssGraphicStorage) GetAutoReturnBoxs() []*AutoReturnBox { + if x != nil { + return x.AutoReturnBoxs + } + return nil +} + type Canvas struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1501,10 +1569,12 @@ type Station struct { // bool hasControl = 3; // 是否有控制 ConcentrationStations bool `protobuf:"varint,4,opt,name=concentrationStations,proto3" json:"concentrationStations,omitempty"` //是否集中站 // string kilometerCode = 5; //公里标 - KilometerSystem *KilometerSystem `protobuf:"bytes,6,opt,name=kilometerSystem,proto3" json:"kilometerSystem,omitempty"` //公里标 - Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` - RefIbpMapCode string `protobuf:"bytes,8,opt,name=refIbpMapCode,proto3" json:"refIbpMapCode,omitempty"` // 关联IBP地图Code - StationName string `protobuf:"bytes,9,opt,name=stationName,proto3" json:"stationName,omitempty"` //车站名 + KilometerSystem *KilometerSystem `protobuf:"bytes,6,opt,name=kilometerSystem,proto3" json:"kilometerSystem,omitempty"` //公里标 + Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` + RefIbpMapCode string `protobuf:"bytes,8,opt,name=refIbpMapCode,proto3" json:"refIbpMapCode,omitempty"` // 关联IBP地图Code + StationName string `protobuf:"bytes,9,opt,name=stationName,proto3" json:"stationName,omitempty"` //车站名 + StationNameAcronym string `protobuf:"bytes,10,opt,name=stationNameAcronym,proto3" json:"stationNameAcronym,omitempty"` // 车站名缩写 + Depots bool `protobuf:"varint,11,opt,name=depots,proto3" json:"depots,omitempty"` //是否车辆段 } func (x *Station) Reset() { @@ -1588,6 +1658,20 @@ func (x *Station) GetStationName() string { return "" } +func (x *Station) GetStationNameAcronym() string { + if x != nil { + return x.StationNameAcronym + } + return "" +} + +func (x *Station) GetDepots() bool { + if x != nil { + return x.Depots + } + return false +} + type TrainWindow struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2040,7 +2124,8 @@ type Signal struct { RefDev *RelatedRef `protobuf:"bytes,8,opt,name=refDev,proto3" json:"refDev,omitempty"` //关联设备(区段/道岔) CentralizedStations []string `protobuf:"bytes,9,rep,name=centralizedStations,proto3" json:"centralizedStations,omitempty"` // 集中站列表 // 信号机模型类型 - Mt Signal_Model `protobuf:"varint,10,opt,name=mt,proto3,enum=graphicData.Signal_Model" json:"mt,omitempty"` + Mt Signal_Model `protobuf:"varint,10,opt,name=mt,proto3,enum=graphicData.Signal_Model" json:"mt,omitempty"` + BelongStation string `protobuf:"bytes,11,opt,name=belongStation,proto3" json:"belongStation,omitempty"` // 所属车站(缩写) } func (x *Signal) Reset() { @@ -2131,6 +2216,13 @@ func (x *Signal) GetMt() Signal_Model { return Signal_HL } +func (x *Signal) GetBelongStation() string { + if x != nil { + return x.BelongStation + } + return "" +} + // * 物理区段(包含岔区和非岔区) type Section struct { state protoimpl.MessageState @@ -3865,6 +3957,141 @@ func (x *CalculateLink) GetIndex() int32 { return 0 } +// * 发车计时器 +type DepartureTimer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Common *CommonInfo `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *DepartureTimer) Reset() { + *x = DepartureTimer{} + if protoimpl.UnsafeEnabled { + mi := &file_stationLayoutGraphics_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DepartureTimer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DepartureTimer) ProtoMessage() {} + +func (x *DepartureTimer) ProtoReflect() protoreflect.Message { + mi := &file_stationLayoutGraphics_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DepartureTimer.ProtoReflect.Descriptor instead. +func (*DepartureTimer) Descriptor() ([]byte, []int) { + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{38} +} + +func (x *DepartureTimer) GetCommon() *CommonInfo { + if x != nil { + return x.Common + } + return nil +} + +func (x *DepartureTimer) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +type AutoReturnBox struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Common *CommonInfo `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Flip bool `protobuf:"varint,3,opt,name=flip,proto3" json:"flip,omitempty"` // 是否翻转(前端显示) + Index int32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` //索引 + RefStand string `protobuf:"bytes,5,opt,name=refStand,proto3" json:"refStand,omitempty"` // 关联站台 +} + +func (x *AutoReturnBox) Reset() { + *x = AutoReturnBox{} + if protoimpl.UnsafeEnabled { + mi := &file_stationLayoutGraphics_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoReturnBox) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoReturnBox) ProtoMessage() {} + +func (x *AutoReturnBox) ProtoReflect() protoreflect.Message { + mi := &file_stationLayoutGraphics_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AutoReturnBox.ProtoReflect.Descriptor instead. +func (*AutoReturnBox) Descriptor() ([]byte, []int) { + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{39} +} + +func (x *AutoReturnBox) GetCommon() *CommonInfo { + if x != nil { + return x.Common + } + return nil +} + +func (x *AutoReturnBox) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *AutoReturnBox) GetFlip() bool { + if x != nil { + return x.Flip + } + return false +} + +func (x *AutoReturnBox) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *AutoReturnBox) GetRefStand() string { + if x != nil { + return x.RefStand + } + return "" +} + type UniqueIdOfStationLayout struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3878,7 +4105,7 @@ type UniqueIdOfStationLayout struct { func (x *UniqueIdOfStationLayout) Reset() { *x = UniqueIdOfStationLayout{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[38] + mi := &file_stationLayoutGraphics_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3891,7 +4118,7 @@ func (x *UniqueIdOfStationLayout) String() string { func (*UniqueIdOfStationLayout) ProtoMessage() {} func (x *UniqueIdOfStationLayout) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[38] + mi := &file_stationLayoutGraphics_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3904,7 +4131,7 @@ func (x *UniqueIdOfStationLayout) ProtoReflect() protoreflect.Message { // Deprecated: Use UniqueIdOfStationLayout.ProtoReflect.Descriptor instead. func (*UniqueIdOfStationLayout) Descriptor() ([]byte, []int) { - return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{38} + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{40} } func (x *UniqueIdOfStationLayout) GetCity() string { @@ -3942,7 +4169,7 @@ type KilometerConvert struct { func (x *KilometerConvert) Reset() { *x = KilometerConvert{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[39] + mi := &file_stationLayoutGraphics_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3955,7 +4182,7 @@ func (x *KilometerConvert) String() string { func (*KilometerConvert) ProtoMessage() {} func (x *KilometerConvert) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[39] + mi := &file_stationLayoutGraphics_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3968,7 +4195,7 @@ func (x *KilometerConvert) ProtoReflect() protoreflect.Message { // Deprecated: Use KilometerConvert.ProtoReflect.Descriptor instead. func (*KilometerConvert) Descriptor() ([]byte, []int) { - return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{39} + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{41} } func (x *KilometerConvert) GetKmA() *KilometerSystem { @@ -4006,7 +4233,7 @@ type StationRelateDevice struct { func (x *StationRelateDevice) Reset() { *x = StationRelateDevice{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[40] + mi := &file_stationLayoutGraphics_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4019,7 +4246,7 @@ func (x *StationRelateDevice) String() string { func (*StationRelateDevice) ProtoMessage() {} func (x *StationRelateDevice) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[40] + mi := &file_stationLayoutGraphics_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4032,7 +4259,7 @@ func (x *StationRelateDevice) ProtoReflect() protoreflect.Message { // Deprecated: Use StationRelateDevice.ProtoReflect.Descriptor instead. func (*StationRelateDevice) Descriptor() ([]byte, []int) { - return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{40} + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{42} } func (x *StationRelateDevice) GetCode() string { @@ -4068,7 +4295,7 @@ type DeviceCombinationtype struct { func (x *DeviceCombinationtype) Reset() { *x = DeviceCombinationtype{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[41] + mi := &file_stationLayoutGraphics_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4081,7 +4308,7 @@ func (x *DeviceCombinationtype) String() string { func (*DeviceCombinationtype) ProtoMessage() {} func (x *DeviceCombinationtype) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[41] + mi := &file_stationLayoutGraphics_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4094,7 +4321,7 @@ func (x *DeviceCombinationtype) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceCombinationtype.ProtoReflect.Descriptor instead. func (*DeviceCombinationtype) Descriptor() ([]byte, []int) { - return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{41} + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{43} } func (x *DeviceCombinationtype) GetCode() string { @@ -4123,7 +4350,7 @@ type SectionCodePoint struct { func (x *SectionCodePoint) Reset() { *x = SectionCodePoint{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[42] + mi := &file_stationLayoutGraphics_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4136,7 +4363,7 @@ func (x *SectionCodePoint) String() string { func (*SectionCodePoint) ProtoMessage() {} func (x *SectionCodePoint) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[42] + mi := &file_stationLayoutGraphics_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4149,7 +4376,7 @@ func (x *SectionCodePoint) ProtoReflect() protoreflect.Message { // Deprecated: Use SectionCodePoint.ProtoReflect.Descriptor instead. func (*SectionCodePoint) Descriptor() ([]byte, []int) { - return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{42} + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{44} } func (x *SectionCodePoint) GetCentralizedStation() string { @@ -4166,6 +4393,94 @@ func (x *SectionCodePoint) GetSectionIds() []string { return nil } +// 列车信息 +type Train struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TrainModel Train_TrainModel `protobuf:"varint,1,opt,name=trainModel,proto3,enum=graphicData.Train_TrainModel" json:"trainModel,omitempty"` // 车型 + CarriageLength int32 `protobuf:"varint,2,opt,name=carriageLength,proto3" json:"carriageLength,omitempty"` // 列车车厢长度 + TotalLength int32 `protobuf:"varint,3,opt,name=totalLength,proto3" json:"totalLength,omitempty"` // 总长度 + MinDiameter int32 `protobuf:"varint,4,opt,name=minDiameter,proto3" json:"minDiameter,omitempty"` // 车轮的最小直径 + MaxDiameter int32 `protobuf:"varint,5,opt,name=maxDiameter,proto3" json:"maxDiameter,omitempty"` // 车轮的最大直径 + TrainSets string `protobuf:"bytes,6,opt,name=trainSets,proto3" json:"trainSets,omitempty"` // 编组 +} + +func (x *Train) Reset() { + *x = Train{} + if protoimpl.UnsafeEnabled { + mi := &file_stationLayoutGraphics_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Train) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Train) ProtoMessage() {} + +func (x *Train) ProtoReflect() protoreflect.Message { + mi := &file_stationLayoutGraphics_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Train.ProtoReflect.Descriptor instead. +func (*Train) Descriptor() ([]byte, []int) { + return file_stationLayoutGraphics_proto_rawDescGZIP(), []int{45} +} + +func (x *Train) GetTrainModel() Train_TrainModel { + if x != nil { + return x.TrainModel + } + return Train_A +} + +func (x *Train) GetCarriageLength() int32 { + if x != nil { + return x.CarriageLength + } + return 0 +} + +func (x *Train) GetTotalLength() int32 { + if x != nil { + return x.TotalLength + } + return 0 +} + +func (x *Train) GetMinDiameter() int32 { + if x != nil { + return x.MinDiameter + } + return 0 +} + +func (x *Train) GetMaxDiameter() int32 { + if x != nil { + return x.MaxDiameter + } + return 0 +} + +func (x *Train) GetTrainSets() string { + if x != nil { + return x.TrainSets + } + return "" +} + type CalculateLink_DevicePosition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4179,7 +4494,7 @@ type CalculateLink_DevicePosition struct { func (x *CalculateLink_DevicePosition) Reset() { *x = CalculateLink_DevicePosition{} if protoimpl.UnsafeEnabled { - mi := &file_stationLayoutGraphics_proto_msgTypes[43] + mi := &file_stationLayoutGraphics_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4192,7 +4507,7 @@ func (x *CalculateLink_DevicePosition) String() string { func (*CalculateLink_DevicePosition) ProtoMessage() {} func (x *CalculateLink_DevicePosition) ProtoReflect() protoreflect.Message { - mi := &file_stationLayoutGraphics_proto_msgTypes[43] + mi := &file_stationLayoutGraphics_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4234,7 +4549,7 @@ var File_stationLayoutGraphics_proto protoreflect.FileDescriptor var file_stationLayoutGraphics_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x22, 0xab, 0x10, 0x0a, 0x12, 0x52, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x22, 0xb6, 0x11, 0x0a, 0x12, 0x52, 0x74, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, @@ -4365,608 +4680,657 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{ 0x61, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa6, 0x01, 0x0a, 0x06, 0x43, 0x61, 0x6e, - 0x76, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, - 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, - 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x11, 0x76, - 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x11, - 0x76, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x22, 0x23, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x22, 0xa9, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x0f, + 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x73, 0x12, + 0x42, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x78, + 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x42, 0x6f, 0x78, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x42, + 0x6f, 0x78, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x0f, + 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x11, 0x76, 0x69, 0x65, 0x77, 0x70, 0x6f, + 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x11, 0x76, 0x69, 0x65, 0x77, 0x70, + 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x23, 0x0a, 0x05, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, + 0x79, 0x22, 0xa9, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x2e, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x28, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x72, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x6b, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, - 0x52, 0x08, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x6b, - 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x73, 0x6b, - 0x65, 0x77, 0x22, 0x5a, 0x0a, 0x0e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xbb, - 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, - 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x34, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x0f, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0xad, 0x01, 0x0a, - 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x77, 0x0a, 0x0a, - 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x22, 0x88, 0x01, 0x0a, 0x10, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, - 0x44, 0x6f, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, - 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x72, 0x65, - 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x13, 0x73, 0x63, 0x72, - 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, - 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x53, - 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, - 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x22, 0xaa, 0x02, 0x0a, - 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, - 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x63, 0x6f, - 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, - 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, - 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x0b, 0x54, 0x72, 0x61, - 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa5, 0x03, 0x0a, 0x0c, - 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x78, 0x6c, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0f, 0x61, 0x78, 0x6c, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, - 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x12, 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x0c, - 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x13, - 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, - 0x79, 0x10, 0x01, 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x41, - 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x62, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x62, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, - 0x28, 0x0a, 0x0f, 0x6e, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x8d, 0x06, 0x0a, 0x07, 0x54, 0x75, - 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x73, 0x6b, 0x65, 0x77, 0x22, 0x5a, 0x0a, + 0x0e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x09, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x0f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x77, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, + 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x41, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x42, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x12, 0x2d, - 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, - 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, - 0x70, 0x63, 0x52, 0x65, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x63, 0x52, 0x65, 0x66, 0x12, 0x46, 0x0a, 0x0f, 0x6b, - 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x61, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x63, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x54, 0x0a, - 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x2e, 0x53, - 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, - 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, 0x5f, - 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, 0x4a, 0x39, - 0x5f, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x4b, 0x69, - 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1c, 0x0a, - 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x63, - 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbb, 0x03, - 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, + 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, + 0x22, 0x88, 0x01, 0x0a, 0x10, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, 0x6e, 0x44, 0x6f, 0x6f, 0x72, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6f, + 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x13, 0x73, + 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x13, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, + 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0f, + 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, + 0x6f, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x44, + 0x6f, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x53, 0x6d, + 0x61, 0x6c, 0x6c, 0x44, 0x6f, 0x6f, 0x72, 0x22, 0xf2, 0x02, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x63, + 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, + 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, + 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x49, 0x62, 0x70, 0x4d, 0x61, 0x70, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x41, 0x63, 0x72, 0x6f, 0x6e, 0x79, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x63, 0x72, + 0x6f, 0x6e, 0x79, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x73, 0x22, 0x70, 0x0a, 0x0b, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa5, + 0x03, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x41, 0x0a, 0x0f, + 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0f, + 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x12, 0x54, 0x79, 0x70, + 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x75, 0x6e, + 0x64, 0x61, 0x72, 0x79, 0x10, 0x01, 0x22, 0x64, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x62, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x62, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x8d, 0x06, 0x0a, + 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, - 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, - 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, - 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, - 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, - 0x66, 0x44, 0x65, 0x76, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x02, 0x6d, 0x74, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x02, 0x6d, - 0x74, 0x22, 0x68, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x4c, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x4c, 0x55, 0x5f, 0x46, 0x55, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x44, 0x55, 0x5f, 0x59, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x48, 0x4c, 0x55, 0x5f, 0x59, 0x59, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x4c, 0x55, - 0x5f, 0x46, 0x4c, 0x5f, 0x44, 0x55, 0x5f, 0x59, 0x59, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x48, - 0x4c, 0x55, 0x5f, 0x44, 0x55, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x42, 0x10, 0x06, 0x12, - 0x0a, 0x0a, 0x06, 0x48, 0x42, 0x55, 0x5f, 0x44, 0x55, 0x10, 0x07, 0x22, 0xa4, 0x04, 0x0a, 0x07, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, - 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, - 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, + 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x42, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, + 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, + 0x2d, 0x0a, 0x05, 0x70, 0x63, 0x52, 0x65, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x63, 0x52, 0x65, 0x66, 0x12, 0x46, + 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, + 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x62, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x70, 0x62, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x70, 0x63, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x54, 0x0a, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, + 0x74, 0x2e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x11, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x53, 0x77, 0x69, 0x74, + 0x63, 0x68, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, 0x44, + 0x4a, 0x39, 0x5f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x5a, + 0x44, 0x4a, 0x39, 0x5f, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x22, 0x91, 0x01, 0x0a, + 0x0f, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2a, + 0x0a, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xe1, 0x03, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, + 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, - 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, - 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, - 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, - 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0c, 0x0a, 0x08, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, - 0x10, 0x02, 0x22, 0x82, 0x03, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x66, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x0a, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, - 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, - 0x0e, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x12, - 0x14, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, - 0x61, 0x72, 0x6d, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, - 0x65, 0x6e, 0x10, 0x0a, 0x22, 0x21, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, - 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, - 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0d, 0x54, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x09, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, - 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0xcd, 0x02, 0x0a, - 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3f, 0x0a, 0x0e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, - 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, - 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, - 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x54, - 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x22, 0xe2, 0x02, 0x0a, 0x0b, 0x53, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, + 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x02, 0x6d, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x52, 0x02, 0x6d, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x65, 0x6c, + 0x6f, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x05, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, + 0x4c, 0x55, 0x5f, 0x46, 0x55, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4c, 0x55, 0x5f, 0x44, + 0x55, 0x5f, 0x59, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x4c, 0x55, 0x5f, 0x59, 0x59, + 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x4c, 0x55, 0x5f, 0x46, 0x4c, 0x5f, 0x44, 0x55, 0x5f, + 0x59, 0x59, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x4c, 0x55, 0x5f, 0x44, 0x55, 0x10, 0x05, + 0x12, 0x06, 0x0a, 0x02, 0x41, 0x42, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x42, 0x55, 0x5f, + 0x44, 0x55, 0x10, 0x07, 0x22, 0xa4, 0x04, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, + 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, + 0x42, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x26, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, + 0x76, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, + 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, + 0x74, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x22, 0x82, 0x03, 0x0a, 0x0a, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, + 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, + 0x72, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, + 0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, + 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x12, + 0x0a, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, 0x08, 0x12, 0x0c, + 0x0a, 0x08, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, + 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x10, 0x0a, 0x22, 0x21, 0x0a, + 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, + 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, + 0x22, 0x3b, 0x0a, 0x0d, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, + 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, + 0x09, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x75, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x61, - 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, - 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, - 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, - 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, - 0x62, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, + 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, + 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x12, 0x3f, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x52, 0x04, 0x62, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, - 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x52, 0x65, 0x66, 0x52, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x52, 0x65, 0x66, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x2e, + 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, + 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x10, 0x01, 0x22, 0xe2, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x02, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x61, + 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, + 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, + 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65, 0x66, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, + 0x04, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x62, 0x52, + 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78, 0x6c, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, + 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, + 0x3a, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x52, + 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, + 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x22, 0x97, 0x03, + 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, + 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x2c, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, + 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, + 0x10, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x46, 0x4f, 0x52, 0x4b, 0x10, 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, + 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, - 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, - 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, - 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, - 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, - 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, - 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, - 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, + 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, + 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, + 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, + 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, + 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x22, + 0x28, 0x0a, 0x08, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x46, + 0x6f, 0x75, 0x72, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x45, 0x69, 0x67, 0x68, 0x74, 0x10, 0x02, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53, 0x70, + 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, + 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, + 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, + 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x09, 0x45, 0x73, 0x62, 0x42, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0xcf, + 0x01, 0x0a, 0x08, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, + 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, + 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, + 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, + 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, + 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x22, 0xa2, 0x01, 0x0a, 0x13, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, + 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, - 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, - 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, - 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, - 0x75, 0x74, 0x49, 0x64, 0x22, 0x97, 0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3e, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, - 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x24, - 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b, 0x10, 0x01, 0x22, 0x9c, - 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe0, 0x02, - 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, + 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xbc, 0x01, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, + 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x22, 0x25, + 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x10, 0x01, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x11, 0x52, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x22, 0xb4, 0x01, 0x0a, 0x09, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, + 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, + 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x11, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xcb, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, + 0x0a, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, + 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x61, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x66, 0x12, 0x53, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x1a, + 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, + 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x9a, 0x01, 0x0a, + 0x0d, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, - 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x52, 0x08, 0x63, - 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, - 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x79, 0x0a, 0x17, 0x55, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x49, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, + 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x41, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, - 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x22, 0x28, 0x0a, 0x08, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, - 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x6f, 0x75, 0x72, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, - 0x53, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x69, 0x67, 0x68, 0x74, 0x10, 0x02, - 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, - 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, - 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x96, 0x01, 0x0a, - 0x09, 0x45, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, - 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, - 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, - 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, - 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, - 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, - 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, - 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x70, - 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xa2, 0x01, 0x0a, 0x13, 0x43, 0x75, 0x72, - 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, - 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, - 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, - 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xbc, 0x01, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x04, 0x66, 0x6c, 0x69, 0x70, 0x22, 0x25, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x10, 0x01, 0x22, 0xa8, 0x01, 0x0a, - 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x09, 0x43, 0x75, 0x72, 0x76, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0f, 0x63, 0x75, 0x72, - 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xcb, - 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, - 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x52, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, - 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, - 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x53, 0x0a, 0x0f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, - 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, 0x17, - 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x03, - 0x6b, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x2e, 0x0a, 0x03, - 0x6b, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x74, 0x79, 0x70, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x62, 0x0a, 0x10, 0x53, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x63, - 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x2a, 0x20, 0x0a, 0x09, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, - 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x42, 0x55, 0x0a, - 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a, - 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, - 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x17, 0x2e, 0x2f, 0x74, - 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x42, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, + 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, + 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, + 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x22, 0x62, 0x0a, 0x10, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x65, 0x6e, 0x74, + 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x54, 0x72, 0x61, + 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x61, 0x72, 0x72, 0x69, 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x61, 0x72, 0x72, 0x69, + 0x61, 0x67, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6d, + 0x69, 0x6e, 0x44, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x44, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, + 0x0b, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0x28, 0x0a, + 0x0a, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x05, 0x0a, 0x01, 0x41, + 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, + 0x12, 0x05, 0x0a, 0x01, 0x44, 0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x42, 0x55, 0x0a, 0x25, 0x63, 0x6c, 0x75, + 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, + 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, + 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x17, 0x2e, 0x2f, 0x74, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4981,8 +5345,8 @@ func file_stationLayoutGraphics_proto_rawDescGZIP() []byte { return file_stationLayoutGraphics_proto_rawDescData } -var file_stationLayoutGraphics_proto_enumTypes = make([]protoimpl.EnumInfo, 11) -var file_stationLayoutGraphics_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_stationLayoutGraphics_proto_enumTypes = make([]protoimpl.EnumInfo, 12) +var file_stationLayoutGraphics_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_stationLayoutGraphics_proto_goTypes = []interface{}{ (Direction)(0), // 0: graphicData.Direction (AxleCounting_TypeDetectionPoint)(0), // 1: graphicData.AxleCounting.TypeDetectionPoint @@ -4995,176 +5359,185 @@ var file_stationLayoutGraphics_proto_goTypes = []interface{}{ (TrackSection_TrackSectionType)(0), // 8: graphicData.TrackSection.TrackSectionType (StopPosition_CoachNum)(0), // 9: graphicData.StopPosition.CoachNum (Beacon_BeaconType)(0), // 10: graphicData.Beacon.BeaconType - (*RtssGraphicStorage)(nil), // 11: graphicData.RtssGraphicStorage - (*Canvas)(nil), // 12: graphicData.Canvas - (*Point)(nil), // 13: graphicData.Point - (*Transform)(nil), // 14: graphicData.Transform - (*ChildTransform)(nil), // 15: graphicData.ChildTransform - (*CommonInfo)(nil), // 16: graphicData.CommonInfo - (*Platform)(nil), // 17: graphicData.Platform - (*ScreenDoor)(nil), // 18: graphicData.ScreenDoor - (*ScreenDoorConfig)(nil), // 19: graphicData.ScreenDoorConfig - (*ScreenDoorGroup)(nil), // 20: graphicData.ScreenDoorGroup - (*Station)(nil), // 21: graphicData.Station - (*TrainWindow)(nil), // 22: graphicData.TrainWindow - (*AxleCounting)(nil), // 23: graphicData.AxleCounting - (*GenerateAxleCountingConfig)(nil), // 24: graphicData.GenerateAxleCountingConfig - (*Turnout)(nil), // 25: graphicData.Turnout - (*KilometerSystem)(nil), // 26: graphicData.KilometerSystem - (*Signal)(nil), // 27: graphicData.Signal - (*Section)(nil), // 28: graphicData.Section - (*RelatedRef)(nil), // 29: graphicData.RelatedRef - (*TurnoutPosRef)(nil), // 30: graphicData.TurnoutPosRef - (*Separator)(nil), // 31: graphicData.Separator - (*Transponder)(nil), // 32: graphicData.Transponder - (*SimpleRef)(nil), // 33: graphicData.SimpleRef - (*SectionLink)(nil), // 34: graphicData.SectionLink - (*AxleCountingSection)(nil), // 35: graphicData.AxleCountingSection - (*LogicSection)(nil), // 36: graphicData.LogicSection - (*TrackSection)(nil), // 37: graphicData.TrackSection - (*TrackLogicSection)(nil), // 38: graphicData.TrackLogicSection - (*StopPosition)(nil), // 39: graphicData.StopPosition - (*SpksSwitch)(nil), // 40: graphicData.SpksSwitch - (*EsbButton)(nil), // 41: graphicData.EsbButton - (*GatedBox)(nil), // 42: graphicData.GatedBox - (*SlopeKiloMarker)(nil), // 43: graphicData.SlopeKiloMarker - (*CurvatureKiloMarker)(nil), // 44: graphicData.CurvatureKiloMarker - (*Beacon)(nil), // 45: graphicData.Beacon - (*Slope)(nil), // 46: graphicData.Slope - (*Curvature)(nil), // 47: graphicData.Curvature - (*CalculateLink)(nil), // 48: graphicData.CalculateLink - (*UniqueIdOfStationLayout)(nil), // 49: graphicData.UniqueIdOfStationLayout - (*KilometerConvert)(nil), // 50: graphicData.KilometerConvert - (*StationRelateDevice)(nil), // 51: graphicData.StationRelateDevice - (*DeviceCombinationtype)(nil), // 52: graphicData.DeviceCombinationtype - (*SectionCodePoint)(nil), // 53: graphicData.SectionCodePoint - (*CalculateLink_DevicePosition)(nil), // 54: graphicData.CalculateLink.DevicePosition + (Train_TrainModel)(0), // 11: graphicData.Train.TrainModel + (*RtssGraphicStorage)(nil), // 12: graphicData.RtssGraphicStorage + (*Canvas)(nil), // 13: graphicData.Canvas + (*Point)(nil), // 14: graphicData.Point + (*Transform)(nil), // 15: graphicData.Transform + (*ChildTransform)(nil), // 16: graphicData.ChildTransform + (*CommonInfo)(nil), // 17: graphicData.CommonInfo + (*Platform)(nil), // 18: graphicData.Platform + (*ScreenDoor)(nil), // 19: graphicData.ScreenDoor + (*ScreenDoorConfig)(nil), // 20: graphicData.ScreenDoorConfig + (*ScreenDoorGroup)(nil), // 21: graphicData.ScreenDoorGroup + (*Station)(nil), // 22: graphicData.Station + (*TrainWindow)(nil), // 23: graphicData.TrainWindow + (*AxleCounting)(nil), // 24: graphicData.AxleCounting + (*GenerateAxleCountingConfig)(nil), // 25: graphicData.GenerateAxleCountingConfig + (*Turnout)(nil), // 26: graphicData.Turnout + (*KilometerSystem)(nil), // 27: graphicData.KilometerSystem + (*Signal)(nil), // 28: graphicData.Signal + (*Section)(nil), // 29: graphicData.Section + (*RelatedRef)(nil), // 30: graphicData.RelatedRef + (*TurnoutPosRef)(nil), // 31: graphicData.TurnoutPosRef + (*Separator)(nil), // 32: graphicData.Separator + (*Transponder)(nil), // 33: graphicData.Transponder + (*SimpleRef)(nil), // 34: graphicData.SimpleRef + (*SectionLink)(nil), // 35: graphicData.SectionLink + (*AxleCountingSection)(nil), // 36: graphicData.AxleCountingSection + (*LogicSection)(nil), // 37: graphicData.LogicSection + (*TrackSection)(nil), // 38: graphicData.TrackSection + (*TrackLogicSection)(nil), // 39: graphicData.TrackLogicSection + (*StopPosition)(nil), // 40: graphicData.StopPosition + (*SpksSwitch)(nil), // 41: graphicData.SpksSwitch + (*EsbButton)(nil), // 42: graphicData.EsbButton + (*GatedBox)(nil), // 43: graphicData.GatedBox + (*SlopeKiloMarker)(nil), // 44: graphicData.SlopeKiloMarker + (*CurvatureKiloMarker)(nil), // 45: graphicData.CurvatureKiloMarker + (*Beacon)(nil), // 46: graphicData.Beacon + (*Slope)(nil), // 47: graphicData.Slope + (*Curvature)(nil), // 48: graphicData.Curvature + (*CalculateLink)(nil), // 49: graphicData.CalculateLink + (*DepartureTimer)(nil), // 50: graphicData.DepartureTimer + (*AutoReturnBox)(nil), // 51: graphicData.AutoReturnBox + (*UniqueIdOfStationLayout)(nil), // 52: graphicData.UniqueIdOfStationLayout + (*KilometerConvert)(nil), // 53: graphicData.KilometerConvert + (*StationRelateDevice)(nil), // 54: graphicData.StationRelateDevice + (*DeviceCombinationtype)(nil), // 55: graphicData.DeviceCombinationtype + (*SectionCodePoint)(nil), // 56: graphicData.SectionCodePoint + (*Train)(nil), // 57: graphicData.Train + (*CalculateLink_DevicePosition)(nil), // 58: graphicData.CalculateLink.DevicePosition } var file_stationLayoutGraphics_proto_depIdxs = []int32{ - 12, // 0: graphicData.RtssGraphicStorage.canvas:type_name -> graphicData.Canvas - 17, // 1: graphicData.RtssGraphicStorage.Platforms:type_name -> graphicData.Platform - 21, // 2: graphicData.RtssGraphicStorage.stations:type_name -> graphicData.Station - 27, // 3: graphicData.RtssGraphicStorage.signals:type_name -> graphicData.Signal - 25, // 4: graphicData.RtssGraphicStorage.turnouts:type_name -> graphicData.Turnout - 28, // 5: graphicData.RtssGraphicStorage.section:type_name -> graphicData.Section - 22, // 6: graphicData.RtssGraphicStorage.trainWindows:type_name -> graphicData.TrainWindow - 23, // 7: graphicData.RtssGraphicStorage.axleCountings:type_name -> graphicData.AxleCounting - 31, // 8: graphicData.RtssGraphicStorage.separators:type_name -> graphicData.Separator - 34, // 9: graphicData.RtssGraphicStorage.sectionLinks:type_name -> graphicData.SectionLink - 35, // 10: graphicData.RtssGraphicStorage.axleCountingSections:type_name -> graphicData.AxleCountingSection - 36, // 11: graphicData.RtssGraphicStorage.logicSections:type_name -> graphicData.LogicSection - 39, // 12: graphicData.RtssGraphicStorage.stopPositions:type_name -> graphicData.StopPosition - 40, // 13: graphicData.RtssGraphicStorage.spksSwitchs:type_name -> graphicData.SpksSwitch - 41, // 14: graphicData.RtssGraphicStorage.esbButtons:type_name -> graphicData.EsbButton - 42, // 15: graphicData.RtssGraphicStorage.gateBoxs:type_name -> graphicData.GatedBox - 32, // 16: graphicData.RtssGraphicStorage.transponders:type_name -> graphicData.Transponder - 46, // 17: graphicData.RtssGraphicStorage.slopes:type_name -> graphicData.Slope - 48, // 18: graphicData.RtssGraphicStorage.CalculateLink:type_name -> graphicData.CalculateLink - 43, // 19: graphicData.RtssGraphicStorage.slopeKiloMarker:type_name -> graphicData.SlopeKiloMarker - 44, // 20: graphicData.RtssGraphicStorage.curvatureKiloMarker:type_name -> graphicData.CurvatureKiloMarker - 47, // 21: graphicData.RtssGraphicStorage.curvatures:type_name -> graphicData.Curvature - 37, // 22: graphicData.RtssGraphicStorage.trackSections:type_name -> graphicData.TrackSection - 38, // 23: graphicData.RtssGraphicStorage.trackLogicSections:type_name -> graphicData.TrackLogicSection - 49, // 24: graphicData.RtssGraphicStorage.UniqueIdPrefix:type_name -> graphicData.UniqueIdOfStationLayout - 50, // 25: graphicData.RtssGraphicStorage.kilometerConvertList:type_name -> graphicData.KilometerConvert - 18, // 26: graphicData.RtssGraphicStorage.screenDoors:type_name -> graphicData.ScreenDoor - 51, // 27: graphicData.RtssGraphicStorage.stationRelateDeviceList:type_name -> graphicData.StationRelateDevice - 53, // 28: graphicData.RtssGraphicStorage.sectionCodePointList:type_name -> graphicData.SectionCodePoint - 19, // 29: graphicData.RtssGraphicStorage.screenDoorConfig:type_name -> graphicData.ScreenDoorConfig - 45, // 30: graphicData.RtssGraphicStorage.beacons:type_name -> graphicData.Beacon - 24, // 31: graphicData.RtssGraphicStorage.generateAxleCountingConfig:type_name -> graphicData.GenerateAxleCountingConfig - 14, // 32: graphicData.Canvas.viewportTransform:type_name -> graphicData.Transform - 13, // 33: graphicData.Transform.position:type_name -> graphicData.Point - 13, // 34: graphicData.Transform.scale:type_name -> graphicData.Point - 13, // 35: graphicData.Transform.skew:type_name -> graphicData.Point - 14, // 36: graphicData.ChildTransform.transform:type_name -> graphicData.Transform - 14, // 37: graphicData.CommonInfo.transform:type_name -> graphicData.Transform - 15, // 38: graphicData.CommonInfo.childTransforms:type_name -> graphicData.ChildTransform - 16, // 39: graphicData.Platform.common:type_name -> graphicData.CommonInfo - 16, // 40: graphicData.ScreenDoor.common:type_name -> graphicData.CommonInfo - 20, // 41: graphicData.ScreenDoorConfig.screenDoorGroupList:type_name -> graphicData.ScreenDoorGroup - 16, // 42: graphicData.Station.common:type_name -> graphicData.CommonInfo - 26, // 43: graphicData.Station.kilometerSystem:type_name -> graphicData.KilometerSystem - 16, // 44: graphicData.TrainWindow.common:type_name -> graphicData.CommonInfo - 16, // 45: graphicData.AxleCounting.common:type_name -> graphicData.CommonInfo - 26, // 46: graphicData.AxleCounting.kilometerSystem:type_name -> graphicData.KilometerSystem - 29, // 47: graphicData.AxleCounting.axleCountingRef:type_name -> graphicData.RelatedRef - 1, // 48: graphicData.AxleCounting.type:type_name -> graphicData.AxleCounting.TypeDetectionPoint - 16, // 49: graphicData.Turnout.common:type_name -> graphicData.CommonInfo - 13, // 50: graphicData.Turnout.pointA:type_name -> graphicData.Point - 13, // 51: graphicData.Turnout.pointB:type_name -> graphicData.Point - 13, // 52: graphicData.Turnout.pointC:type_name -> graphicData.Point - 29, // 53: graphicData.Turnout.paRef:type_name -> graphicData.RelatedRef - 29, // 54: graphicData.Turnout.pbRef:type_name -> graphicData.RelatedRef - 29, // 55: graphicData.Turnout.pcRef:type_name -> graphicData.RelatedRef - 26, // 56: graphicData.Turnout.kilometerSystem:type_name -> graphicData.KilometerSystem - 2, // 57: graphicData.Turnout.switchMachineType:type_name -> graphicData.Turnout.SwitchMachineType - 0, // 58: graphicData.KilometerSystem.direction:type_name -> graphicData.Direction - 16, // 59: graphicData.Signal.common:type_name -> graphicData.CommonInfo - 26, // 60: graphicData.Signal.kilometerSystem:type_name -> graphicData.KilometerSystem - 29, // 61: graphicData.Signal.refDev:type_name -> graphicData.RelatedRef - 3, // 62: graphicData.Signal.mt:type_name -> graphicData.Signal.Model - 16, // 63: graphicData.Section.common:type_name -> graphicData.CommonInfo - 13, // 64: graphicData.Section.points:type_name -> graphicData.Point - 29, // 65: graphicData.Section.paRef:type_name -> graphicData.RelatedRef - 29, // 66: graphicData.Section.pbRef:type_name -> graphicData.RelatedRef - 4, // 67: graphicData.Section.sectionType:type_name -> graphicData.Section.SectionType - 5, // 68: graphicData.RelatedRef.deviceType:type_name -> graphicData.RelatedRef.DeviceType - 6, // 69: graphicData.RelatedRef.devicePort:type_name -> graphicData.RelatedRef.DevicePort - 16, // 70: graphicData.Separator.common:type_name -> graphicData.CommonInfo - 16, // 71: graphicData.Transponder.common:type_name -> graphicData.CommonInfo - 26, // 72: graphicData.Transponder.kilometerSystem:type_name -> graphicData.KilometerSystem - 29, // 73: graphicData.Transponder.TransponderRef:type_name -> graphicData.RelatedRef - 7, // 74: graphicData.SimpleRef.deviceType:type_name -> graphicData.SimpleRef.DeviceType - 16, // 75: graphicData.SectionLink.common:type_name -> graphicData.CommonInfo - 13, // 76: graphicData.SectionLink.points:type_name -> graphicData.Point - 33, // 77: graphicData.SectionLink.aSimRef:type_name -> graphicData.SimpleRef - 33, // 78: graphicData.SectionLink.bSimRef:type_name -> graphicData.SimpleRef - 29, // 79: graphicData.SectionLink.aRef:type_name -> graphicData.RelatedRef - 29, // 80: graphicData.SectionLink.bRef:type_name -> graphicData.RelatedRef - 16, // 81: graphicData.AxleCountingSection.common:type_name -> graphicData.CommonInfo - 13, // 82: graphicData.AxleCountingSection.points:type_name -> graphicData.Point - 29, // 83: graphicData.AxleCountingSection.paRef:type_name -> graphicData.RelatedRef - 29, // 84: graphicData.AxleCountingSection.pbRef:type_name -> graphicData.RelatedRef - 30, // 85: graphicData.AxleCountingSection.turnoutPos:type_name -> graphicData.TurnoutPosRef - 16, // 86: graphicData.LogicSection.common:type_name -> graphicData.CommonInfo - 13, // 87: graphicData.LogicSection.points:type_name -> graphicData.Point - 16, // 88: graphicData.TrackSection.common:type_name -> graphicData.CommonInfo - 13, // 89: graphicData.TrackSection.points:type_name -> graphicData.Point - 8, // 90: graphicData.TrackSection.type:type_name -> graphicData.TrackSection.TrackSectionType - 16, // 91: graphicData.TrackLogicSection.common:type_name -> graphicData.CommonInfo - 13, // 92: graphicData.TrackLogicSection.points:type_name -> graphicData.Point - 16, // 93: graphicData.StopPosition.common:type_name -> graphicData.CommonInfo - 9, // 94: graphicData.StopPosition.coachNum:type_name -> graphicData.StopPosition.CoachNum - 26, // 95: graphicData.StopPosition.kilometerSystem:type_name -> graphicData.KilometerSystem - 29, // 96: graphicData.StopPosition.refDev:type_name -> graphicData.RelatedRef - 16, // 97: graphicData.SpksSwitch.common:type_name -> graphicData.CommonInfo - 16, // 98: graphicData.EsbButton.common:type_name -> graphicData.CommonInfo - 16, // 99: graphicData.GatedBox.common:type_name -> graphicData.CommonInfo - 16, // 100: graphicData.SlopeKiloMarker.common:type_name -> graphicData.CommonInfo - 26, // 101: graphicData.SlopeKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem - 16, // 102: graphicData.CurvatureKiloMarker.common:type_name -> graphicData.CommonInfo - 26, // 103: graphicData.CurvatureKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem - 16, // 104: graphicData.Beacon.common:type_name -> graphicData.CommonInfo - 10, // 105: graphicData.Beacon.type:type_name -> graphicData.Beacon.BeaconType - 16, // 106: graphicData.Slope.common:type_name -> graphicData.CommonInfo - 13, // 107: graphicData.Slope.points:type_name -> graphicData.Point - 16, // 108: graphicData.Curvature.common:type_name -> graphicData.CommonInfo - 13, // 109: graphicData.Curvature.points:type_name -> graphicData.Point - 16, // 110: graphicData.CalculateLink.common:type_name -> graphicData.CommonInfo - 13, // 111: graphicData.CalculateLink.points:type_name -> graphicData.Point - 29, // 112: graphicData.CalculateLink.aRelatedRef:type_name -> graphicData.RelatedRef - 29, // 113: graphicData.CalculateLink.bRelatedRef:type_name -> graphicData.RelatedRef - 54, // 114: graphicData.CalculateLink.devicePositions:type_name -> graphicData.CalculateLink.DevicePosition - 26, // 115: graphicData.KilometerConvert.kmA:type_name -> graphicData.KilometerSystem - 26, // 116: graphicData.KilometerConvert.kmB:type_name -> graphicData.KilometerSystem - 52, // 117: graphicData.StationRelateDevice.combinationtypes:type_name -> graphicData.DeviceCombinationtype - 5, // 118: graphicData.StationRelateDevice.deviceType:type_name -> graphicData.RelatedRef.DeviceType - 119, // [119:119] is the sub-list for method output_type - 119, // [119:119] is the sub-list for method input_type - 119, // [119:119] is the sub-list for extension type_name - 119, // [119:119] is the sub-list for extension extendee - 0, // [0:119] is the sub-list for field type_name + 13, // 0: graphicData.RtssGraphicStorage.canvas:type_name -> graphicData.Canvas + 18, // 1: graphicData.RtssGraphicStorage.Platforms:type_name -> graphicData.Platform + 22, // 2: graphicData.RtssGraphicStorage.stations:type_name -> graphicData.Station + 28, // 3: graphicData.RtssGraphicStorage.signals:type_name -> graphicData.Signal + 26, // 4: graphicData.RtssGraphicStorage.turnouts:type_name -> graphicData.Turnout + 29, // 5: graphicData.RtssGraphicStorage.section:type_name -> graphicData.Section + 23, // 6: graphicData.RtssGraphicStorage.trainWindows:type_name -> graphicData.TrainWindow + 24, // 7: graphicData.RtssGraphicStorage.axleCountings:type_name -> graphicData.AxleCounting + 32, // 8: graphicData.RtssGraphicStorage.separators:type_name -> graphicData.Separator + 35, // 9: graphicData.RtssGraphicStorage.sectionLinks:type_name -> graphicData.SectionLink + 36, // 10: graphicData.RtssGraphicStorage.axleCountingSections:type_name -> graphicData.AxleCountingSection + 37, // 11: graphicData.RtssGraphicStorage.logicSections:type_name -> graphicData.LogicSection + 40, // 12: graphicData.RtssGraphicStorage.stopPositions:type_name -> graphicData.StopPosition + 41, // 13: graphicData.RtssGraphicStorage.spksSwitchs:type_name -> graphicData.SpksSwitch + 42, // 14: graphicData.RtssGraphicStorage.esbButtons:type_name -> graphicData.EsbButton + 43, // 15: graphicData.RtssGraphicStorage.gateBoxs:type_name -> graphicData.GatedBox + 33, // 16: graphicData.RtssGraphicStorage.transponders:type_name -> graphicData.Transponder + 47, // 17: graphicData.RtssGraphicStorage.slopes:type_name -> graphicData.Slope + 49, // 18: graphicData.RtssGraphicStorage.CalculateLink:type_name -> graphicData.CalculateLink + 44, // 19: graphicData.RtssGraphicStorage.slopeKiloMarker:type_name -> graphicData.SlopeKiloMarker + 45, // 20: graphicData.RtssGraphicStorage.curvatureKiloMarker:type_name -> graphicData.CurvatureKiloMarker + 48, // 21: graphicData.RtssGraphicStorage.curvatures:type_name -> graphicData.Curvature + 38, // 22: graphicData.RtssGraphicStorage.trackSections:type_name -> graphicData.TrackSection + 39, // 23: graphicData.RtssGraphicStorage.trackLogicSections:type_name -> graphicData.TrackLogicSection + 52, // 24: graphicData.RtssGraphicStorage.UniqueIdPrefix:type_name -> graphicData.UniqueIdOfStationLayout + 53, // 25: graphicData.RtssGraphicStorage.kilometerConvertList:type_name -> graphicData.KilometerConvert + 19, // 26: graphicData.RtssGraphicStorage.screenDoors:type_name -> graphicData.ScreenDoor + 54, // 27: graphicData.RtssGraphicStorage.stationRelateDeviceList:type_name -> graphicData.StationRelateDevice + 56, // 28: graphicData.RtssGraphicStorage.sectionCodePointList:type_name -> graphicData.SectionCodePoint + 20, // 29: graphicData.RtssGraphicStorage.screenDoorConfig:type_name -> graphicData.ScreenDoorConfig + 46, // 30: graphicData.RtssGraphicStorage.beacons:type_name -> graphicData.Beacon + 25, // 31: graphicData.RtssGraphicStorage.generateAxleCountingConfig:type_name -> graphicData.GenerateAxleCountingConfig + 50, // 32: graphicData.RtssGraphicStorage.departureTimers:type_name -> graphicData.DepartureTimer + 51, // 33: graphicData.RtssGraphicStorage.autoReturnBoxs:type_name -> graphicData.AutoReturnBox + 15, // 34: graphicData.Canvas.viewportTransform:type_name -> graphicData.Transform + 14, // 35: graphicData.Transform.position:type_name -> graphicData.Point + 14, // 36: graphicData.Transform.scale:type_name -> graphicData.Point + 14, // 37: graphicData.Transform.skew:type_name -> graphicData.Point + 15, // 38: graphicData.ChildTransform.transform:type_name -> graphicData.Transform + 15, // 39: graphicData.CommonInfo.transform:type_name -> graphicData.Transform + 16, // 40: graphicData.CommonInfo.childTransforms:type_name -> graphicData.ChildTransform + 17, // 41: graphicData.Platform.common:type_name -> graphicData.CommonInfo + 17, // 42: graphicData.ScreenDoor.common:type_name -> graphicData.CommonInfo + 21, // 43: graphicData.ScreenDoorConfig.screenDoorGroupList:type_name -> graphicData.ScreenDoorGroup + 17, // 44: graphicData.Station.common:type_name -> graphicData.CommonInfo + 27, // 45: graphicData.Station.kilometerSystem:type_name -> graphicData.KilometerSystem + 17, // 46: graphicData.TrainWindow.common:type_name -> graphicData.CommonInfo + 17, // 47: graphicData.AxleCounting.common:type_name -> graphicData.CommonInfo + 27, // 48: graphicData.AxleCounting.kilometerSystem:type_name -> graphicData.KilometerSystem + 30, // 49: graphicData.AxleCounting.axleCountingRef:type_name -> graphicData.RelatedRef + 1, // 50: graphicData.AxleCounting.type:type_name -> graphicData.AxleCounting.TypeDetectionPoint + 17, // 51: graphicData.Turnout.common:type_name -> graphicData.CommonInfo + 14, // 52: graphicData.Turnout.pointA:type_name -> graphicData.Point + 14, // 53: graphicData.Turnout.pointB:type_name -> graphicData.Point + 14, // 54: graphicData.Turnout.pointC:type_name -> graphicData.Point + 30, // 55: graphicData.Turnout.paRef:type_name -> graphicData.RelatedRef + 30, // 56: graphicData.Turnout.pbRef:type_name -> graphicData.RelatedRef + 30, // 57: graphicData.Turnout.pcRef:type_name -> graphicData.RelatedRef + 27, // 58: graphicData.Turnout.kilometerSystem:type_name -> graphicData.KilometerSystem + 2, // 59: graphicData.Turnout.switchMachineType:type_name -> graphicData.Turnout.SwitchMachineType + 0, // 60: graphicData.KilometerSystem.direction:type_name -> graphicData.Direction + 17, // 61: graphicData.Signal.common:type_name -> graphicData.CommonInfo + 27, // 62: graphicData.Signal.kilometerSystem:type_name -> graphicData.KilometerSystem + 30, // 63: graphicData.Signal.refDev:type_name -> graphicData.RelatedRef + 3, // 64: graphicData.Signal.mt:type_name -> graphicData.Signal.Model + 17, // 65: graphicData.Section.common:type_name -> graphicData.CommonInfo + 14, // 66: graphicData.Section.points:type_name -> graphicData.Point + 30, // 67: graphicData.Section.paRef:type_name -> graphicData.RelatedRef + 30, // 68: graphicData.Section.pbRef:type_name -> graphicData.RelatedRef + 4, // 69: graphicData.Section.sectionType:type_name -> graphicData.Section.SectionType + 5, // 70: graphicData.RelatedRef.deviceType:type_name -> graphicData.RelatedRef.DeviceType + 6, // 71: graphicData.RelatedRef.devicePort:type_name -> graphicData.RelatedRef.DevicePort + 17, // 72: graphicData.Separator.common:type_name -> graphicData.CommonInfo + 17, // 73: graphicData.Transponder.common:type_name -> graphicData.CommonInfo + 27, // 74: graphicData.Transponder.kilometerSystem:type_name -> graphicData.KilometerSystem + 30, // 75: graphicData.Transponder.TransponderRef:type_name -> graphicData.RelatedRef + 7, // 76: graphicData.SimpleRef.deviceType:type_name -> graphicData.SimpleRef.DeviceType + 17, // 77: graphicData.SectionLink.common:type_name -> graphicData.CommonInfo + 14, // 78: graphicData.SectionLink.points:type_name -> graphicData.Point + 34, // 79: graphicData.SectionLink.aSimRef:type_name -> graphicData.SimpleRef + 34, // 80: graphicData.SectionLink.bSimRef:type_name -> graphicData.SimpleRef + 30, // 81: graphicData.SectionLink.aRef:type_name -> graphicData.RelatedRef + 30, // 82: graphicData.SectionLink.bRef:type_name -> graphicData.RelatedRef + 17, // 83: graphicData.AxleCountingSection.common:type_name -> graphicData.CommonInfo + 14, // 84: graphicData.AxleCountingSection.points:type_name -> graphicData.Point + 30, // 85: graphicData.AxleCountingSection.paRef:type_name -> graphicData.RelatedRef + 30, // 86: graphicData.AxleCountingSection.pbRef:type_name -> graphicData.RelatedRef + 31, // 87: graphicData.AxleCountingSection.turnoutPos:type_name -> graphicData.TurnoutPosRef + 17, // 88: graphicData.LogicSection.common:type_name -> graphicData.CommonInfo + 14, // 89: graphicData.LogicSection.points:type_name -> graphicData.Point + 17, // 90: graphicData.TrackSection.common:type_name -> graphicData.CommonInfo + 14, // 91: graphicData.TrackSection.points:type_name -> graphicData.Point + 8, // 92: graphicData.TrackSection.type:type_name -> graphicData.TrackSection.TrackSectionType + 17, // 93: graphicData.TrackLogicSection.common:type_name -> graphicData.CommonInfo + 14, // 94: graphicData.TrackLogicSection.points:type_name -> graphicData.Point + 17, // 95: graphicData.StopPosition.common:type_name -> graphicData.CommonInfo + 9, // 96: graphicData.StopPosition.coachNum:type_name -> graphicData.StopPosition.CoachNum + 27, // 97: graphicData.StopPosition.kilometerSystem:type_name -> graphicData.KilometerSystem + 30, // 98: graphicData.StopPosition.refDev:type_name -> graphicData.RelatedRef + 17, // 99: graphicData.SpksSwitch.common:type_name -> graphicData.CommonInfo + 17, // 100: graphicData.EsbButton.common:type_name -> graphicData.CommonInfo + 17, // 101: graphicData.GatedBox.common:type_name -> graphicData.CommonInfo + 17, // 102: graphicData.SlopeKiloMarker.common:type_name -> graphicData.CommonInfo + 27, // 103: graphicData.SlopeKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem + 17, // 104: graphicData.CurvatureKiloMarker.common:type_name -> graphicData.CommonInfo + 27, // 105: graphicData.CurvatureKiloMarker.kilometerSystem:type_name -> graphicData.KilometerSystem + 17, // 106: graphicData.Beacon.common:type_name -> graphicData.CommonInfo + 10, // 107: graphicData.Beacon.type:type_name -> graphicData.Beacon.BeaconType + 17, // 108: graphicData.Slope.common:type_name -> graphicData.CommonInfo + 14, // 109: graphicData.Slope.points:type_name -> graphicData.Point + 17, // 110: graphicData.Curvature.common:type_name -> graphicData.CommonInfo + 14, // 111: graphicData.Curvature.points:type_name -> graphicData.Point + 17, // 112: graphicData.CalculateLink.common:type_name -> graphicData.CommonInfo + 14, // 113: graphicData.CalculateLink.points:type_name -> graphicData.Point + 30, // 114: graphicData.CalculateLink.aRelatedRef:type_name -> graphicData.RelatedRef + 30, // 115: graphicData.CalculateLink.bRelatedRef:type_name -> graphicData.RelatedRef + 58, // 116: graphicData.CalculateLink.devicePositions:type_name -> graphicData.CalculateLink.DevicePosition + 17, // 117: graphicData.DepartureTimer.common:type_name -> graphicData.CommonInfo + 17, // 118: graphicData.AutoReturnBox.common:type_name -> graphicData.CommonInfo + 27, // 119: graphicData.KilometerConvert.kmA:type_name -> graphicData.KilometerSystem + 27, // 120: graphicData.KilometerConvert.kmB:type_name -> graphicData.KilometerSystem + 55, // 121: graphicData.StationRelateDevice.combinationtypes:type_name -> graphicData.DeviceCombinationtype + 5, // 122: graphicData.StationRelateDevice.deviceType:type_name -> graphicData.RelatedRef.DeviceType + 11, // 123: graphicData.Train.trainModel:type_name -> graphicData.Train.TrainModel + 124, // [124:124] is the sub-list for method output_type + 124, // [124:124] is the sub-list for method input_type + 124, // [124:124] is the sub-list for extension type_name + 124, // [124:124] is the sub-list for extension extendee + 0, // [0:124] is the sub-list for field type_name } func init() { file_stationLayoutGraphics_proto_init() } @@ -5630,7 +6003,7 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UniqueIdOfStationLayout); i { + switch v := v.(*DepartureTimer); i { case 0: return &v.state case 1: @@ -5642,7 +6015,7 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KilometerConvert); i { + switch v := v.(*AutoReturnBox); i { case 0: return &v.state case 1: @@ -5654,7 +6027,7 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StationRelateDevice); i { + switch v := v.(*UniqueIdOfStationLayout); i { case 0: return &v.state case 1: @@ -5666,7 +6039,7 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceCombinationtype); i { + switch v := v.(*KilometerConvert); i { case 0: return &v.state case 1: @@ -5678,7 +6051,7 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SectionCodePoint); i { + switch v := v.(*StationRelateDevice); i { case 0: return &v.state case 1: @@ -5690,6 +6063,42 @@ func file_stationLayoutGraphics_proto_init() { } } file_stationLayoutGraphics_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeviceCombinationtype); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stationLayoutGraphics_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SectionCodePoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stationLayoutGraphics_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Train); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stationLayoutGraphics_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CalculateLink_DevicePosition); i { case 0: return &v.state @@ -5707,8 +6116,8 @@ func file_stationLayoutGraphics_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stationLayoutGraphics_proto_rawDesc, - NumEnums: 11, - NumMessages: 44, + NumEnums: 12, + NumMessages: 47, NumExtensions: 0, NumServices: 0, }, diff --git a/ts/protos/state/device_state.pb.go b/ts/protos/state/device_state.pb.go index 07659cf..b865689 100644 --- a/ts/protos/state/device_state.pb.go +++ b/ts/protos/state/device_state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.28.1 // protoc v4.23.1 // source: device_state.proto diff --git a/ts/simulation/wayside/memory/wayside_memory_generate.go b/ts/simulation/wayside/memory/wayside_memory_generate.go deleted file mode 100644 index f59c65f..0000000 --- a/ts/simulation/wayside/memory/wayside_memory_generate.go +++ /dev/null @@ -1,785 +0,0 @@ -package memory - -import ( - "container/list" - "fmt" - "log/slog" - "math" - "reflect" - "sort" - "strings" - - "joylink.club/bj-rtsts-server/dto" - "joylink.club/bj-rtsts-server/ts/protos/graphicData" -) - -// 参与计算的坡度与曲度均为正线公里标,如果有其他坐标系需要转换 -var mainLineType = "MAIN_LINE" - -// 参与计算结构体信息 -type buildCalcStruct struct { - AxlePointMap map[string]*graphicData.AxleCounting - TurnoutMap map[string]*buildCalcTurnoutStruct - SectionMap map[string]*buildCalcSectionStruct - CoordinateConvertorMap map[string]*coordinateConvertor -} - -// 参与计算link时的区段结构体 -type buildCalcSectionStruct struct { - Data *graphicData.Section - axlePoints map[graphicData.RelatedRef_DevicePort]*graphicData.AxleCounting // 关联计轴map - stopPositions []*graphicData.StopPosition // 停车位 - transponders []*graphicData.Transponder // 应答器 - signals []*graphicData.Signal // 信号机 - slopes map[string]*graphicData.KilometerSystem // 坡度公里标 - curvatures map[string]*graphicData.KilometerSystem // 曲度公里标 -} - -// 参与计算的 -type buildCalcTurnoutStruct struct { - Data *graphicData.Turnout - axlePoints map[graphicData.RelatedRef_DevicePort]*graphicData.AxleCounting // 关联计轴map - CrossKilometerSystem *graphicData.KilometerSystem // 道岔岔心位置 - transponders map[graphicData.RelatedRef_DevicePort][]*graphicData.Transponder // 应答器 - signals map[graphicData.RelatedRef_DevicePort]*graphicData.Signal // 对应位置信号机 - slopes map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem // 坡度公里标 - curvatures map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem // 曲度公里标 -} - -// 坐标转换结构体 -type coordinateConvertor struct { - ConfigType string - ConfigCoordinate int64 - ConvertorType string - ConvertorCoordinate int64 -} - -func (c *coordinateConvertor) ConvertorKilometer(basisKilometer *graphicData.KilometerSystem, targetType string) int64 { - basisType := basisKilometer.CoordinateSystem - isMatch := (basisType == c.ConfigType && targetType == c.ConvertorType) || (targetType == c.ConfigType && basisType == c.ConvertorType) - if !isMatch { - panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: fmt.Sprintf("非【%s<>%s】转换方法", basisType, targetType)}) - } - if targetType == c.ConfigType { - return c.ConfigCoordinate + basisKilometer.Kilometer - c.ConvertorCoordinate - } else { - return c.ConvertorCoordinate + basisKilometer.Kilometer - c.ConfigCoordinate - } -} - -func generateConvertorKey(k1, k2 string) string { - if strings.Compare(k1, k2) > 0 { - return k1 + "_" + k2 - } else { - return k2 + "_" + k1 - } -} - -// 根据地图信息生成calcLink数据 -func BuildCalculateLinkData(gd *graphicData.RtssGraphicStorage) []*graphicData.CalculateLink { - gm, startPointQueue := getGraphicDataDeviceMap(gd) - // 这里linkPath是排过序的公里标大小 - linkPathMap := getGraphicLinkPath(gm, startPointQueue) - // 根据路径开始包装结果数据 - var resultArr []*graphicData.CalculateLink - for id, pathArr := range linkPathMap { - item := &graphicData.CalculateLink{ - Common: &graphicData.CommonInfo{}, - Index: int32(id), - Points: []*graphicData.Point{}, - Length: 0, - DevicePositions: []*graphicData.CalculateLink_DevicePosition{}, - } - allTurnout := true - prevKm, offset := getStartKilometer(gm, pathArr[0]) - devicePosistionMap := make(map[string]*graphicData.CalculateLink_DevicePosition) - for index, refVal := range pathArr { - if refVal.DeviceType == graphicData.RelatedRef_Section { - allTurnout = false - section := gm.SectionMap[refVal.Id] - // 计算长度 - item.Length = item.Length + calcGraphicLenBySection(section) - // 放入设备偏移 - offset, prevKm = getGraphicSectionRefDevices(refVal, devicePosistionMap, section, offset, prevKm) - } else { - allTurnout = allTurnout && true - turnout := gm.TurnoutMap[refVal.Id] - // 计算长度 - item.Length = item.Length + calcGraphicLenByTurnout(turnout, refVal.DevicePort) - // 放入设备偏移 - offset, prevKm = getGraphicTurnoutRefDevices(refVal, devicePosistionMap, turnout, offset, prevKm) - // 道岔时左右端直接赋值 - if index == 0 { - item.ARelatedRef = refVal - } else { - item.BRelatedRef = refVal - } - } - } - for _, v := range devicePosistionMap { - item.DevicePositions = append(item.DevicePositions, v) - } - sort.SliceStable(item.DevicePositions, func(i, j int) bool { - return item.DevicePositions[i].Offset < item.DevicePositions[j].Offset - }) - // 如果全部为道岔,则长度使用岔心减岔心 - if allTurnout { - tk1 := gm.TurnoutMap[pathArr[0].Id].CrossKilometerSystem.Kilometer - tk2 := gm.TurnoutMap[pathArr[len(pathArr)-1].Id].CrossKilometerSystem.Kilometer - item.Length = int32(math.Abs(float64(tk2 - tk1))) - } - resultArr = append(resultArr, item) - } - return resultArr -} - -// 计算区段长度 -func calcGraphicLenBySection(section *buildCalcSectionStruct) int32 { - if len(section.axlePoints) != 2 { - slog.Warn("区段端点位置缺失", "id", section.Data.Common.Id) - return 0 - } - var length int64 // 两端公里标相减即可 - for _, a := range section.axlePoints { - if !judgeKilometerVaild(a.KilometerSystem) { - return 0 - } - length = a.KilometerSystem.Kilometer - length - } - return int32(math.Abs(float64(length))) -} - -// 计算道岔端长度 -func calcGraphicLenByTurnout(turnout *buildCalcTurnoutStruct, p graphicData.RelatedRef_DevicePort) int32 { - endPoint := turnout.axlePoints[p] - if endPoint == nil || !judgeKilometerVaild(endPoint.KilometerSystem) { - slog.Warn("道岔对应端口【%s】数据无计轴", "turnoutId", turnout.Data.Common.Id, "port", p.String()) - return 0 - } - if !judgeKilometerVaild(turnout.CrossKilometerSystem) { - slog.Warn("道岔数据错误,岔心公里标为空", "turnoutId", turnout.Data.Common.Id) - return 0 - } - start := turnout.CrossKilometerSystem.Kilometer - end := endPoint.KilometerSystem.Kilometer - return int32(math.Abs(float64(end - start))) -} - -// 获取关于区段的设备信息 -func getGraphicSectionRefDevices(refVal *graphicData.RelatedRef, deviceMap map[string]*graphicData.CalculateLink_DevicePosition, - section *buildCalcSectionStruct, offset int32, prevKm int64) (int32, int64) { - dealFunc := func(p *graphicData.AxleCounting, d map[string]*graphicData.CalculateLink_DevicePosition, o int32, pk int64) (int32, int64) { - if p != nil && d[p.Common.Id] == nil { - resultOff := o + int32(math.Abs(float64(p.KilometerSystem.Kilometer-pk))) - resultPK := p.KilometerSystem.Kilometer - d[p.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: p.Common.Id, - Offset: resultOff, - DeviceType: graphicData.RelatedRef_AxleCounting.String(), - } - return resultOff, resultPK - } - return o, pk - } - // 查看连接点 - point := section.axlePoints[refVal.DevicePort] - offsetCalc, prevKmCalc := offset, prevKm - offsetCalc, prevKmCalc = dealFunc(point, deviceMap, offsetCalc, prevKmCalc) - // 获取另一个连接点 - nextPoint := graphicData.RelatedRef_B - if refVal.DevicePort == nextPoint { - nextPoint = graphicData.RelatedRef_A - } - point = section.axlePoints[nextPoint] - offsetCalc, prevKmCalc = dealFunc(point, deviceMap, offsetCalc, prevKmCalc) - // 处理区段上的设备 - startPoint := section.axlePoints[refVal.DevicePort] - if startPoint != nil { - sppk := startPoint.KilometerSystem.Kilometer // 相对起点的公里标 - spof := deviceMap[startPoint.Common.Id].Offset // 相对的起点offset - // 信号机信息 - for _, s := range section.signals { - if judgeKilometerVaild(s.KilometerSystem) && deviceMap[s.Common.Id] == nil { - deviceMap[s.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: s.Common.Id, - Offset: spof + int32(math.Abs(float64(s.KilometerSystem.Kilometer-sppk))), - DeviceType: "Signal", - } - } - } - // 停车标信息 - for _, s := range section.stopPositions { - if judgeKilometerVaild(s.KilometerSystem) && deviceMap[s.Common.Id] == nil { - deviceMap[s.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: s.Common.Id, - Offset: spof + int32(math.Abs(float64(s.KilometerSystem.Kilometer-sppk))), - DeviceType: "StopPosition", - } - } - } - // 应答器信息 - for _, t := range section.transponders { - if judgeKilometerVaild(t.KilometerSystem) && deviceMap[t.Common.Id] == nil { - deviceMap[t.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: t.Common.Id, - Offset: spof + int32(math.Abs(float64(t.KilometerSystem.Kilometer-sppk))), - DeviceType: "Transponder", - } - } - } - // 坡度 - for id, s := range section.slopes { - if judgeKilometerVaild(s) && deviceMap[id] == nil { - deviceMap[id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: id, - Offset: spof + int32(math.Abs(float64(s.Kilometer-sppk))), - DeviceType: "slopes", - } - } - } - // 曲度 - for id, c := range section.curvatures { - if judgeKilometerVaild(c) && deviceMap[id] == nil { - deviceMap[id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: id, - Offset: spof + int32(math.Abs(float64(c.Kilometer-sppk))), - DeviceType: "curvatures", - } - } - } - } - return offsetCalc, prevKmCalc -} - -// 获取关于道岔的设备信息 -func getGraphicTurnoutRefDevices(refVal *graphicData.RelatedRef, deviceMap map[string]*graphicData.CalculateLink_DevicePosition, turnout *buildCalcTurnoutStruct, offset int32, prevKm int64) (int32, int64) { - // 目前只放入岔心位置 - if turnout.CrossKilometerSystem != nil && deviceMap[turnout.Data.Common.Id] == nil { - offsetCalc := offset + int32(math.Abs(float64(turnout.CrossKilometerSystem.Kilometer-prevKm))) - prevKmCalc := turnout.CrossKilometerSystem.Kilometer - deviceMap[turnout.Data.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: turnout.Data.Common.Id, - Offset: offsetCalc, - DeviceType: graphicData.RelatedRef_Turnout.String(), - } - // 查看是否存在连接计轴 - point := turnout.axlePoints[refVal.DevicePort] - if point != nil && judgeKilometerVaild(point.KilometerSystem) && deviceMap[point.Common.Id] == nil { - deviceMap[point.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: point.Common.Id, - Offset: offset + int32(math.Abs(float64(point.KilometerSystem.Kilometer-prevKm))), - DeviceType: graphicData.RelatedRef_AxleCounting.String(), - } - } - // 处理道岔上的信号机 - signal := turnout.signals[refVal.DevicePort] - if signal != nil && judgeKilometerVaild(signal.KilometerSystem) && deviceMap[signal.Common.Id] == nil { - deviceMap[signal.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: signal.Common.Id, - Offset: offset + int32(math.Abs(float64(signal.KilometerSystem.Kilometer-prevKm))), - DeviceType: "Signal", - } - } - // 处理道岔上的应答器 - transponders := turnout.transponders[refVal.DevicePort] - for _, t := range transponders { - if judgeKilometerVaild(t.KilometerSystem) && deviceMap[t.Common.Id] == nil { - deviceMap[t.Common.Id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: t.Common.Id, - Offset: offset + int32(math.Abs(float64(t.KilometerSystem.Kilometer-prevKm))), - DeviceType: "Transponder", - } - } - } - - // 坡度 - sm := turnout.slopes[refVal.DevicePort] - for id, s := range sm { - if judgeKilometerVaild(s) && deviceMap[id] == nil { - deviceMap[id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: id, - Offset: offset + int32(math.Abs(float64(s.Kilometer-prevKm))), - DeviceType: "slopes", - } - } - } - - // 曲度 - cm := turnout.curvatures[refVal.DevicePort] - for id, c := range cm { - if judgeKilometerVaild(c) && deviceMap[id] == nil { - deviceMap[id] = &graphicData.CalculateLink_DevicePosition{ - DeviceId: id, - Offset: offset + int32(math.Abs(float64(c.Kilometer-prevKm))), - DeviceType: "curvatures", - } - } - } - return offsetCalc, prevKmCalc - } - return offset, prevKm -} - -// 获取link的起始点和包装数据结构方便查找,以道岔的各分支的连接点为起点 -func getGraphicDataDeviceMap(gd *graphicData.RtssGraphicStorage) (*buildCalcStruct, *list.List) { - gm := &buildCalcStruct{ - AxlePointMap: make(map[string]*graphicData.AxleCounting), - TurnoutMap: make(map[string]*buildCalcTurnoutStruct), - SectionMap: make(map[string]*buildCalcSectionStruct), - CoordinateConvertorMap: make(map[string]*coordinateConvertor), - } - // 区段列表 - for _, s := range gd.Section { - gm.SectionMap[s.Common.Id] = &buildCalcSectionStruct{ - Data: s, - axlePoints: make(map[graphicData.RelatedRef_DevicePort]*graphicData.AxleCounting, 2), - slopes: make(map[string]*graphicData.KilometerSystem), - curvatures: make(map[string]*graphicData.KilometerSystem), - } - } - // 起始点列表 - startPoints := list.New() - for _, t := range gd.Turnouts { - // 根据道岔公里标列表,获取道岔公里标并且生成公里标转换对象 - op := queryTurnoutKmAndGenerateConvertor(gm, t.KilometerSystem) - if t.PaRef != nil { - startPoints.PushBack(t.PaRef) - } - if t.PbRef != nil { - startPoints.PushBack(t.PbRef) - } - if t.PcRef != nil { - startPoints.PushBack(t.PcRef) - } - gm.TurnoutMap[t.Common.Id] = &buildCalcTurnoutStruct{ - Data: t, - CrossKilometerSystem: op, - axlePoints: make(map[graphicData.RelatedRef_DevicePort]*graphicData.AxleCounting, 3), - transponders: make(map[graphicData.RelatedRef_DevicePort][]*graphicData.Transponder), - signals: make(map[graphicData.RelatedRef_DevicePort]*graphicData.Signal, 3), - slopes: make(map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem), - curvatures: make(map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem), - } - } - // 处理坐标转换对象 - convertorCoordinateByAxleCounting(gm, gd.AxleCountings) - for tid, turnoutInfo := range gm.TurnoutMap { - mainLineKm, v, b := convertorMainLineKM(gm.CoordinateConvertorMap, turnoutInfo.CrossKilometerSystem) - if !v { - slog.Warn("道岔公里标缺失", "turnoutId", tid) - continue - } - if !b { - panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: fmt.Sprintf("道岔[%s]公里标不能转换正线公里标", tid)}) - } - turnoutInfo.CrossKilometerSystem = mainLineKm - } - - // 计轴点关联到对应的区段,道岔上 - for _, a := range gd.AxleCountings { - mainLineKm, v, b := convertorMainLineKM(gm.CoordinateConvertorMap, a.KilometerSystem) - if !v { - slog.Warn("计轴点公里标缺失", "axleId", a.Common.Id) - continue - } - if !b { - slog.Warn("计轴点[%s]公里标不能转换正线公里标", "axleId", a.Common.Id) - continue - } - a.KilometerSystem = mainLineKm - gm.AxlePointMap[a.Common.Id] = a - for _, r := range a.AxleCountingRef { - if r.DeviceType == graphicData.RelatedRef_Section { - gm.SectionMap[r.Id].axlePoints[r.DevicePort] = a - } else if r.DeviceType == graphicData.RelatedRef_Turnout { - gm.TurnoutMap[r.Id].axlePoints[r.DevicePort] = a - } - } - } - // 信号机关联到对应区段或道岔上 - for _, s := range gd.Signals { - mainLineKm, v, b := convertorMainLineKM(gm.CoordinateConvertorMap, s.KilometerSystem) - if !v { - continue - } - if !b { - slog.Warn("信号机公里标不能转换正线公里标", "signalId", s.Common.Id) - continue - } - s.KilometerSystem = mainLineKm - switch s.RefDev.DeviceType { - case graphicData.RelatedRef_Section: - gm.SectionMap[s.RefDev.Id].signals = append(gm.SectionMap[s.RefDev.Id].signals, s) - case graphicData.RelatedRef_Turnout: - gm.TurnoutMap[s.RefDev.Id].signals[s.RefDev.DevicePort] = s - } - } - // 应答器关联到对应区段或道岔 - for _, t := range gd.Transponders { - mainLineKm, v, b := convertorMainLineKM(gm.CoordinateConvertorMap, t.KilometerSystem) - if !v { - continue - } - if !b { - slog.Warn("应答器公里标不能转换正线公里标", "id", t.Common.Id) - continue - } - t.KilometerSystem = mainLineKm - switch t.TransponderRef.DeviceType { - case graphicData.RelatedRef_Section: - gm.SectionMap[t.TransponderRef.Id].transponders = append(gm.SectionMap[t.TransponderRef.Id].transponders, t) - case graphicData.RelatedRef_Turnout: - gm.TurnoutMap[t.TransponderRef.Id].transponders[t.TransponderRef.DevicePort] = append(gm.TurnoutMap[t.TransponderRef.Id].transponders[t.TransponderRef.DevicePort], t) - } - } - // 停车标关联到对应区段或道岔 - for _, s := range gd.StopPositions { - mainLineKm, v, b := convertorMainLineKM(gm.CoordinateConvertorMap, s.KilometerSystem) - if !v { - continue - } - if !b { - slog.Warn("停车标公里标不能转换正线公里标", "id", s.Common.Id) - continue - } - s.KilometerSystem = mainLineKm - switch s.RefDev.DeviceType { - case graphicData.RelatedRef_Section: - gm.SectionMap[s.RefDev.Id].stopPositions = append(gm.SectionMap[s.RefDev.Id].stopPositions, s) - } - } - // 坡度Map - slopeMap := make(map[graphicData.Direction]map[string]*graphicData.KilometerSystem) - for _, s := range gd.SlopeKiloMarker { - handleSlopeCurvaturesMap(gm.CoordinateConvertorMap, s.Common.Id, s.KilometerSystem, slopeMap) - } - // 曲度Map - curvatureMap := make(map[graphicData.Direction]map[string]*graphicData.KilometerSystem) - for _, c := range gd.CurvatureKiloMarker { - handleSlopeCurvaturesMap(gm.CoordinateConvertorMap, c.Common.Id, c.KilometerSystem, curvatureMap) - } - if len(slopeMap) != 0 || len(curvatureMap) != 0 { - for _, s := range gm.SectionMap { - handleSectionSlopeCurvaturesMap(s, slopeMap, func(sec *buildCalcSectionStruct) map[string]*graphicData.KilometerSystem { return sec.slopes }) - handleSectionSlopeCurvaturesMap(s, curvatureMap, func(sec *buildCalcSectionStruct) map[string]*graphicData.KilometerSystem { return sec.curvatures }) - } - for _, t := range gm.TurnoutMap { - // A点坡度 - handleTurnoutSlopeCurvaturesMap(graphicData.RelatedRef_A, t, slopeMap, - func(sw *buildCalcTurnoutStruct) map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem { - return sw.slopes - }) - // B点坡度 - handleTurnoutSlopeCurvaturesMap(graphicData.RelatedRef_B, t, slopeMap, - func(sw *buildCalcTurnoutStruct) map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem { - return sw.slopes - }) - // A点曲度 - handleTurnoutSlopeCurvaturesMap(graphicData.RelatedRef_A, t, curvatureMap, - func(sw *buildCalcTurnoutStruct) map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem { - return sw.curvatures - }) - // B点曲度 - handleTurnoutSlopeCurvaturesMap(graphicData.RelatedRef_B, t, curvatureMap, - func(sw *buildCalcTurnoutStruct) map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem { - return sw.curvatures - }) - } - } - return gm, startPoints -} - -// 根据道岔公里标列表,获取道岔公里标并且生成公里标转换对象 -func queryTurnoutKmAndGenerateConvertor(gm *buildCalcStruct, kilometers []*graphicData.KilometerSystem) *graphicData.KilometerSystem { - if len(kilometers) == 0 { - return nil - } - var ks []*graphicData.KilometerSystem - var rk *graphicData.KilometerSystem - for _, k := range kilometers { - if judgeKilometerVaild(k) { - ks = append(ks, k) - if k.CoordinateSystem == mainLineType { - rk = k - } - } - } - l := len(ks) - if rk == nil && l > 0 { - rk = ks[0] - } - if l < 2 { - return rk - } - for i, si := range ks { - for j := i + 1; j < l; j++ { - sj := ks[j] - if si.CoordinateSystem == sj.CoordinateSystem { - continue - } - key := generateConvertorKey(si.CoordinateSystem, sj.CoordinateSystem) - if gm.CoordinateConvertorMap[key] != nil { - continue - } - gm.CoordinateConvertorMap[key] = &coordinateConvertor{ - ConfigType: si.CoordinateSystem, - ConfigCoordinate: si.Kilometer, - ConvertorType: sj.CoordinateSystem, - ConvertorCoordinate: sj.Kilometer, - } - } - } - return rk -} - -// 根据计轴公里标生成公里标转换对象 -func convertorCoordinateByAxleCounting(gm *buildCalcStruct, axleCounts []*graphicData.AxleCounting) { - if len(gm.TurnoutMap) == 0 { - return - } - for _, a := range axleCounts { - if len(a.AxleCountingRef) == 0 { - continue - } - if !judgeKilometerVaild(a.KilometerSystem) { - continue - } - axleKM := a.KilometerSystem - var sameKM, diffKM *graphicData.KilometerSystem - for _, r := range a.AxleCountingRef { - if r.DeviceType != graphicData.RelatedRef_Turnout { - continue - } - t := gm.TurnoutMap[r.Id] - if t == nil { - continue - } - if t.CrossKilometerSystem.CoordinateSystem == axleKM.CoordinateSystem { - sameKM = t.CrossKilometerSystem - } else { - diffKM = t.CrossKilometerSystem - } - } - if sameKM == nil || diffKM == nil { - continue - } - key := generateConvertorKey(sameKM.CoordinateSystem, diffKM.CoordinateSystem) - if gm.CoordinateConvertorMap[key] != nil { - continue - } - // 计轴与相同坐标系岔心之间差值 - diffValue := axleKM.Kilometer - sameKM.Kilometer - // 俩岔心到计轴的距离相同,所以另一坐标系的公里标相减差值就是计轴在另一个坐标系的位置 - // a - x = y - b (x,y为计轴在两坐标系上的坐标) - convertKilometer := diffKM.Kilometer - diffValue - // 求出坐标系0点位置 - gm.CoordinateConvertorMap[key] = &coordinateConvertor{ - ConfigType: axleKM.CoordinateSystem, - ConfigCoordinate: axleKM.Kilometer, - ConvertorType: diffKM.CoordinateSystem, - ConvertorCoordinate: convertKilometer, - } - } -} - -// 获取link的路径信息 -func getGraphicLinkPath(gm *buildCalcStruct, startPointQueue *list.List) map[int][]*graphicData.RelatedRef { - handleMap := make(map[string]bool) - resultMap := make(map[int][]*graphicData.RelatedRef) - id := 1 - for i := startPointQueue.Front(); i != nil; i = i.Next() { - relatedRef := i.Value.(*graphicData.RelatedRef) - // 起始连接点,判断选择走向 - var refInfo *graphicData.RelatedRef - var axleInfo *graphicData.AxleCounting - if relatedRef.DeviceType == graphicData.RelatedRef_Section { - axleInfo = gm.SectionMap[relatedRef.Id].axlePoints[relatedRef.DevicePort] - refInfo = getRelatePointInfo(reflect.ValueOf(gm.SectionMap[relatedRef.Id]).Elem(), relatedRef.DevicePort) - } else { - axleInfo = gm.TurnoutMap[relatedRef.Id].axlePoints[relatedRef.DevicePort] - refInfo = getRelatePointInfo(reflect.ValueOf(gm.TurnoutMap[relatedRef.Id]).Elem(), relatedRef.DevicePort) - } - // 查看是否已经被处理过的ID,计轴信息为空时表示道岔,将ID排序后存入 - var handleId string - if axleInfo == nil { - ids := []string{relatedRef.Id, refInfo.Id} - sort.Strings(ids) - handleId = strings.Join(ids, "_") - } else { - handleId = axleInfo.Common.Id - } - if handleMap[handleId] { - continue - } - handleMap[handleId] = true - pathRefArr := []*graphicData.RelatedRef{refInfo} - // 循环查找结束点 - loopRelateRef := relatedRef - for loopRelateRef != nil { - pathRefArr = append(pathRefArr, loopRelateRef) - switch loopRelateRef.DeviceType { - case graphicData.RelatedRef_Section: - section := gm.SectionMap[loopRelateRef.Id] - axleInfo = section.axlePoints[loopRelateRef.DevicePort] - if loopRelateRef.DevicePort == graphicData.RelatedRef_A { - loopRelateRef = section.Data.PbRef - } else { - loopRelateRef = section.Data.PaRef - } - case graphicData.RelatedRef_Turnout: - turnout := gm.TurnoutMap[loopRelateRef.Id] - axleInfo = turnout.axlePoints[loopRelateRef.DevicePort] - loopRelateRef = nil - } - if axleInfo != nil { // 放入处理的计轴,防止倒过来重复处理 - handleMap[axleInfo.Common.Id] = true - } - } - resultMap[id] = pathRefArr - id++ // ID自增 - } - return resultMap -} - -// 获取本连接点上一个连接信息以及计轴信息 -func getRelatePointInfo(v reflect.Value, p graphicData.RelatedRef_DevicePort) *graphicData.RelatedRef { - var relateInfo reflect.Value - // 放入计轴点 - switch p { - case graphicData.RelatedRef_A: - relateInfo = v.FieldByName("Data").Elem().FieldByName("PaRef") - case graphicData.RelatedRef_B: - relateInfo = v.FieldByName("Data").Elem().FieldByName("PbRef") - case graphicData.RelatedRef_C: - relateInfo = v.FieldByName("Data").Elem().FieldByName("PcRef") - } - return relateInfo.Interface().(*graphicData.RelatedRef) -} - -// 获取起始端的 -func getStartKilometer(gm *buildCalcStruct, ref *graphicData.RelatedRef) (int64, int32) { - switch ref.DeviceType { - case graphicData.RelatedRef_Section: - section := gm.SectionMap[ref.Id] - var resultKilometer = int64(math.MaxInt64) - for _, p := range section.axlePoints { - if resultKilometer > p.KilometerSystem.Kilometer { - resultKilometer = p.KilometerSystem.Kilometer - } - } - if resultKilometer == math.MaxInt64 { - panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "区段公里标数据出错"}) - } - return resultKilometer, 0 - case graphicData.RelatedRef_Turnout: - turnout := gm.TurnoutMap[ref.Id] - if !judgeKilometerVaild(turnout.CrossKilometerSystem) { - panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "道岔岔心无正线公里标"}) - } - return turnout.CrossKilometerSystem.Kilometer, 0 - } - panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "错误的设备类型类型"}) -} - -// 转换正线公里标 -func convertorMainLineKM(convertorMap map[string]*coordinateConvertor, k *graphicData.KilometerSystem) (*graphicData.KilometerSystem, bool, bool) { - if !judgeKilometerVaild(k) { - return k, false, false - } - if k.CoordinateSystem == mainLineType { - return k, true, true - } - key := generateConvertorKey(mainLineType, k.CoordinateSystem) - convertor := convertorMap[key] - if convertor == nil { - return nil, true, false - } - kilometer := convertor.ConvertorKilometer(k, mainLineType) - return &graphicData.KilometerSystem{ - Kilometer: kilometer, - CoordinateSystem: mainLineType, - Direction: k.Direction, - }, true, true -} - -func judgeKilometerVaild(k *graphicData.KilometerSystem) bool { - return k != nil && k.CoordinateSystem != "" && k.Kilometer != 0 -} - -// 判断公里标k1 是否在这k2,k3个范围内 -func judgeKilometerInRange(k1, k2, k3 *graphicData.KilometerSystem) bool { - if judgeKilometerVaild(k1) && judgeKilometerVaild(k2) && judgeKilometerVaild(k3) { - start, end := k2, k3 - if k2.Kilometer > k3.Kilometer { - start, end = k3, k2 - } - return k1.Kilometer > start.Kilometer && k1.Kilometer < end.Kilometer - } - return false -} - -// 处理道岔坡度、曲度信息 -func handleSlopeCurvaturesMap(convertorMap map[string]*coordinateConvertor, - id string, kms []*graphicData.KilometerSystem, m map[graphicData.Direction]map[string]*graphicData.KilometerSystem) { - for _, k := range kms { - mainLineKm, v, b := convertorMainLineKM(convertorMap, k) - if !v { - continue - } - if !b { - slog.Warn("坡度、曲度公里标不能转换正线公里标", "id", id) - continue - } - kmMap := m[k.Direction] - if kmMap == nil { - kmMap = make(map[string]*graphicData.KilometerSystem) - m[k.Direction] = kmMap - } - kmMap[id] = mainLineKm - } -} - -func handleTurnoutSlopeCurvaturesMap(port graphicData.RelatedRef_DevicePort, - t *buildCalcTurnoutStruct, - scmap map[graphicData.Direction]map[string]*graphicData.KilometerSystem, - f func(*buildCalcTurnoutStruct) map[graphicData.RelatedRef_DevicePort]map[string]*graphicData.KilometerSystem) { - point := t.axlePoints[port] - if point == nil { - return - } - m := f(t) - m[port] = make(map[string]*graphicData.KilometerSystem) - kmMap := scmap[point.KilometerSystem.Direction] - var idArr []string - for k, v := range kmMap { - if judgeKilometerInRange(v, point.KilometerSystem, t.CrossKilometerSystem) { - m[port][k] = v - idArr = append(idArr, k) - } - } - for _, id := range idArr { - delete(kmMap, id) - } -} - -func handleSectionSlopeCurvaturesMap(s *buildCalcSectionStruct, - scmap map[graphicData.Direction]map[string]*graphicData.KilometerSystem, - f func(*buildCalcSectionStruct) map[string]*graphicData.KilometerSystem) { - pointA := s.axlePoints[graphicData.RelatedRef_A] - pointB := s.axlePoints[graphicData.RelatedRef_B] - if pointA == nil || pointB == nil { - return - } - m := f(s) - kmMap := scmap[pointA.KilometerSystem.Direction] - var idArr []string - for k, v := range kmMap { - if judgeKilometerInRange(v, pointA.KilometerSystem, pointB.KilometerSystem) { - m[k] = v - idArr = append(idArr, k) - } - } - for _, id := range idArr { - delete(kmMap, id) - } -} diff --git a/ts/simulation/wayside/memory/wayside_memory_map.go b/ts/simulation/wayside/memory/wayside_memory_map.go index 99bccf3..a608e62 100644 --- a/ts/simulation/wayside/memory/wayside_memory_map.go +++ b/ts/simulation/wayside/memory/wayside_memory_map.go @@ -12,9 +12,8 @@ import ( proto2 "joylink.club/rtsssimulation/repository/model/proto" "google.golang.org/protobuf/proto" - "joylink.club/bj-rtsts-server/db/dbquery" - "joylink.club/bj-rtsts-server/db/model" "joylink.club/bj-rtsts-server/dto" + "joylink.club/bj-rtsts-server/service" "joylink.club/bj-rtsts-server/sys_error" "joylink.club/bj-rtsts-server/ts/protos/graphicData" ) @@ -26,7 +25,7 @@ var ( ) // 将发布的地图数据放入内存中 -func PublishMapVerifyStructure(graphic *model.PublishedGi) { +func PublishMapVerifyStructure(graphic *dto.PublishedDto) { giTypeMap.Store(graphic.ID, graphicData.PictureType(graphic.Type)) giNameMap.Store(graphic.Name, graphic.ID) var message proto.Message @@ -70,15 +69,24 @@ func DeleteMapVerifyStructure(mapId int32) { giTypeMap.Delete(mapId) giDataMap.Delete(mapId) giUidMap.Delete(mapId) + var name string + giNameMap.Range(func(key, value any) bool { + id := value.(int32) + if id == mapId { + name = key.(string) + return true + } + return false + }) + if name != "" { + giNameMap.Delete(name) + } } func QueryGiType(mapId int32) graphicData.PictureType { value, ok := giTypeMap.Load(mapId) if !ok { - graphic, err := dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.ID.Eq(mapId)).First() // 当缓存缺失新地图时,查询一次 - if err != nil { - panic(sys_error.New(fmt.Sprintf("[mapId:%d]类型映射错误 :%v", mapId, value), err)) - } + graphic := service.GetPublishedById(mapId) PublishMapVerifyStructure(graphic) return graphicData.PictureType(graphic.Type) } diff --git a/ts/simulation/wayside/memory/wayside_memory_train.go b/ts/simulation/wayside/memory/wayside_memory_train.go index b91c9f7..bd752d1 100644 --- a/ts/simulation/wayside/memory/wayside_memory_train.go +++ b/ts/simulation/wayside/memory/wayside_memory_train.go @@ -18,7 +18,7 @@ import ( ) // 增加列车状态 -func AddTrainState(vs *VerifySimulation, status *state.TrainState, mapId int32) { +func AddTrainState(vs *VerifySimulation, status *state.TrainState, mapId int32) *state.TrainState { allTrainMap := &vs.Memory.Status.TrainStateMap _, ok := allTrainMap.Load(status.Id) if ok { @@ -86,10 +86,11 @@ func AddTrainState(vs *VerifySimulation, status *state.TrainState, mapId int32) }) // 将信息合并到当前设备状态中 allTrainMap.Store(status.Id, status) + return status } // 修改列车信息 -func UpdateTrainInfo(vs *VerifySimulation, status *state.TrainState) { +func UpdateTrainInfo(vs *VerifySimulation, status *state.TrainState) *state.TrainState { allTrainMap := &vs.Memory.Status.TrainStateMap data, ok := allTrainMap.Load(status.Id) if !ok { @@ -98,10 +99,11 @@ func UpdateTrainInfo(vs *VerifySimulation, status *state.TrainState) { sta := data.(*state.TrainState) sta.TrainLength = status.TrainLength sta.WheelDiameter = status.WheelDiameter + return sta } // 根据动力学发来的信息修改列车状态 -func UpdateTrainStateByDynamics(vs *VerifySimulation, trainId string, info *message.DynamicsTrainInfo) { +func UpdateTrainStateByDynamics(vs *VerifySimulation, trainId string, info *message.DynamicsTrainInfo) *state.TrainState { data, ok := vs.Memory.Status.TrainStateMap.Load(trainId) if !ok { panic(sys_error.New(fmt.Sprintf("动力学传输数据:列车【%s】不存在", trainId))) @@ -173,6 +175,7 @@ func UpdateTrainStateByDynamics(vs *VerifySimulation, trainId string, info *mess sta.DynamicState.HeadRadarSpeed = speedParse(info.HeadRadarSpeed) sta.DynamicState.TailRadarSpeed = speedParse(info.TailRadarSpeed) sta.DynamicState.Acceleration = info.Acceleration + return sta } // 删除列车状态 diff --git a/ts/simulation/wayside/memory/wayside_simulation.go b/ts/simulation/wayside/memory/wayside_simulation.go index 3e59fc5..f0c8ea8 100644 --- a/ts/simulation/wayside/memory/wayside_simulation.go +++ b/ts/simulation/wayside/memory/wayside_simulation.go @@ -14,6 +14,7 @@ import ( "joylink.club/bj-rtsts-server/dto" "joylink.club/bj-rtsts-server/sys_error" "joylink.club/bj-rtsts-server/third_party/dynamics" + "joylink.club/bj-rtsts-server/third_party/electrical_machinery" "joylink.club/bj-rtsts-server/third_party/message" "joylink.club/bj-rtsts-server/third_party/semi_physical_train" "joylink.club/bj-rtsts-server/ts/protos/graphicData" @@ -289,7 +290,13 @@ func (s *VerifySimulation) HandleDynamicsTrainInfo(info *message.DynamicsTrainIn // 给半实物仿真发送速度 semi_physical_train.Default().SendTrainControlMessage(info) // 更新列车状态 - UpdateTrainStateByDynamics(s, trainId, info) + trainState := UpdateTrainStateByDynamics(s, trainId, info) + // 更新电机转速 + electrical_machinery.Default().SendElectricMachineryMessage(&message.ElectricMachinery{ + Speed: info.Speed, + WheelDiameter: trainState.WheelDiameter, + IsBack: trainState.VobcState.DirectionBackward, + }) } // 获取动力学配置信息 @@ -380,7 +387,6 @@ func (s *VerifySimulation) HandleSemiPhysicalTrainControlMsg(b []byte) { panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) } d := append(b, uint8(trainId)) - //d = binary.BigEndian.AppendUint16(d, uint16(train.WheelDiameter)) // 发送给动力学 dynamics.Default().SendTrainControlMessage(d) // 存放至列车中 @@ -469,6 +475,11 @@ func (s *VerifySimulation) CollectInterlockRelayInfo(code string) *message.Inter return nil } +// 获取电机转速参数 +func (s *VerifySimulation) GetElectricMachineryRunConfig() *config.ElectricMachineryConfig { + return &s.runConfig.ElectricMachinery +} + // 初始化仿真运行配置 func (s *VerifySimulation) initRunConfig(runConfig *dto.ProjectRunConfigDto) error { if runConfig == nil || runConfig.ConfigContent == "" { diff --git a/ts/test_simulation_manage.go b/ts/test_simulation_manage.go index 084a8fc..cea5a78 100644 --- a/ts/test_simulation_manage.go +++ b/ts/test_simulation_manage.go @@ -2,12 +2,14 @@ package ts import ( "fmt" - "joylink.club/bj-rtsts-server/third_party/axle_device" "log/slog" "runtime" "strconv" "sync" + "joylink.club/bj-rtsts-server/third_party/axle_device" + "joylink.club/bj-rtsts-server/third_party/electrical_machinery" + "joylink.club/bj-rtsts-server/config" "joylink.club/bj-rtsts-server/message_server" "joylink.club/bj-rtsts-server/sys_error" @@ -62,20 +64,6 @@ func CreateSimulation(projectId int32, mapIds []int32, runConfig *dto.ProjectRun verifySimulation.World.StartUp() // 启动仿真消息服务 message_server.Start(verifySimulation) - /* - //测试用 - cps := verifySimulation.GetSectionCodePoints("北京", "12", "酒仙桥") - if len(cps) > 0 { - sort.SliceStable(cps, func(i, j int) bool { - return cps[i].Row < cps[j].Row - }) - } - sb := strings.Builder{} - for row, cp := range cps { - sb.WriteString(fmt.Sprintf("%d:\"%s\",", row, cp.SectionId)) - } - fmt.Println("====================@@@@@@@>>>>>>>>", sb.String()) - */ } return simulationId, nil } @@ -127,6 +115,8 @@ func runThirdParty(s *memory.VerifySimulation) error { } // 计轴RSSP启动 axle_device.StartLineAllRsspAxleServices(s) + // 电机UDP启动 + electrical_machinery.Default().Start(s) return nil } @@ -142,6 +132,8 @@ func stopThirdParty(s *memory.VerifySimulation) { } //计轴RSSP启动销毁 axle_device.StopLineAllRsspAxleServices() + // 电机UDP停止 + electrical_machinery.Default().Stop() } func createSimulationId(projectId int32) string {