From 438d120fb0d8862c2548f074b79540586bc9e836 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Wed, 11 Jan 2023 10:39:18 +0000 Subject: [PATCH] Make gateway state consistent + make stats interval configurable. This: * Makes the gateway stats interval configurable (default 30 sec) * Adds GatewayState type (NEVER_SEEN, OFFLINE, ONLINE) * Adds gateway state to gateway lists * Fixes dashboard inconsistencies Closes #76. --- api/go/api/device_profile.pb.go | 2 +- api/go/api/gateway.pb.go | 404 +++++++++++------- api/go/api/internal.pb.go | 324 +++++++------- api/grpc-web/api/gateway_pb.d.ts | 13 + api/grpc-web/api/gateway_pb.js | 74 +++- api/grpc-web/api/internal_pb.d.ts | 12 +- api/grpc-web/api/internal_pb.js | 24 +- api/js/api/gateway_pb.d.ts | 16 + api/js/api/gateway_pb.js | 74 +++- api/js/api/internal_pb.d.ts | 12 +- api/js/api/internal_pb.js | 24 +- api/md/api/api.md | 19 +- api/proto/api/device_profile.proto | 2 +- api/proto/api/gateway.proto | 21 + api/proto/api/internal.proto | 8 +- .../chirpstack-api/api/device_profile.proto | 2 +- .../proto/chirpstack-api/api/gateway.proto | 21 + .../proto/chirpstack-api/api/internal.proto | 8 +- .../src/chirpstack_api/api/gateway_pb2.py | 70 +-- .../src/chirpstack_api/api/internal_pb2.py | 48 +-- .../proto/chirpstack/api/device_profile.proto | 2 +- api/rust/proto/chirpstack/api/gateway.proto | 21 + api/rust/proto/chirpstack/api/internal.proto | 8 +- chirpstack/src/api/gateway.rs | 19 +- chirpstack/src/api/internal.rs | 8 +- chirpstack/src/storage/gateway.rs | 22 +- ui/src/views/dashboard/Dashboard.tsx | 22 +- ui/src/views/gateways/CreateGateway.tsx | 3 +- ui/src/views/gateways/GatewayDashboard.tsx | 4 +- ui/src/views/gateways/GatewayForm.tsx | 33 +- ui/src/views/gateways/ListGateways.tsx | 19 +- ui/src/views/tenants/TenantDashboard.tsx | 22 +- 32 files changed, 875 insertions(+), 486 deletions(-) diff --git a/api/go/api/device_profile.pb.go b/api/go/api/device_profile.pb.go index 156f9776..cd49514b 100644 --- a/api/go/api/device_profile.pb.go +++ b/api/go/api/device_profile.pb.go @@ -166,7 +166,7 @@ type DeviceProfile struct { FlushQueueOnActivate bool `protobuf:"varint,10,opt,name=flush_queue_on_activate,json=flushQueueOnActivate,proto3" json:"flush_queue_on_activate,omitempty"` // Uplink interval (seconds). // This defines the expected uplink interval which the device uses for - // communication. When the uplink interval has expired and no uplink has + // communication. If the uplink interval has expired and no uplink has // been received, the device is considered inactive. UplinkInterval uint32 `protobuf:"varint,11,opt,name=uplink_interval,json=uplinkInterval,proto3" json:"uplink_interval,omitempty"` // Device-status request interval (times / day). diff --git a/api/go/api/gateway.pb.go b/api/go/api/gateway.pb.go index 0fc39853..cf29df86 100644 --- a/api/go/api/gateway.pb.go +++ b/api/go/api/gateway.pb.go @@ -24,6 +24,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type GatewayState int32 + +const ( + // The gateway has never sent any stats. + GatewayState_NEVER_SEEN GatewayState = 0 + // Online. + GatewayState_ONLINE GatewayState = 1 + // Offline. + GatewayState_OFFLINE GatewayState = 2 +) + +// Enum value maps for GatewayState. +var ( + GatewayState_name = map[int32]string{ + 0: "NEVER_SEEN", + 1: "ONLINE", + 2: "OFFLINE", + } + GatewayState_value = map[string]int32{ + "NEVER_SEEN": 0, + "ONLINE": 1, + "OFFLINE": 2, + } +) + +func (x GatewayState) Enum() *GatewayState { + p := new(GatewayState) + *p = x + return p +} + +func (x GatewayState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GatewayState) Descriptor() protoreflect.EnumDescriptor { + return file_api_gateway_proto_enumTypes[0].Descriptor() +} + +func (GatewayState) Type() protoreflect.EnumType { + return &file_api_gateway_proto_enumTypes[0] +} + +func (x GatewayState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GatewayState.Descriptor instead. +func (GatewayState) EnumDescriptor() ([]byte, []int) { + return file_api_gateway_proto_rawDescGZIP(), []int{0} +} + type Gateway struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -43,6 +95,10 @@ type Gateway struct { Tags map[string]string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Metadata (provided by the gateway). Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Stats interval (seconds). + // This defines the expected interval in which the gateway sends its + // statistics. + StatsInterval uint32 `protobuf:"varint,8,opt,name=stats_interval,json=statsInterval,proto3" json:"stats_interval,omitempty"` } func (x *Gateway) Reset() { @@ -126,6 +182,13 @@ func (x *Gateway) GetMetadata() map[string]string { return nil } +func (x *Gateway) GetStatsInterval() uint32 { + if x != nil { + return x.StatsInterval + } + return 0 +} + type GatewayListItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -149,6 +212,10 @@ type GatewayListItem struct { UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Last seen at timestamp. LastSeenAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_seen_at,json=lastSeenAt,proto3" json:"last_seen_at,omitempty"` + // Gateway state. + // Please note that the state of the gateway is driven by the stats + // packages that are sent by the gateway. + State GatewayState `protobuf:"varint,10,opt,name=state,proto3,enum=api.GatewayState" json:"state,omitempty"` } func (x *GatewayListItem) Reset() { @@ -246,6 +313,13 @@ func (x *GatewayListItem) GetLastSeenAt() *timestamppb.Timestamp { return nil } +func (x *GatewayListItem) GetState() GatewayState { + if x != nil { + return x.State + } + return GatewayState_NEVER_SEEN +} + type CreateGatewayRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -957,7 +1031,7 @@ var file_api_gateway_proto_rawDesc = []byte{ 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x03, 0x0a, 0x07, 0x47, 0x61, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x03, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, @@ -974,41 +1048,46 @@ var file_api_gateway_proto_rawDesc = []byte{ 0x73, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xea, 0x03, 0x0a, 0x0f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x49, - 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x3c, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x61, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x41, 0x74, 0x1a, 0x3d, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x93, 0x04, 0x0a, 0x0f, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x08, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, + 0x65, 0x65, 0x6e, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, + 0x65, 0x6e, 0x41, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -1113,62 +1192,65 @@ var file_api_gateway_proto_rawDesc = []byte{ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x12, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x32, 0x91, 0x06, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5a, 0x0a, 0x03, 0x47, 0x65, - 0x74, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x6a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x1a, 0x22, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x3a, - 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0x52, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2d, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x77, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, - 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x42, 0x53, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2a, 0x37, 0x0a, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x45, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x45, 0x4e, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x32, 0x91, 0x06, 0x0a, 0x0e, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x06, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, + 0x3a, 0x01, 0x2a, 0x12, 0x5a, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, + 0x6a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x27, 0x1a, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, + 0x2a, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, + 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x52, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, + 0x12, 0xb1, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x77, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x2f, 0x7b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x53, 0x0a, + 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, + 0x70, 0x69, 0x42, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x61, + 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1183,76 +1265,79 @@ func file_api_gateway_proto_rawDescGZIP() []byte { return file_api_gateway_proto_rawDescData } +var file_api_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_api_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_api_gateway_proto_goTypes = []interface{}{ - (*Gateway)(nil), // 0: api.Gateway - (*GatewayListItem)(nil), // 1: api.GatewayListItem - (*CreateGatewayRequest)(nil), // 2: api.CreateGatewayRequest - (*GetGatewayRequest)(nil), // 3: api.GetGatewayRequest - (*GetGatewayResponse)(nil), // 4: api.GetGatewayResponse - (*UpdateGatewayRequest)(nil), // 5: api.UpdateGatewayRequest - (*DeleteGatewayRequest)(nil), // 6: api.DeleteGatewayRequest - (*ListGatewaysRequest)(nil), // 7: api.ListGatewaysRequest - (*ListGatewaysResponse)(nil), // 8: api.ListGatewaysResponse - (*GenerateGatewayClientCertificateRequest)(nil), // 9: api.GenerateGatewayClientCertificateRequest - (*GenerateGatewayClientCertificateResponse)(nil), // 10: api.GenerateGatewayClientCertificateResponse - (*GetGatewayMetricsRequest)(nil), // 11: api.GetGatewayMetricsRequest - (*GetGatewayMetricsResponse)(nil), // 12: api.GetGatewayMetricsResponse - nil, // 13: api.Gateway.TagsEntry - nil, // 14: api.Gateway.MetadataEntry - nil, // 15: api.GatewayListItem.PropertiesEntry - (*common.Location)(nil), // 16: common.Location - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (common.Aggregation)(0), // 18: common.Aggregation - (*common.Metric)(nil), // 19: common.Metric - (*emptypb.Empty)(nil), // 20: google.protobuf.Empty + (GatewayState)(0), // 0: api.GatewayState + (*Gateway)(nil), // 1: api.Gateway + (*GatewayListItem)(nil), // 2: api.GatewayListItem + (*CreateGatewayRequest)(nil), // 3: api.CreateGatewayRequest + (*GetGatewayRequest)(nil), // 4: api.GetGatewayRequest + (*GetGatewayResponse)(nil), // 5: api.GetGatewayResponse + (*UpdateGatewayRequest)(nil), // 6: api.UpdateGatewayRequest + (*DeleteGatewayRequest)(nil), // 7: api.DeleteGatewayRequest + (*ListGatewaysRequest)(nil), // 8: api.ListGatewaysRequest + (*ListGatewaysResponse)(nil), // 9: api.ListGatewaysResponse + (*GenerateGatewayClientCertificateRequest)(nil), // 10: api.GenerateGatewayClientCertificateRequest + (*GenerateGatewayClientCertificateResponse)(nil), // 11: api.GenerateGatewayClientCertificateResponse + (*GetGatewayMetricsRequest)(nil), // 12: api.GetGatewayMetricsRequest + (*GetGatewayMetricsResponse)(nil), // 13: api.GetGatewayMetricsResponse + nil, // 14: api.Gateway.TagsEntry + nil, // 15: api.Gateway.MetadataEntry + nil, // 16: api.GatewayListItem.PropertiesEntry + (*common.Location)(nil), // 17: common.Location + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + (common.Aggregation)(0), // 19: common.Aggregation + (*common.Metric)(nil), // 20: common.Metric + (*emptypb.Empty)(nil), // 21: google.protobuf.Empty } var file_api_gateway_proto_depIdxs = []int32{ - 16, // 0: api.Gateway.location:type_name -> common.Location - 13, // 1: api.Gateway.tags:type_name -> api.Gateway.TagsEntry - 14, // 2: api.Gateway.metadata:type_name -> api.Gateway.MetadataEntry - 16, // 3: api.GatewayListItem.location:type_name -> common.Location - 15, // 4: api.GatewayListItem.properties:type_name -> api.GatewayListItem.PropertiesEntry - 17, // 5: api.GatewayListItem.created_at:type_name -> google.protobuf.Timestamp - 17, // 6: api.GatewayListItem.updated_at:type_name -> google.protobuf.Timestamp - 17, // 7: api.GatewayListItem.last_seen_at:type_name -> google.protobuf.Timestamp - 0, // 8: api.CreateGatewayRequest.gateway:type_name -> api.Gateway - 0, // 9: api.GetGatewayResponse.gateway:type_name -> api.Gateway - 17, // 10: api.GetGatewayResponse.created_at:type_name -> google.protobuf.Timestamp - 17, // 11: api.GetGatewayResponse.updated_at:type_name -> google.protobuf.Timestamp - 17, // 12: api.GetGatewayResponse.last_seen_at:type_name -> google.protobuf.Timestamp - 0, // 13: api.UpdateGatewayRequest.gateway:type_name -> api.Gateway - 1, // 14: api.ListGatewaysResponse.result:type_name -> api.GatewayListItem - 17, // 15: api.GenerateGatewayClientCertificateResponse.expires_at:type_name -> google.protobuf.Timestamp - 17, // 16: api.GetGatewayMetricsRequest.start:type_name -> google.protobuf.Timestamp - 17, // 17: api.GetGatewayMetricsRequest.end:type_name -> google.protobuf.Timestamp - 18, // 18: api.GetGatewayMetricsRequest.aggregation:type_name -> common.Aggregation - 19, // 19: api.GetGatewayMetricsResponse.rx_packets:type_name -> common.Metric - 19, // 20: api.GetGatewayMetricsResponse.tx_packets:type_name -> common.Metric - 19, // 21: api.GetGatewayMetricsResponse.tx_packets_per_freq:type_name -> common.Metric - 19, // 22: api.GetGatewayMetricsResponse.rx_packets_per_freq:type_name -> common.Metric - 19, // 23: api.GetGatewayMetricsResponse.tx_packets_per_dr:type_name -> common.Metric - 19, // 24: api.GetGatewayMetricsResponse.rx_packets_per_dr:type_name -> common.Metric - 19, // 25: api.GetGatewayMetricsResponse.tx_packets_per_status:type_name -> common.Metric - 2, // 26: api.GatewayService.Create:input_type -> api.CreateGatewayRequest - 3, // 27: api.GatewayService.Get:input_type -> api.GetGatewayRequest - 5, // 28: api.GatewayService.Update:input_type -> api.UpdateGatewayRequest - 6, // 29: api.GatewayService.Delete:input_type -> api.DeleteGatewayRequest - 7, // 30: api.GatewayService.List:input_type -> api.ListGatewaysRequest - 9, // 31: api.GatewayService.GenerateClientCertificate:input_type -> api.GenerateGatewayClientCertificateRequest - 11, // 32: api.GatewayService.GetMetrics:input_type -> api.GetGatewayMetricsRequest - 20, // 33: api.GatewayService.Create:output_type -> google.protobuf.Empty - 4, // 34: api.GatewayService.Get:output_type -> api.GetGatewayResponse - 20, // 35: api.GatewayService.Update:output_type -> google.protobuf.Empty - 20, // 36: api.GatewayService.Delete:output_type -> google.protobuf.Empty - 8, // 37: api.GatewayService.List:output_type -> api.ListGatewaysResponse - 10, // 38: api.GatewayService.GenerateClientCertificate:output_type -> api.GenerateGatewayClientCertificateResponse - 12, // 39: api.GatewayService.GetMetrics:output_type -> api.GetGatewayMetricsResponse - 33, // [33:40] is the sub-list for method output_type - 26, // [26:33] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 17, // 0: api.Gateway.location:type_name -> common.Location + 14, // 1: api.Gateway.tags:type_name -> api.Gateway.TagsEntry + 15, // 2: api.Gateway.metadata:type_name -> api.Gateway.MetadataEntry + 17, // 3: api.GatewayListItem.location:type_name -> common.Location + 16, // 4: api.GatewayListItem.properties:type_name -> api.GatewayListItem.PropertiesEntry + 18, // 5: api.GatewayListItem.created_at:type_name -> google.protobuf.Timestamp + 18, // 6: api.GatewayListItem.updated_at:type_name -> google.protobuf.Timestamp + 18, // 7: api.GatewayListItem.last_seen_at:type_name -> google.protobuf.Timestamp + 0, // 8: api.GatewayListItem.state:type_name -> api.GatewayState + 1, // 9: api.CreateGatewayRequest.gateway:type_name -> api.Gateway + 1, // 10: api.GetGatewayResponse.gateway:type_name -> api.Gateway + 18, // 11: api.GetGatewayResponse.created_at:type_name -> google.protobuf.Timestamp + 18, // 12: api.GetGatewayResponse.updated_at:type_name -> google.protobuf.Timestamp + 18, // 13: api.GetGatewayResponse.last_seen_at:type_name -> google.protobuf.Timestamp + 1, // 14: api.UpdateGatewayRequest.gateway:type_name -> api.Gateway + 2, // 15: api.ListGatewaysResponse.result:type_name -> api.GatewayListItem + 18, // 16: api.GenerateGatewayClientCertificateResponse.expires_at:type_name -> google.protobuf.Timestamp + 18, // 17: api.GetGatewayMetricsRequest.start:type_name -> google.protobuf.Timestamp + 18, // 18: api.GetGatewayMetricsRequest.end:type_name -> google.protobuf.Timestamp + 19, // 19: api.GetGatewayMetricsRequest.aggregation:type_name -> common.Aggregation + 20, // 20: api.GetGatewayMetricsResponse.rx_packets:type_name -> common.Metric + 20, // 21: api.GetGatewayMetricsResponse.tx_packets:type_name -> common.Metric + 20, // 22: api.GetGatewayMetricsResponse.tx_packets_per_freq:type_name -> common.Metric + 20, // 23: api.GetGatewayMetricsResponse.rx_packets_per_freq:type_name -> common.Metric + 20, // 24: api.GetGatewayMetricsResponse.tx_packets_per_dr:type_name -> common.Metric + 20, // 25: api.GetGatewayMetricsResponse.rx_packets_per_dr:type_name -> common.Metric + 20, // 26: api.GetGatewayMetricsResponse.tx_packets_per_status:type_name -> common.Metric + 3, // 27: api.GatewayService.Create:input_type -> api.CreateGatewayRequest + 4, // 28: api.GatewayService.Get:input_type -> api.GetGatewayRequest + 6, // 29: api.GatewayService.Update:input_type -> api.UpdateGatewayRequest + 7, // 30: api.GatewayService.Delete:input_type -> api.DeleteGatewayRequest + 8, // 31: api.GatewayService.List:input_type -> api.ListGatewaysRequest + 10, // 32: api.GatewayService.GenerateClientCertificate:input_type -> api.GenerateGatewayClientCertificateRequest + 12, // 33: api.GatewayService.GetMetrics:input_type -> api.GetGatewayMetricsRequest + 21, // 34: api.GatewayService.Create:output_type -> google.protobuf.Empty + 5, // 35: api.GatewayService.Get:output_type -> api.GetGatewayResponse + 21, // 36: api.GatewayService.Update:output_type -> google.protobuf.Empty + 21, // 37: api.GatewayService.Delete:output_type -> google.protobuf.Empty + 9, // 38: api.GatewayService.List:output_type -> api.ListGatewaysResponse + 11, // 39: api.GatewayService.GenerateClientCertificate:output_type -> api.GenerateGatewayClientCertificateResponse + 13, // 40: api.GatewayService.GetMetrics:output_type -> api.GetGatewayMetricsResponse + 34, // [34:41] is the sub-list for method output_type + 27, // [27:34] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_api_gateway_proto_init() } @@ -1423,13 +1508,14 @@ func file_api_gateway_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_gateway_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 16, NumExtensions: 0, NumServices: 1, }, GoTypes: file_api_gateway_proto_goTypes, DependencyIndexes: file_api_gateway_proto_depIdxs, + EnumInfos: file_api_gateway_proto_enumTypes, MessageInfos: file_api_gateway_proto_msgTypes, }.Build() File_api_gateway_proto = out.File diff --git a/api/go/api/internal.pb.go b/api/go/api/internal.pb.go index dceb19d6..7cce9358 100644 --- a/api/go/api/internal.pb.go +++ b/api/go/api/internal.pb.go @@ -1289,10 +1289,10 @@ type GetGatewaysSummaryResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Active count. - ActiveCount uint32 `protobuf:"varint,1,opt,name=active_count,json=activeCount,proto3" json:"active_count,omitempty"` - // Inactive count. - InactiveCount uint32 `protobuf:"varint,2,opt,name=inactive_count,json=inactiveCount,proto3" json:"inactive_count,omitempty"` + // Online count. + OnlineCount uint32 `protobuf:"varint,1,opt,name=online_count,json=onlineCount,proto3" json:"online_count,omitempty"` + // Offline count. + OfflineCount uint32 `protobuf:"varint,2,opt,name=offline_count,json=offlineCount,proto3" json:"offline_count,omitempty"` // Never seen count. NeverSeenCount uint32 `protobuf:"varint,3,opt,name=never_seen_count,json=neverSeenCount,proto3" json:"never_seen_count,omitempty"` } @@ -1329,16 +1329,16 @@ func (*GetGatewaysSummaryResponse) Descriptor() ([]byte, []int) { return file_api_internal_proto_rawDescGZIP(), []int{20} } -func (x *GetGatewaysSummaryResponse) GetActiveCount() uint32 { +func (x *GetGatewaysSummaryResponse) GetOnlineCount() uint32 { if x != nil { - return x.ActiveCount + return x.OnlineCount } return 0 } -func (x *GetGatewaysSummaryResponse) GetInactiveCount() uint32 { +func (x *GetGatewaysSummaryResponse) GetOfflineCount() uint32 { if x != nil { - return x.InactiveCount + return x.OfflineCount } return 0 } @@ -2092,162 +2092,162 @@ var file_api_internal_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x49, 0x64, 0x22, 0x8e, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, - 0x65, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x53, 0x65, 0x65, 0x6e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfc, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3b, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x47, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, - 0x64, 0x22, 0x34, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x22, 0x34, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x22, 0x44, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x6a, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x22, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0xb2, 0x03, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, - 0x0a, 0x0f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0e, 0x75, 0x70, 0x6c, - 0x69, 0x6e, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, - 0x78, 0x31, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, - 0x72, 0x78, 0x31, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x78, 0x31, 0x5f, - 0x64, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x72, 0x78, 0x31, 0x44, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, - 0x72, 0x78, 0x32, 0x5f, 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x78, - 0x32, 0x44, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x78, 0x32, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x78, 0x32, 0x46, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x64, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, - 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x44, 0x72, 0x12, 0x3c, 0x0a, 0x1b, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x66, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x46, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x66, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x72, 0x5f, 0x6d, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x72, 0x4d, 0x69, 0x6e, 0x12, 0x15, - 0x0a, 0x06, 0x64, 0x72, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, - 0x64, 0x72, 0x4d, 0x61, 0x78, 0x32, 0xb4, 0x08, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x07, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, - 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x65, 0x76, + 0x65, 0x72, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x53, 0x65, 0x65, 0x6e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xfc, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x3b, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x22, + 0x34, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, + 0x65, 0x76, 0x45, 0x75, 0x69, 0x22, 0x34, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x22, 0x44, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x6a, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x22, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0xb2, 0x03, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x0f, + 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e, + 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x78, 0x31, + 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x78, + 0x31, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x78, 0x31, 0x5f, 0x64, 0x72, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, + 0x78, 0x31, 0x44, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x78, + 0x32, 0x5f, 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x78, 0x32, 0x44, + 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x78, 0x32, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x78, 0x32, 0x46, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x64, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, + 0x53, 0x6c, 0x6f, 0x74, 0x44, 0x72, 0x12, 0x3c, 0x0a, 0x1b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x66, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x46, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x66, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x72, 0x5f, 0x6d, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x72, 0x4d, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, + 0x64, 0x72, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x72, + 0x4d, 0x61, 0x78, 0x32, 0xb4, 0x08, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x12, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x07, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x54, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x48, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, + 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x12, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x46, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, + 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0b, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x12, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, - 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x54, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1e, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x48, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x12, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x6f, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, - 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x54, 0x0a, 0x11, - 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, - 0x69, 0x42, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x61, - 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x54, 0x0a, 0x11, 0x69, 0x6f, + 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, + 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, + 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x69, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/grpc-web/api/gateway_pb.d.ts b/api/grpc-web/api/gateway_pb.d.ts index 86f05771..e8f2f834 100644 --- a/api/grpc-web/api/gateway_pb.d.ts +++ b/api/grpc-web/api/gateway_pb.d.ts @@ -30,6 +30,9 @@ export class Gateway extends jspb.Message { getMetadataMap(): jspb.Map; clearMetadataMap(): Gateway; + getStatsInterval(): number; + setStatsInterval(value: number): Gateway; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Gateway.AsObject; static toObject(includeInstance: boolean, msg: Gateway): Gateway.AsObject; @@ -47,6 +50,7 @@ export namespace Gateway { tenantId: string, tagsMap: Array<[string, string]>, metadataMap: Array<[string, string]>, + statsInterval: number, } } @@ -86,6 +90,9 @@ export class GatewayListItem extends jspb.Message { hasLastSeenAt(): boolean; clearLastSeenAt(): GatewayListItem; + getState(): GatewayState; + setState(value: GatewayState): GatewayListItem; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GatewayListItem.AsObject; static toObject(includeInstance: boolean, msg: GatewayListItem): GatewayListItem.AsObject; @@ -105,6 +112,7 @@ export namespace GatewayListItem { createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, lastSeenAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + state: GatewayState, } } @@ -416,3 +424,8 @@ export namespace GetGatewayMetricsResponse { } } +export enum GatewayState { + NEVER_SEEN = 0, + ONLINE = 1, + OFFLINE = 2, +} diff --git a/api/grpc-web/api/gateway_pb.js b/api/grpc-web/api/gateway_pb.js index eefc0a3f..0e05f47d 100644 --- a/api/grpc-web/api/gateway_pb.js +++ b/api/grpc-web/api/gateway_pb.js @@ -24,6 +24,7 @@ goog.exportSymbol('proto.api.CreateGatewayRequest', null, global); goog.exportSymbol('proto.api.DeleteGatewayRequest', null, global); goog.exportSymbol('proto.api.Gateway', null, global); goog.exportSymbol('proto.api.GatewayListItem', null, global); +goog.exportSymbol('proto.api.GatewayState', null, global); goog.exportSymbol('proto.api.GenerateGatewayClientCertificateRequest', null, global); goog.exportSymbol('proto.api.GenerateGatewayClientCertificateResponse', null, global); goog.exportSymbol('proto.api.GetGatewayMetricsRequest', null, global); @@ -344,7 +345,8 @@ proto.api.Gateway.toObject = function(includeInstance, msg) { location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f), tenantId: jspb.Message.getFieldWithDefault(msg, 5, ""), tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], - metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + statsInterval: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -414,6 +416,10 @@ proto.api.Gateway.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStatsInterval(value); + break; default: reader.skipField(); break; @@ -487,6 +493,13 @@ proto.api.Gateway.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } + f = message.getStatsInterval(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } }; @@ -643,6 +656,24 @@ proto.api.Gateway.prototype.clearMetadataMap = function() { return this;}; +/** + * optional uint32 stats_interval = 8; + * @return {number} + */ +proto.api.Gateway.prototype.getStatsInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.api.Gateway} returns this + */ +proto.api.Gateway.prototype.setStatsInterval = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + @@ -683,7 +714,8 @@ proto.api.GatewayListItem.toObject = function(includeInstance, msg) { propertiesMap: (f = msg.getPropertiesMap()) ? f.toObject(includeInstance, undefined) : [], createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastSeenAt: (f = msg.getLastSeenAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + lastSeenAt: (f = msg.getLastSeenAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + state: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -762,6 +794,10 @@ proto.api.GatewayListItem.deserializeBinaryFromReader = function(msg, reader) { reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastSeenAt(value); break; + case 10: + var value = /** @type {!proto.api.GatewayState} */ (reader.readEnum()); + msg.setState(value); + break; default: reader.skipField(); break; @@ -855,6 +891,13 @@ proto.api.GatewayListItem.serializeBinaryToWriter = function(message, writer) { google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } }; @@ -1100,6 +1143,24 @@ proto.api.GatewayListItem.prototype.hasLastSeenAt = function() { }; +/** + * optional GatewayState state = 10; + * @return {!proto.api.GatewayState} + */ +proto.api.GatewayListItem.prototype.getState = function() { + return /** @type {!proto.api.GatewayState} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.api.GatewayState} value + * @return {!proto.api.GatewayListItem} returns this + */ +proto.api.GatewayListItem.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + @@ -3466,4 +3527,13 @@ proto.api.GetGatewayMetricsResponse.prototype.hasTxPacketsPerStatus = function() }; +/** + * @enum {number} + */ +proto.api.GatewayState = { + NEVER_SEEN: 0, + ONLINE: 1, + OFFLINE: 2 +}; + goog.object.extend(exports, proto.api); diff --git a/api/grpc-web/api/internal_pb.d.ts b/api/grpc-web/api/internal_pb.d.ts index 667b798d..0fee8621 100644 --- a/api/grpc-web/api/internal_pb.d.ts +++ b/api/grpc-web/api/internal_pb.d.ts @@ -515,11 +515,11 @@ export namespace GetGatewaysSummaryRequest { } export class GetGatewaysSummaryResponse extends jspb.Message { - getActiveCount(): number; - setActiveCount(value: number): GetGatewaysSummaryResponse; + getOnlineCount(): number; + setOnlineCount(value: number): GetGatewaysSummaryResponse; - getInactiveCount(): number; - setInactiveCount(value: number): GetGatewaysSummaryResponse; + getOfflineCount(): number; + setOfflineCount(value: number): GetGatewaysSummaryResponse; getNeverSeenCount(): number; setNeverSeenCount(value: number): GetGatewaysSummaryResponse; @@ -534,8 +534,8 @@ export class GetGatewaysSummaryResponse extends jspb.Message { export namespace GetGatewaysSummaryResponse { export type AsObject = { - activeCount: number, - inactiveCount: number, + onlineCount: number, + offlineCount: number, neverSeenCount: number, } } diff --git a/api/grpc-web/api/internal_pb.js b/api/grpc-web/api/internal_pb.js index 19b5b135..471aa30f 100644 --- a/api/grpc-web/api/internal_pb.js +++ b/api/grpc-web/api/internal_pb.js @@ -4500,8 +4500,8 @@ proto.api.GetGatewaysSummaryResponse.prototype.toObject = function(opt_includeIn */ proto.api.GetGatewaysSummaryResponse.toObject = function(includeInstance, msg) { var f, obj = { - activeCount: jspb.Message.getFieldWithDefault(msg, 1, 0), - inactiveCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + onlineCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + offlineCount: jspb.Message.getFieldWithDefault(msg, 2, 0), neverSeenCount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -4541,11 +4541,11 @@ proto.api.GetGatewaysSummaryResponse.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setActiveCount(value); + msg.setOnlineCount(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setInactiveCount(value); + msg.setOfflineCount(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); @@ -4580,14 +4580,14 @@ proto.api.GetGatewaysSummaryResponse.prototype.serializeBinary = function() { */ proto.api.GetGatewaysSummaryResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActiveCount(); + f = message.getOnlineCount(); if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getInactiveCount(); + f = message.getOfflineCount(); if (f !== 0) { writer.writeUint32( 2, @@ -4605,10 +4605,10 @@ proto.api.GetGatewaysSummaryResponse.serializeBinaryToWriter = function(message, /** - * optional uint32 active_count = 1; + * optional uint32 online_count = 1; * @return {number} */ -proto.api.GetGatewaysSummaryResponse.prototype.getActiveCount = function() { +proto.api.GetGatewaysSummaryResponse.prototype.getOnlineCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; @@ -4617,16 +4617,16 @@ proto.api.GetGatewaysSummaryResponse.prototype.getActiveCount = function() { * @param {number} value * @return {!proto.api.GetGatewaysSummaryResponse} returns this */ -proto.api.GetGatewaysSummaryResponse.prototype.setActiveCount = function(value) { +proto.api.GetGatewaysSummaryResponse.prototype.setOnlineCount = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 inactive_count = 2; + * optional uint32 offline_count = 2; * @return {number} */ -proto.api.GetGatewaysSummaryResponse.prototype.getInactiveCount = function() { +proto.api.GetGatewaysSummaryResponse.prototype.getOfflineCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; @@ -4635,7 +4635,7 @@ proto.api.GetGatewaysSummaryResponse.prototype.getInactiveCount = function() { * @param {number} value * @return {!proto.api.GetGatewaysSummaryResponse} returns this */ -proto.api.GetGatewaysSummaryResponse.prototype.setInactiveCount = function(value) { +proto.api.GetGatewaysSummaryResponse.prototype.setOfflineCount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/api/js/api/gateway_pb.d.ts b/api/js/api/gateway_pb.d.ts index 0643de5f..d59f442c 100644 --- a/api/js/api/gateway_pb.d.ts +++ b/api/js/api/gateway_pb.d.ts @@ -29,6 +29,9 @@ export class Gateway extends jspb.Message { clearTagsMap(): void; getMetadataMap(): jspb.Map; clearMetadataMap(): void; + getStatsInterval(): number; + setStatsInterval(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Gateway.AsObject; static toObject(includeInstance: boolean, msg: Gateway): Gateway.AsObject; @@ -48,6 +51,7 @@ export namespace Gateway { tenantId: string, tagsMap: Array<[string, string]>, metadataMap: Array<[string, string]>, + statsInterval: number, } } @@ -86,6 +90,9 @@ export class GatewayListItem extends jspb.Message { getLastSeenAt(): google_protobuf_timestamp_pb.Timestamp | undefined; setLastSeenAt(value?: google_protobuf_timestamp_pb.Timestamp): void; + getState(): GatewayStateMap[keyof GatewayStateMap]; + setState(value: GatewayStateMap[keyof GatewayStateMap]): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GatewayListItem.AsObject; static toObject(includeInstance: boolean, msg: GatewayListItem): GatewayListItem.AsObject; @@ -107,6 +114,7 @@ export namespace GatewayListItem { createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, lastSeenAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + state: GatewayStateMap[keyof GatewayStateMap], } } @@ -440,3 +448,11 @@ export namespace GetGatewayMetricsResponse { } } +export interface GatewayStateMap { + NEVER_SEEN: 0; + ONLINE: 1; + OFFLINE: 2; +} + +export const GatewayState: GatewayStateMap; + diff --git a/api/js/api/gateway_pb.js b/api/js/api/gateway_pb.js index eefc0a3f..0e05f47d 100644 --- a/api/js/api/gateway_pb.js +++ b/api/js/api/gateway_pb.js @@ -24,6 +24,7 @@ goog.exportSymbol('proto.api.CreateGatewayRequest', null, global); goog.exportSymbol('proto.api.DeleteGatewayRequest', null, global); goog.exportSymbol('proto.api.Gateway', null, global); goog.exportSymbol('proto.api.GatewayListItem', null, global); +goog.exportSymbol('proto.api.GatewayState', null, global); goog.exportSymbol('proto.api.GenerateGatewayClientCertificateRequest', null, global); goog.exportSymbol('proto.api.GenerateGatewayClientCertificateResponse', null, global); goog.exportSymbol('proto.api.GetGatewayMetricsRequest', null, global); @@ -344,7 +345,8 @@ proto.api.Gateway.toObject = function(includeInstance, msg) { location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f), tenantId: jspb.Message.getFieldWithDefault(msg, 5, ""), tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], - metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + statsInterval: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -414,6 +416,10 @@ proto.api.Gateway.deserializeBinaryFromReader = function(msg, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStatsInterval(value); + break; default: reader.skipField(); break; @@ -487,6 +493,13 @@ proto.api.Gateway.serializeBinaryToWriter = function(message, writer) { if (f && f.getLength() > 0) { f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } + f = message.getStatsInterval(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } }; @@ -643,6 +656,24 @@ proto.api.Gateway.prototype.clearMetadataMap = function() { return this;}; +/** + * optional uint32 stats_interval = 8; + * @return {number} + */ +proto.api.Gateway.prototype.getStatsInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.api.Gateway} returns this + */ +proto.api.Gateway.prototype.setStatsInterval = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + @@ -683,7 +714,8 @@ proto.api.GatewayListItem.toObject = function(includeInstance, msg) { propertiesMap: (f = msg.getPropertiesMap()) ? f.toObject(includeInstance, undefined) : [], createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - lastSeenAt: (f = msg.getLastSeenAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + lastSeenAt: (f = msg.getLastSeenAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + state: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -762,6 +794,10 @@ proto.api.GatewayListItem.deserializeBinaryFromReader = function(msg, reader) { reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastSeenAt(value); break; + case 10: + var value = /** @type {!proto.api.GatewayState} */ (reader.readEnum()); + msg.setState(value); + break; default: reader.skipField(); break; @@ -855,6 +891,13 @@ proto.api.GatewayListItem.serializeBinaryToWriter = function(message, writer) { google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } }; @@ -1100,6 +1143,24 @@ proto.api.GatewayListItem.prototype.hasLastSeenAt = function() { }; +/** + * optional GatewayState state = 10; + * @return {!proto.api.GatewayState} + */ +proto.api.GatewayListItem.prototype.getState = function() { + return /** @type {!proto.api.GatewayState} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {!proto.api.GatewayState} value + * @return {!proto.api.GatewayListItem} returns this + */ +proto.api.GatewayListItem.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 10, value); +}; + + @@ -3466,4 +3527,13 @@ proto.api.GetGatewayMetricsResponse.prototype.hasTxPacketsPerStatus = function() }; +/** + * @enum {number} + */ +proto.api.GatewayState = { + NEVER_SEEN: 0, + ONLINE: 1, + OFFLINE: 2 +}; + goog.object.extend(exports, proto.api); diff --git a/api/js/api/internal_pb.d.ts b/api/js/api/internal_pb.d.ts index 27866f8d..9a82f6ff 100644 --- a/api/js/api/internal_pb.d.ts +++ b/api/js/api/internal_pb.d.ts @@ -555,11 +555,11 @@ export namespace GetGatewaysSummaryRequest { } export class GetGatewaysSummaryResponse extends jspb.Message { - getActiveCount(): number; - setActiveCount(value: number): void; + getOnlineCount(): number; + setOnlineCount(value: number): void; - getInactiveCount(): number; - setInactiveCount(value: number): void; + getOfflineCount(): number; + setOfflineCount(value: number): void; getNeverSeenCount(): number; setNeverSeenCount(value: number): void; @@ -576,8 +576,8 @@ export class GetGatewaysSummaryResponse extends jspb.Message { export namespace GetGatewaysSummaryResponse { export type AsObject = { - activeCount: number, - inactiveCount: number, + onlineCount: number, + offlineCount: number, neverSeenCount: number, } } diff --git a/api/js/api/internal_pb.js b/api/js/api/internal_pb.js index 19b5b135..471aa30f 100644 --- a/api/js/api/internal_pb.js +++ b/api/js/api/internal_pb.js @@ -4500,8 +4500,8 @@ proto.api.GetGatewaysSummaryResponse.prototype.toObject = function(opt_includeIn */ proto.api.GetGatewaysSummaryResponse.toObject = function(includeInstance, msg) { var f, obj = { - activeCount: jspb.Message.getFieldWithDefault(msg, 1, 0), - inactiveCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + onlineCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + offlineCount: jspb.Message.getFieldWithDefault(msg, 2, 0), neverSeenCount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; @@ -4541,11 +4541,11 @@ proto.api.GetGatewaysSummaryResponse.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setActiveCount(value); + msg.setOnlineCount(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setInactiveCount(value); + msg.setOfflineCount(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); @@ -4580,14 +4580,14 @@ proto.api.GetGatewaysSummaryResponse.prototype.serializeBinary = function() { */ proto.api.GetGatewaysSummaryResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActiveCount(); + f = message.getOnlineCount(); if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getInactiveCount(); + f = message.getOfflineCount(); if (f !== 0) { writer.writeUint32( 2, @@ -4605,10 +4605,10 @@ proto.api.GetGatewaysSummaryResponse.serializeBinaryToWriter = function(message, /** - * optional uint32 active_count = 1; + * optional uint32 online_count = 1; * @return {number} */ -proto.api.GetGatewaysSummaryResponse.prototype.getActiveCount = function() { +proto.api.GetGatewaysSummaryResponse.prototype.getOnlineCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; @@ -4617,16 +4617,16 @@ proto.api.GetGatewaysSummaryResponse.prototype.getActiveCount = function() { * @param {number} value * @return {!proto.api.GetGatewaysSummaryResponse} returns this */ -proto.api.GetGatewaysSummaryResponse.prototype.setActiveCount = function(value) { +proto.api.GetGatewaysSummaryResponse.prototype.setOnlineCount = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 inactive_count = 2; + * optional uint32 offline_count = 2; * @return {number} */ -proto.api.GetGatewaysSummaryResponse.prototype.getInactiveCount = function() { +proto.api.GetGatewaysSummaryResponse.prototype.getOfflineCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; @@ -4635,7 +4635,7 @@ proto.api.GetGatewaysSummaryResponse.prototype.getInactiveCount = function() { * @param {number} value * @return {!proto.api.GetGatewaysSummaryResponse} returns this */ -proto.api.GetGatewaysSummaryResponse.prototype.setInactiveCount = function(value) { +proto.api.GetGatewaysSummaryResponse.prototype.setOfflineCount = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; diff --git a/api/md/api/api.md b/api/md/api/api.md index 0d0f92c4..25e5cbf9 100644 --- a/api/md/api/api.md +++ b/api/md/api/api.md @@ -176,6 +176,8 @@ - [ListGatewaysResponse](#api-ListGatewaysResponse) - [UpdateGatewayRequest](#api-UpdateGatewayRequest) + - [GatewayState](#api-GatewayState) + - [GatewayService](#api-GatewayService) - [api/multicast_group.proto](#api_multicast_group-proto) @@ -2381,7 +2383,7 @@ DeviceService is the service providing API methods for managing devices. | payload_codec_runtime | [CodecRuntime](#api-CodecRuntime) | | Payload codec runtime. | | payload_codec_script | [string](#string) | | Payload codec script. | | flush_queue_on_activate | [bool](#bool) | | Flush queue on device activation. | -| uplink_interval | [uint32](#uint32) | | Uplink interval (seconds). This defines the expected uplink interval which the device uses for communication. When the uplink interval has expired and no uplink has been received, the device is considered inactive. | +| uplink_interval | [uint32](#uint32) | | Uplink interval (seconds). This defines the expected uplink interval which the device uses for communication. If the uplink interval has expired and no uplink has been received, the device is considered inactive. | | device_status_req_interval | [uint32](#uint32) | | Device-status request interval (times / day). This defines the times per day that ChirpStack will request the device-status from the device. | | supports_otaa | [bool](#bool) | | Supports OTAA. | | supports_class_b | [bool](#bool) | | Supports Class B. | @@ -2739,6 +2741,7 @@ DeviceProfileService is the service providing API methods for managing device-pr | tenant_id | [string](#string) | | Tenant ID (UUID). | | tags | [Gateway.TagsEntry](#api-Gateway-TagsEntry) | repeated | Tags. | | metadata | [Gateway.MetadataEntry](#api-Gateway-MetadataEntry) | repeated | Metadata (provided by the gateway). | +| stats_interval | [uint32](#uint32) | | Stats interval (seconds). This defines the expected interval in which the gateway sends its statistics. | @@ -2794,6 +2797,7 @@ DeviceProfileService is the service providing API methods for managing device-pr | created_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Created at timestamp. | | updated_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Last update timestamp. | | last_seen_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Last seen at timestamp. | +| state | [GatewayState](#api-GatewayState) | | Gateway state. Please note that the state of the gateway is driven by the stats packages that are sent by the gateway. | @@ -2971,6 +2975,19 @@ DeviceProfileService is the service providing API methods for managing device-pr + + + +### GatewayState + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NEVER_SEEN | 0 | The gateway has never sent any stats. | +| ONLINE | 1 | Online. | +| OFFLINE | 2 | Offline. | + + diff --git a/api/proto/api/device_profile.proto b/api/proto/api/device_profile.proto index 13d6b564..047eea3f 100644 --- a/api/proto/api/device_profile.proto +++ b/api/proto/api/device_profile.proto @@ -124,7 +124,7 @@ message DeviceProfile { // Uplink interval (seconds). // This defines the expected uplink interval which the device uses for - // communication. When the uplink interval has expired and no uplink has + // communication. If the uplink interval has expired and no uplink has // been received, the device is considered inactive. uint32 uplink_interval = 11; diff --git a/api/proto/api/gateway.proto b/api/proto/api/gateway.proto index e732fa47..f26906e6 100644 --- a/api/proto/api/gateway.proto +++ b/api/proto/api/gateway.proto @@ -66,6 +66,17 @@ service GatewayService { } } +enum GatewayState { + // The gateway has never sent any stats. + NEVER_SEEN = 0; + + // Online. + ONLINE = 1; + + // Offline. + OFFLINE = 2; +} + message Gateway { // Gateway ID (EUI64). string gateway_id = 1; @@ -87,6 +98,11 @@ message Gateway { // Metadata (provided by the gateway). map metadata = 7; + + // Stats interval (seconds). + // This defines the expected interval in which the gateway sends its + // statistics. + uint32 stats_interval = 8; } message GatewayListItem { @@ -116,6 +132,11 @@ message GatewayListItem { // Last seen at timestamp. google.protobuf.Timestamp last_seen_at = 9; + + // Gateway state. + // Please note that the state of the gateway is driven by the stats + // packages that are sent by the gateway. + GatewayState state = 10; } message CreateGatewayRequest { diff --git a/api/proto/api/internal.proto b/api/proto/api/internal.proto index b167b262..07f5a1d7 100644 --- a/api/proto/api/internal.proto +++ b/api/proto/api/internal.proto @@ -264,11 +264,11 @@ message GetGatewaysSummaryRequest { } message GetGatewaysSummaryResponse { - // Active count. - uint32 active_count = 1; + // Online count. + uint32 online_count = 1; - // Inactive count. - uint32 inactive_count = 2; + // Offline count. + uint32 offline_count = 2; // Never seen count. uint32 never_seen_count = 3; diff --git a/api/python/proto/chirpstack-api/api/device_profile.proto b/api/python/proto/chirpstack-api/api/device_profile.proto index 042f5efb..1e07bb02 100644 --- a/api/python/proto/chirpstack-api/api/device_profile.proto +++ b/api/python/proto/chirpstack-api/api/device_profile.proto @@ -124,7 +124,7 @@ message DeviceProfile { // Uplink interval (seconds). // This defines the expected uplink interval which the device uses for - // communication. When the uplink interval has expired and no uplink has + // communication. If the uplink interval has expired and no uplink has // been received, the device is considered inactive. uint32 uplink_interval = 11; diff --git a/api/python/proto/chirpstack-api/api/gateway.proto b/api/python/proto/chirpstack-api/api/gateway.proto index 86c6f482..26b90860 100644 --- a/api/python/proto/chirpstack-api/api/gateway.proto +++ b/api/python/proto/chirpstack-api/api/gateway.proto @@ -66,6 +66,17 @@ service GatewayService { } } +enum GatewayState { + // The gateway has never sent any stats. + NEVER_SEEN = 0; + + // Online. + ONLINE = 1; + + // Offline. + OFFLINE = 2; +} + message Gateway { // Gateway ID (EUI64). string gateway_id = 1; @@ -87,6 +98,11 @@ message Gateway { // Metadata (provided by the gateway). map metadata = 7; + + // Stats interval (seconds). + // This defines the expected interval in which the gateway sends its + // statistics. + uint32 stats_interval = 8; } message GatewayListItem { @@ -116,6 +132,11 @@ message GatewayListItem { // Last seen at timestamp. google.protobuf.Timestamp last_seen_at = 9; + + // Gateway state. + // Please note that the state of the gateway is driven by the stats + // packages that are sent by the gateway. + GatewayState state = 10; } message CreateGatewayRequest { diff --git a/api/python/proto/chirpstack-api/api/internal.proto b/api/python/proto/chirpstack-api/api/internal.proto index 7e9cb3f2..27cd2116 100644 --- a/api/python/proto/chirpstack-api/api/internal.proto +++ b/api/python/proto/chirpstack-api/api/internal.proto @@ -264,11 +264,11 @@ message GetGatewaysSummaryRequest { } message GetGatewaysSummaryResponse { - // Active count. - uint32 active_count = 1; + // Online count. + uint32 online_count = 1; - // Inactive count. - uint32 inactive_count = 2; + // Offline count. + uint32 offline_count = 2; // Never seen count. uint32 never_seen_count = 3; diff --git a/api/python/src/chirpstack_api/api/gateway_pb2.py b/api/python/src/chirpstack_api/api/gateway_pb2.py index 96f8a351..bb27df2e 100644 --- a/api/python/src/chirpstack_api/api/gateway_pb2.py +++ b/api/python/src/chirpstack_api/api/gateway_pb2.py @@ -17,7 +17,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n chirpstack-api/api/gateway.proto\x12\x03\x61pi\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\"chirpstack-api/common/common.proto\"\xa9\x02\n\x07Gateway\x12\x12\n\ngateway_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\"\n\x08location\x18\x04 \x01(\x0b\x32\x10.common.Location\x12\x11\n\ttenant_id\x18\x05 \x01(\t\x12$\n\x04tags\x18\x06 \x03(\x0b\x32\x16.api.Gateway.TagsEntry\x12,\n\x08metadata\x18\x07 \x03(\x0b\x32\x1a.api.Gateway.MetadataEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xfe\x02\n\x0fGatewayListItem\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x12\n\ngateway_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\"\n\x08location\x18\x05 \x01(\x0b\x32\x10.common.Location\x12\x38\n\nproperties\x18\x06 \x03(\x0b\x32$.api.GatewayListItem.PropertiesEntry\x12.\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0clast_seen_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x14\x43reateGatewayRequest\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\"\'\n\x11GetGatewayRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"\xc5\x01\n\x12GetGatewayResponse\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0clast_seen_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"5\n\x14UpdateGatewayRequest\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\"*\n\x14\x44\x65leteGatewayRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"W\n\x13ListGatewaysRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x0e\n\x06search\x18\x03 \x01(\t\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"Q\n\x14ListGatewaysResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12$\n\x06result\x18\x02 \x03(\x0b\x32\x14.api.GatewayListItem\"=\n\'GenerateGatewayClientCertificateRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"\x8e\x01\n(GenerateGatewayClientCertificateResponse\x12\x10\n\x08tls_cert\x18\x01 \x01(\t\x12\x0f\n\x07tls_key\x18\x02 \x01(\t\x12\x0f\n\x07\x63\x61_cert\x18\x03 \x01(\t\x12.\n\nexpires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xac\x01\n\x18GetGatewayMetricsRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\x12)\n\x05start\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0b\x61ggregation\x18\x04 \x01(\x0e\x32\x13.common.Aggregation\"\xc2\x02\n\x19GetGatewayMetricsResponse\x12\"\n\nrx_packets\x18\x01 \x01(\x0b\x32\x0e.common.Metric\x12\"\n\ntx_packets\x18\x02 \x01(\x0b\x32\x0e.common.Metric\x12+\n\x13tx_packets_per_freq\x18\x03 \x01(\x0b\x32\x0e.common.Metric\x12+\n\x13rx_packets_per_freq\x18\x04 \x01(\x0b\x32\x0e.common.Metric\x12)\n\x11tx_packets_per_dr\x18\x05 \x01(\x0b\x32\x0e.common.Metric\x12)\n\x11rx_packets_per_dr\x18\x06 \x01(\x0b\x32\x0e.common.Metric\x12-\n\x15tx_packets_per_status\x18\x07 \x01(\x0b\x32\x0e.common.Metric2\x91\x06\n\x0eGatewayService\x12U\n\x06\x43reate\x12\x19.api.CreateGatewayRequest\x1a\x16.google.protobuf.Empty\"\x18\x82\xd3\xe4\x93\x02\x12\"\r/api/gateways:\x01*\x12Z\n\x03Get\x12\x16.api.GetGatewayRequest\x1a\x17.api.GetGatewayResponse\"\"\x82\xd3\xe4\x93\x02\x1c\x12\x1a/api/gateways/{gateway_id}\x12j\n\x06Update\x12\x19.api.UpdateGatewayRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02\'\x1a\"/api/gateways/{gateway.gateway_id}:\x01*\x12_\n\x06\x44\x65lete\x12\x19.api.DeleteGatewayRequest\x1a\x16.google.protobuf.Empty\"\"\x82\xd3\xe4\x93\x02\x1c*\x1a/api/gateways/{gateway_id}\x12R\n\x04List\x12\x18.api.ListGatewaysRequest\x1a\x19.api.ListGatewaysResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/api/gateways\x12\xb1\x01\n\x19GenerateClientCertificate\x12,.api.GenerateGatewayClientCertificateRequest\x1a-.api.GenerateGatewayClientCertificateResponse\"7\x82\xd3\xe4\x93\x02\x31\"//api/gateways/{gateway_id}/generate-certificate\x12w\n\nGetMetrics\x12\x1d.api.GetGatewayMetricsRequest\x1a\x1e.api.GetGatewayMetricsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/api/gateways/{gateway_id}/metricsBS\n\x11io.chirpstack.apiB\x0cGatewayProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/apib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n chirpstack-api/api/gateway.proto\x12\x03\x61pi\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\"chirpstack-api/common/common.proto\"\xc1\x02\n\x07Gateway\x12\x12\n\ngateway_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\"\n\x08location\x18\x04 \x01(\x0b\x32\x10.common.Location\x12\x11\n\ttenant_id\x18\x05 \x01(\t\x12$\n\x04tags\x18\x06 \x03(\x0b\x32\x16.api.Gateway.TagsEntry\x12,\n\x08metadata\x18\x07 \x03(\x0b\x32\x1a.api.Gateway.MetadataEntry\x12\x16\n\x0estats_interval\x18\x08 \x01(\r\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa0\x03\n\x0fGatewayListItem\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x12\n\ngateway_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\"\n\x08location\x18\x05 \x01(\x0b\x32\x10.common.Location\x12\x38\n\nproperties\x18\x06 \x03(\x0b\x32$.api.GatewayListItem.PropertiesEntry\x12.\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0clast_seen_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12 \n\x05state\x18\n \x01(\x0e\x32\x11.api.GatewayState\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x14\x43reateGatewayRequest\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\"\'\n\x11GetGatewayRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"\xc5\x01\n\x12GetGatewayResponse\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0clast_seen_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"5\n\x14UpdateGatewayRequest\x12\x1d\n\x07gateway\x18\x01 \x01(\x0b\x32\x0c.api.Gateway\"*\n\x14\x44\x65leteGatewayRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"W\n\x13ListGatewaysRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x0e\n\x06search\x18\x03 \x01(\t\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"Q\n\x14ListGatewaysResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12$\n\x06result\x18\x02 \x03(\x0b\x32\x14.api.GatewayListItem\"=\n\'GenerateGatewayClientCertificateRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\"\x8e\x01\n(GenerateGatewayClientCertificateResponse\x12\x10\n\x08tls_cert\x18\x01 \x01(\t\x12\x0f\n\x07tls_key\x18\x02 \x01(\t\x12\x0f\n\x07\x63\x61_cert\x18\x03 \x01(\t\x12.\n\nexpires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xac\x01\n\x18GetGatewayMetricsRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\x12)\n\x05start\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0b\x61ggregation\x18\x04 \x01(\x0e\x32\x13.common.Aggregation\"\xc2\x02\n\x19GetGatewayMetricsResponse\x12\"\n\nrx_packets\x18\x01 \x01(\x0b\x32\x0e.common.Metric\x12\"\n\ntx_packets\x18\x02 \x01(\x0b\x32\x0e.common.Metric\x12+\n\x13tx_packets_per_freq\x18\x03 \x01(\x0b\x32\x0e.common.Metric\x12+\n\x13rx_packets_per_freq\x18\x04 \x01(\x0b\x32\x0e.common.Metric\x12)\n\x11tx_packets_per_dr\x18\x05 \x01(\x0b\x32\x0e.common.Metric\x12)\n\x11rx_packets_per_dr\x18\x06 \x01(\x0b\x32\x0e.common.Metric\x12-\n\x15tx_packets_per_status\x18\x07 \x01(\x0b\x32\x0e.common.Metric*7\n\x0cGatewayState\x12\x0e\n\nNEVER_SEEN\x10\x00\x12\n\n\x06ONLINE\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x32\x91\x06\n\x0eGatewayService\x12U\n\x06\x43reate\x12\x19.api.CreateGatewayRequest\x1a\x16.google.protobuf.Empty\"\x18\x82\xd3\xe4\x93\x02\x12\"\r/api/gateways:\x01*\x12Z\n\x03Get\x12\x16.api.GetGatewayRequest\x1a\x17.api.GetGatewayResponse\"\"\x82\xd3\xe4\x93\x02\x1c\x12\x1a/api/gateways/{gateway_id}\x12j\n\x06Update\x12\x19.api.UpdateGatewayRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02\'\x1a\"/api/gateways/{gateway.gateway_id}:\x01*\x12_\n\x06\x44\x65lete\x12\x19.api.DeleteGatewayRequest\x1a\x16.google.protobuf.Empty\"\"\x82\xd3\xe4\x93\x02\x1c*\x1a/api/gateways/{gateway_id}\x12R\n\x04List\x12\x18.api.ListGatewaysRequest\x1a\x19.api.ListGatewaysResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/api/gateways\x12\xb1\x01\n\x19GenerateClientCertificate\x12,.api.GenerateGatewayClientCertificateRequest\x1a-.api.GenerateGatewayClientCertificateResponse\"7\x82\xd3\xe4\x93\x02\x31\"//api/gateways/{gateway_id}/generate-certificate\x12w\n\nGetMetrics\x12\x1d.api.GetGatewayMetricsRequest\x1a\x1e.api.GetGatewayMetricsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/api/gateways/{gateway_id}/metricsBS\n\x11io.chirpstack.apiB\x0cGatewayProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/apib\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.api.gateway_pb2', globals()) @@ -45,38 +45,40 @@ if _descriptor._USE_C_DESCRIPTORS == False: _GATEWAYSERVICE.methods_by_name['GenerateClientCertificate']._serialized_options = b'\202\323\344\223\0021\"//api/gateways/{gateway_id}/generate-certificate' _GATEWAYSERVICE.methods_by_name['GetMetrics']._options = None _GATEWAYSERVICE.methods_by_name['GetMetrics']._serialized_options = b'\202\323\344\223\002$\022\"/api/gateways/{gateway_id}/metrics' + _GATEWAYSTATE._serialized_start=2187 + _GATEWAYSTATE._serialized_end=2242 _GATEWAY._serialized_start=170 - _GATEWAY._serialized_end=467 - _GATEWAY_TAGSENTRY._serialized_start=375 - _GATEWAY_TAGSENTRY._serialized_end=418 - _GATEWAY_METADATAENTRY._serialized_start=420 - _GATEWAY_METADATAENTRY._serialized_end=467 - _GATEWAYLISTITEM._serialized_start=470 - _GATEWAYLISTITEM._serialized_end=852 - _GATEWAYLISTITEM_PROPERTIESENTRY._serialized_start=803 - _GATEWAYLISTITEM_PROPERTIESENTRY._serialized_end=852 - _CREATEGATEWAYREQUEST._serialized_start=854 - _CREATEGATEWAYREQUEST._serialized_end=907 - _GETGATEWAYREQUEST._serialized_start=909 - _GETGATEWAYREQUEST._serialized_end=948 - _GETGATEWAYRESPONSE._serialized_start=951 - _GETGATEWAYRESPONSE._serialized_end=1148 - _UPDATEGATEWAYREQUEST._serialized_start=1150 - _UPDATEGATEWAYREQUEST._serialized_end=1203 - _DELETEGATEWAYREQUEST._serialized_start=1205 - _DELETEGATEWAYREQUEST._serialized_end=1247 - _LISTGATEWAYSREQUEST._serialized_start=1249 - _LISTGATEWAYSREQUEST._serialized_end=1336 - _LISTGATEWAYSRESPONSE._serialized_start=1338 - _LISTGATEWAYSRESPONSE._serialized_end=1419 - _GENERATEGATEWAYCLIENTCERTIFICATEREQUEST._serialized_start=1421 - _GENERATEGATEWAYCLIENTCERTIFICATEREQUEST._serialized_end=1482 - _GENERATEGATEWAYCLIENTCERTIFICATERESPONSE._serialized_start=1485 - _GENERATEGATEWAYCLIENTCERTIFICATERESPONSE._serialized_end=1627 - _GETGATEWAYMETRICSREQUEST._serialized_start=1630 - _GETGATEWAYMETRICSREQUEST._serialized_end=1802 - _GETGATEWAYMETRICSRESPONSE._serialized_start=1805 - _GETGATEWAYMETRICSRESPONSE._serialized_end=2127 - _GATEWAYSERVICE._serialized_start=2130 - _GATEWAYSERVICE._serialized_end=2915 + _GATEWAY._serialized_end=491 + _GATEWAY_TAGSENTRY._serialized_start=399 + _GATEWAY_TAGSENTRY._serialized_end=442 + _GATEWAY_METADATAENTRY._serialized_start=444 + _GATEWAY_METADATAENTRY._serialized_end=491 + _GATEWAYLISTITEM._serialized_start=494 + _GATEWAYLISTITEM._serialized_end=910 + _GATEWAYLISTITEM_PROPERTIESENTRY._serialized_start=861 + _GATEWAYLISTITEM_PROPERTIESENTRY._serialized_end=910 + _CREATEGATEWAYREQUEST._serialized_start=912 + _CREATEGATEWAYREQUEST._serialized_end=965 + _GETGATEWAYREQUEST._serialized_start=967 + _GETGATEWAYREQUEST._serialized_end=1006 + _GETGATEWAYRESPONSE._serialized_start=1009 + _GETGATEWAYRESPONSE._serialized_end=1206 + _UPDATEGATEWAYREQUEST._serialized_start=1208 + _UPDATEGATEWAYREQUEST._serialized_end=1261 + _DELETEGATEWAYREQUEST._serialized_start=1263 + _DELETEGATEWAYREQUEST._serialized_end=1305 + _LISTGATEWAYSREQUEST._serialized_start=1307 + _LISTGATEWAYSREQUEST._serialized_end=1394 + _LISTGATEWAYSRESPONSE._serialized_start=1396 + _LISTGATEWAYSRESPONSE._serialized_end=1477 + _GENERATEGATEWAYCLIENTCERTIFICATEREQUEST._serialized_start=1479 + _GENERATEGATEWAYCLIENTCERTIFICATEREQUEST._serialized_end=1540 + _GENERATEGATEWAYCLIENTCERTIFICATERESPONSE._serialized_start=1543 + _GENERATEGATEWAYCLIENTCERTIFICATERESPONSE._serialized_end=1685 + _GETGATEWAYMETRICSREQUEST._serialized_start=1688 + _GETGATEWAYMETRICSREQUEST._serialized_end=1860 + _GETGATEWAYMETRICSRESPONSE._serialized_start=1863 + _GETGATEWAYMETRICSRESPONSE._serialized_end=2185 + _GATEWAYSERVICE._serialized_start=2245 + _GATEWAYSERVICE._serialized_end=3030 # @@protoc_insertion_point(module_scope) diff --git a/api/python/src/chirpstack_api/api/internal_pb2.py b/api/python/src/chirpstack_api/api/internal_pb2.py index 402fb680..b29111da 100644 --- a/api/python/src/chirpstack_api/api/internal_pb2.py +++ b/api/python/src/chirpstack_api/api/internal_pb2.py @@ -17,7 +17,7 @@ from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_c from chirpstack_api.api import user_pb2 as chirpstack__api_dot_api_dot_user__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!chirpstack-api/api/internal.proto\x12\x03\x61pi\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1d\x63hirpstack-api/api/user.proto\"G\n\x06\x41piKey\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08is_admin\x18\x03 \x01(\x08\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"3\n\x13\x43reateApiKeyRequest\x12\x1c\n\x07\x61pi_key\x18\x01 \x01(\x0b\x32\x0b.api.ApiKey\"1\n\x14\x43reateApiKeyResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"!\n\x13\x44\x65leteApiKeyRequest\x12\n\n\x02id\x18\x01 \x01(\t\"X\n\x12ListApiKeysRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x10\n\x08is_admin\x18\x03 \x01(\x08\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"G\n\x13ListApiKeysResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12\x1b\n\x06result\x18\x02 \x03(\x0b\x32\x0b.api.ApiKey\"\xc8\x01\n\x0eUserTenantLink\x12.\n\ncreated_at\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\ttenant_id\x18\x03 \x01(\t\x12\x10\n\x08is_admin\x18\x04 \x01(\x08\x12\x17\n\x0fis_device_admin\x18\x05 \x01(\x08\x12\x18\n\x10is_gateway_admin\x18\x06 \x01(\x08\"/\n\x0cLoginRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\x1c\n\rLoginResponse\x12\x0b\n\x03jwt\x18\x01 \x01(\t\"P\n\x0fProfileResponse\x12\x17\n\x04user\x18\x01 \x01(\x0b\x32\t.api.User\x12$\n\x07tenants\x18\x03 \x03(\x0b\x32\x13.api.UserTenantLink\"D\n\x13GlobalSearchRequest\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\x12\x0e\n\x06offset\x18\x03 \x01(\x03\"?\n\x14GlobalSearchResponse\x12\'\n\x06result\x18\x01 \x03(\x0b\x32\x17.api.GlobalSearchResult\"\xe2\x01\n\x12GlobalSearchResult\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x11\n\ttenant_id\x18\x03 \x01(\t\x12\x13\n\x0btenant_name\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x05 \x01(\t\x12\x18\n\x10\x61pplication_name\x18\x06 \x01(\t\x12\x16\n\x0e\x64\x65vice_dev_eui\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65vice_name\x18\x08 \x01(\t\x12\x12\n\ngateway_id\x18\t \x01(\t\x12\x14\n\x0cgateway_name\x18\n \x01(\t\">\n\x10SettingsResponse\x12*\n\x0eopenid_connect\x18\x01 \x01(\x0b\x32\x12.api.OpenIdConnect\"q\n\rOpenIdConnect\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\tlogin_url\x18\x02 \x01(\tR\x08loginURL\x12\x13\n\x0blogin_label\x18\x03 \x01(\t\x12\x1d\n\nlogout_url\x18\x04 \x01(\tR\tlogoutURL\"8\n\x19OpenIdConnectLoginRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\r\n\x05state\x18\x02 \x01(\t\"+\n\x1aOpenIdConnectLoginResponse\x12\r\n\x05token\x18\x01 \x01(\t\"-\n\x18GetDevicesSummaryRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\"\xd2\x01\n\x19GetDevicesSummaryResponse\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\r\x12\x16\n\x0einactive_count\x18\x02 \x01(\r\x12=\n\x08\x64r_count\x18\x03 \x03(\x0b\x32+.api.GetDevicesSummaryResponse.DrCountEntry\x12\x18\n\x10never_seen_count\x18\x04 \x01(\r\x1a.\n\x0c\x44rCountEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\".\n\x19GetGatewaysSummaryRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\"d\n\x1aGetGatewaysSummaryResponse\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\r\x12\x16\n\x0einactive_count\x18\x02 \x01(\r\x12\x18\n\x10never_seen_count\x18\x03 \x01(\r\"\xc7\x01\n\x07LogItem\x12\n\n\x02id\x18\x01 \x01(\t\x12(\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x30\n\nproperties\x18\x05 \x03(\x0b\x32\x1c.api.LogItem.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x1aStreamGatewayFramesRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\",\n\x19StreamDeviceFramesRequest\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\",\n\x19StreamDeviceEventsRequest\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\";\n\x13ListRegionsResponse\x12$\n\x07regions\x18\x01 \x03(\x0b\x32\x13.api.RegionListItem\"Q\n\x0eRegionListItem\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06region\x18\x02 \x01(\x0e\x32\x0e.common.Region\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x1e\n\x10GetRegionRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\xa8\x02\n\x11GetRegionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06region\x18\x02 \x01(\x0e\x32\x0e.common.Region\x12\x11\n\tuser_info\x18\x03 \x01(\t\x12+\n\x0fuplink_channels\x18\x04 \x03(\x0b\x32\x12.api.RegionChannel\x12\x11\n\trx1_delay\x18\x05 \x01(\r\x12\x15\n\rrx1_dr_offset\x18\x06 \x01(\r\x12\x0e\n\x06rx2_dr\x18\x07 \x01(\r\x12\x15\n\rrx2_frequency\x18\x08 \x01(\r\x12\x1c\n\x14\x63lass_b_ping_slot_dr\x18\t \x01(\r\x12#\n\x1b\x63lass_b_ping_slot_frequency\x18\n \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\"B\n\rRegionChannel\x12\x11\n\tfrequency\x18\x01 \x01(\r\x12\x0e\n\x06\x64r_min\x18\x02 \x01(\r\x12\x0e\n\x06\x64r_max\x18\x03 \x01(\r2\xb4\x08\n\x0fInternalService\x12\x30\n\x05Login\x12\x11.api.LoginRequest\x1a\x12.api.LoginResponse\"\x00\x12\x39\n\x07Profile\x12\x16.google.protobuf.Empty\x1a\x14.api.ProfileResponse\"\x00\x12\x45\n\x0cGlobalSearch\x12\x18.api.GlobalSearchRequest\x1a\x19.api.GlobalSearchResponse\"\x00\x12\x45\n\x0c\x43reateApiKey\x12\x18.api.CreateApiKeyRequest\x1a\x19.api.CreateApiKeyResponse\"\x00\x12\x42\n\x0c\x44\x65leteApiKey\x12\x18.api.DeleteApiKeyRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x42\n\x0bListApiKeys\x12\x17.api.ListApiKeysRequest\x1a\x18.api.ListApiKeysResponse\"\x00\x12;\n\x08Settings\x12\x16.google.protobuf.Empty\x1a\x15.api.SettingsResponse\"\x00\x12W\n\x12OpenIdConnectLogin\x12\x1e.api.OpenIdConnectLoginRequest\x1a\x1f.api.OpenIdConnectLoginResponse\"\x00\x12T\n\x11GetDevicesSummary\x12\x1d.api.GetDevicesSummaryRequest\x1a\x1e.api.GetDevicesSummaryResponse\"\x00\x12W\n\x12GetGatewaysSummary\x12\x1e.api.GetGatewaysSummaryRequest\x1a\x1f.api.GetGatewaysSummaryResponse\"\x00\x12H\n\x13StreamGatewayFrames\x12\x1f.api.StreamGatewayFramesRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x46\n\x12StreamDeviceFrames\x12\x1e.api.StreamDeviceFramesRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x46\n\x12StreamDeviceEvents\x12\x1e.api.StreamDeviceEventsRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x41\n\x0bListRegions\x12\x16.google.protobuf.Empty\x1a\x18.api.ListRegionsResponse\"\x00\x12<\n\tGetRegion\x12\x15.api.GetRegionRequest\x1a\x16.api.GetRegionResponse\"\x00\x42T\n\x11io.chirpstack.apiB\rInternalProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/apib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!chirpstack-api/api/internal.proto\x12\x03\x61pi\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1d\x63hirpstack-api/api/user.proto\"G\n\x06\x41piKey\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08is_admin\x18\x03 \x01(\x08\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"3\n\x13\x43reateApiKeyRequest\x12\x1c\n\x07\x61pi_key\x18\x01 \x01(\x0b\x32\x0b.api.ApiKey\"1\n\x14\x43reateApiKeyResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"!\n\x13\x44\x65leteApiKeyRequest\x12\n\n\x02id\x18\x01 \x01(\t\"X\n\x12ListApiKeysRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x10\n\x08is_admin\x18\x03 \x01(\x08\x12\x11\n\ttenant_id\x18\x04 \x01(\t\"G\n\x13ListApiKeysResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12\x1b\n\x06result\x18\x02 \x03(\x0b\x32\x0b.api.ApiKey\"\xc8\x01\n\x0eUserTenantLink\x12.\n\ncreated_at\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\ttenant_id\x18\x03 \x01(\t\x12\x10\n\x08is_admin\x18\x04 \x01(\x08\x12\x17\n\x0fis_device_admin\x18\x05 \x01(\x08\x12\x18\n\x10is_gateway_admin\x18\x06 \x01(\x08\"/\n\x0cLoginRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\x1c\n\rLoginResponse\x12\x0b\n\x03jwt\x18\x01 \x01(\t\"P\n\x0fProfileResponse\x12\x17\n\x04user\x18\x01 \x01(\x0b\x32\t.api.User\x12$\n\x07tenants\x18\x03 \x03(\x0b\x32\x13.api.UserTenantLink\"D\n\x13GlobalSearchRequest\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\x12\x0e\n\x06offset\x18\x03 \x01(\x03\"?\n\x14GlobalSearchResponse\x12\'\n\x06result\x18\x01 \x03(\x0b\x32\x17.api.GlobalSearchResult\"\xe2\x01\n\x12GlobalSearchResult\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x11\n\ttenant_id\x18\x03 \x01(\t\x12\x13\n\x0btenant_name\x18\x04 \x01(\t\x12\x16\n\x0e\x61pplication_id\x18\x05 \x01(\t\x12\x18\n\x10\x61pplication_name\x18\x06 \x01(\t\x12\x16\n\x0e\x64\x65vice_dev_eui\x18\x07 \x01(\t\x12\x13\n\x0b\x64\x65vice_name\x18\x08 \x01(\t\x12\x12\n\ngateway_id\x18\t \x01(\t\x12\x14\n\x0cgateway_name\x18\n \x01(\t\">\n\x10SettingsResponse\x12*\n\x0eopenid_connect\x18\x01 \x01(\x0b\x32\x12.api.OpenIdConnect\"q\n\rOpenIdConnect\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1b\n\tlogin_url\x18\x02 \x01(\tR\x08loginURL\x12\x13\n\x0blogin_label\x18\x03 \x01(\t\x12\x1d\n\nlogout_url\x18\x04 \x01(\tR\tlogoutURL\"8\n\x19OpenIdConnectLoginRequest\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\r\n\x05state\x18\x02 \x01(\t\"+\n\x1aOpenIdConnectLoginResponse\x12\r\n\x05token\x18\x01 \x01(\t\"-\n\x18GetDevicesSummaryRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\"\xd2\x01\n\x19GetDevicesSummaryResponse\x12\x14\n\x0c\x61\x63tive_count\x18\x01 \x01(\r\x12\x16\n\x0einactive_count\x18\x02 \x01(\r\x12=\n\x08\x64r_count\x18\x03 \x03(\x0b\x32+.api.GetDevicesSummaryResponse.DrCountEntry\x12\x18\n\x10never_seen_count\x18\x04 \x01(\r\x1a.\n\x0c\x44rCountEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\".\n\x19GetGatewaysSummaryRequest\x12\x11\n\ttenant_id\x18\x01 \x01(\t\"c\n\x1aGetGatewaysSummaryResponse\x12\x14\n\x0conline_count\x18\x01 \x01(\r\x12\x15\n\roffline_count\x18\x02 \x01(\r\x12\x18\n\x10never_seen_count\x18\x03 \x01(\r\"\xc7\x01\n\x07LogItem\x12\n\n\x02id\x18\x01 \x01(\t\x12(\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x30\n\nproperties\x18\x05 \x03(\x0b\x32\x1c.api.LogItem.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x1aStreamGatewayFramesRequest\x12\x12\n\ngateway_id\x18\x01 \x01(\t\",\n\x19StreamDeviceFramesRequest\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\",\n\x19StreamDeviceEventsRequest\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\";\n\x13ListRegionsResponse\x12$\n\x07regions\x18\x01 \x03(\x0b\x32\x13.api.RegionListItem\"Q\n\x0eRegionListItem\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06region\x18\x02 \x01(\x0e\x32\x0e.common.Region\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"\x1e\n\x10GetRegionRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\xa8\x02\n\x11GetRegionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06region\x18\x02 \x01(\x0e\x32\x0e.common.Region\x12\x11\n\tuser_info\x18\x03 \x01(\t\x12+\n\x0fuplink_channels\x18\x04 \x03(\x0b\x32\x12.api.RegionChannel\x12\x11\n\trx1_delay\x18\x05 \x01(\r\x12\x15\n\rrx1_dr_offset\x18\x06 \x01(\r\x12\x0e\n\x06rx2_dr\x18\x07 \x01(\r\x12\x15\n\rrx2_frequency\x18\x08 \x01(\r\x12\x1c\n\x14\x63lass_b_ping_slot_dr\x18\t \x01(\r\x12#\n\x1b\x63lass_b_ping_slot_frequency\x18\n \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\"B\n\rRegionChannel\x12\x11\n\tfrequency\x18\x01 \x01(\r\x12\x0e\n\x06\x64r_min\x18\x02 \x01(\r\x12\x0e\n\x06\x64r_max\x18\x03 \x01(\r2\xb4\x08\n\x0fInternalService\x12\x30\n\x05Login\x12\x11.api.LoginRequest\x1a\x12.api.LoginResponse\"\x00\x12\x39\n\x07Profile\x12\x16.google.protobuf.Empty\x1a\x14.api.ProfileResponse\"\x00\x12\x45\n\x0cGlobalSearch\x12\x18.api.GlobalSearchRequest\x1a\x19.api.GlobalSearchResponse\"\x00\x12\x45\n\x0c\x43reateApiKey\x12\x18.api.CreateApiKeyRequest\x1a\x19.api.CreateApiKeyResponse\"\x00\x12\x42\n\x0c\x44\x65leteApiKey\x12\x18.api.DeleteApiKeyRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x42\n\x0bListApiKeys\x12\x17.api.ListApiKeysRequest\x1a\x18.api.ListApiKeysResponse\"\x00\x12;\n\x08Settings\x12\x16.google.protobuf.Empty\x1a\x15.api.SettingsResponse\"\x00\x12W\n\x12OpenIdConnectLogin\x12\x1e.api.OpenIdConnectLoginRequest\x1a\x1f.api.OpenIdConnectLoginResponse\"\x00\x12T\n\x11GetDevicesSummary\x12\x1d.api.GetDevicesSummaryRequest\x1a\x1e.api.GetDevicesSummaryResponse\"\x00\x12W\n\x12GetGatewaysSummary\x12\x1e.api.GetGatewaysSummaryRequest\x1a\x1f.api.GetGatewaysSummaryResponse\"\x00\x12H\n\x13StreamGatewayFrames\x12\x1f.api.StreamGatewayFramesRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x46\n\x12StreamDeviceFrames\x12\x1e.api.StreamDeviceFramesRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x46\n\x12StreamDeviceEvents\x12\x1e.api.StreamDeviceEventsRequest\x1a\x0c.api.LogItem\"\x00\x30\x01\x12\x41\n\x0bListRegions\x12\x16.google.protobuf.Empty\x1a\x18.api.ListRegionsResponse\"\x00\x12<\n\tGetRegion\x12\x15.api.GetRegionRequest\x1a\x16.api.GetRegionResponse\"\x00\x42T\n\x11io.chirpstack.apiB\rInternalProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/apib\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.api.internal_pb2', globals()) @@ -72,27 +72,27 @@ if _descriptor._USE_C_DESCRIPTORS == False: _GETGATEWAYSSUMMARYREQUEST._serialized_start=1816 _GETGATEWAYSSUMMARYREQUEST._serialized_end=1862 _GETGATEWAYSSUMMARYRESPONSE._serialized_start=1864 - _GETGATEWAYSSUMMARYRESPONSE._serialized_end=1964 - _LOGITEM._serialized_start=1967 - _LOGITEM._serialized_end=2166 - _LOGITEM_PROPERTIESENTRY._serialized_start=2117 - _LOGITEM_PROPERTIESENTRY._serialized_end=2166 - _STREAMGATEWAYFRAMESREQUEST._serialized_start=2168 - _STREAMGATEWAYFRAMESREQUEST._serialized_end=2216 - _STREAMDEVICEFRAMESREQUEST._serialized_start=2218 - _STREAMDEVICEFRAMESREQUEST._serialized_end=2262 - _STREAMDEVICEEVENTSREQUEST._serialized_start=2264 - _STREAMDEVICEEVENTSREQUEST._serialized_end=2308 - _LISTREGIONSRESPONSE._serialized_start=2310 - _LISTREGIONSRESPONSE._serialized_end=2369 - _REGIONLISTITEM._serialized_start=2371 - _REGIONLISTITEM._serialized_end=2452 - _GETREGIONREQUEST._serialized_start=2454 - _GETREGIONREQUEST._serialized_end=2484 - _GETREGIONRESPONSE._serialized_start=2487 - _GETREGIONRESPONSE._serialized_end=2783 - _REGIONCHANNEL._serialized_start=2785 - _REGIONCHANNEL._serialized_end=2851 - _INTERNALSERVICE._serialized_start=2854 - _INTERNALSERVICE._serialized_end=3930 + _GETGATEWAYSSUMMARYRESPONSE._serialized_end=1963 + _LOGITEM._serialized_start=1966 + _LOGITEM._serialized_end=2165 + _LOGITEM_PROPERTIESENTRY._serialized_start=2116 + _LOGITEM_PROPERTIESENTRY._serialized_end=2165 + _STREAMGATEWAYFRAMESREQUEST._serialized_start=2167 + _STREAMGATEWAYFRAMESREQUEST._serialized_end=2215 + _STREAMDEVICEFRAMESREQUEST._serialized_start=2217 + _STREAMDEVICEFRAMESREQUEST._serialized_end=2261 + _STREAMDEVICEEVENTSREQUEST._serialized_start=2263 + _STREAMDEVICEEVENTSREQUEST._serialized_end=2307 + _LISTREGIONSRESPONSE._serialized_start=2309 + _LISTREGIONSRESPONSE._serialized_end=2368 + _REGIONLISTITEM._serialized_start=2370 + _REGIONLISTITEM._serialized_end=2451 + _GETREGIONREQUEST._serialized_start=2453 + _GETREGIONREQUEST._serialized_end=2483 + _GETREGIONRESPONSE._serialized_start=2486 + _GETREGIONRESPONSE._serialized_end=2782 + _REGIONCHANNEL._serialized_start=2784 + _REGIONCHANNEL._serialized_end=2850 + _INTERNALSERVICE._serialized_start=2853 + _INTERNALSERVICE._serialized_end=3929 # @@protoc_insertion_point(module_scope) diff --git a/api/rust/proto/chirpstack/api/device_profile.proto b/api/rust/proto/chirpstack/api/device_profile.proto index 13d6b564..047eea3f 100644 --- a/api/rust/proto/chirpstack/api/device_profile.proto +++ b/api/rust/proto/chirpstack/api/device_profile.proto @@ -124,7 +124,7 @@ message DeviceProfile { // Uplink interval (seconds). // This defines the expected uplink interval which the device uses for - // communication. When the uplink interval has expired and no uplink has + // communication. If the uplink interval has expired and no uplink has // been received, the device is considered inactive. uint32 uplink_interval = 11; diff --git a/api/rust/proto/chirpstack/api/gateway.proto b/api/rust/proto/chirpstack/api/gateway.proto index e732fa47..f26906e6 100644 --- a/api/rust/proto/chirpstack/api/gateway.proto +++ b/api/rust/proto/chirpstack/api/gateway.proto @@ -66,6 +66,17 @@ service GatewayService { } } +enum GatewayState { + // The gateway has never sent any stats. + NEVER_SEEN = 0; + + // Online. + ONLINE = 1; + + // Offline. + OFFLINE = 2; +} + message Gateway { // Gateway ID (EUI64). string gateway_id = 1; @@ -87,6 +98,11 @@ message Gateway { // Metadata (provided by the gateway). map metadata = 7; + + // Stats interval (seconds). + // This defines the expected interval in which the gateway sends its + // statistics. + uint32 stats_interval = 8; } message GatewayListItem { @@ -116,6 +132,11 @@ message GatewayListItem { // Last seen at timestamp. google.protobuf.Timestamp last_seen_at = 9; + + // Gateway state. + // Please note that the state of the gateway is driven by the stats + // packages that are sent by the gateway. + GatewayState state = 10; } message CreateGatewayRequest { diff --git a/api/rust/proto/chirpstack/api/internal.proto b/api/rust/proto/chirpstack/api/internal.proto index b167b262..07f5a1d7 100644 --- a/api/rust/proto/chirpstack/api/internal.proto +++ b/api/rust/proto/chirpstack/api/internal.proto @@ -264,11 +264,11 @@ message GetGatewaysSummaryRequest { } message GetGatewaysSummaryResponse { - // Active count. - uint32 active_count = 1; + // Online count. + uint32 online_count = 1; - // Inactive count. - uint32 inactive_count = 2; + // Offline count. + uint32 offline_count = 2; // Never seen count. uint32 never_seen_count = 3; diff --git a/chirpstack/src/api/gateway.rs b/chirpstack/src/api/gateway.rs index bdc56a67..e11b2781 100644 --- a/chirpstack/src/api/gateway.rs +++ b/chirpstack/src/api/gateway.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; use std::str::FromStr; use std::time::SystemTime; -use chrono::{DateTime, Local, Utc}; +use chrono::{DateTime, Duration, Local, Utc}; use tonic::{Request, Response, Status}; use uuid::Uuid; @@ -61,6 +61,7 @@ impl GatewayService for Gateway { longitude: lon, altitude: alt, tags: fields::KeyValue::new(req_gw.tags.clone()), + stats_interval_secs: req_gw.stats_interval as i32, ..Default::default() }; @@ -103,6 +104,7 @@ impl GatewayService for Gateway { tenant_id: gw.tenant_id.to_string(), tags: gw.tags.into_hashmap(), metadata: gw.properties.into_hashmap(), + stats_interval: gw.stats_interval_secs as u32, }), created_at: Some(helpers::datetime_to_prost_timestamp(&gw.created_at)), updated_at: Some(helpers::datetime_to_prost_timestamp(&gw.updated_at)), @@ -150,6 +152,7 @@ impl GatewayService for Gateway { longitude: lon, altitude: alt, tags: fields::KeyValue::new(req_gw.tags.clone()), + stats_interval_secs: req_gw.stats_interval as i32, ..Default::default() }) .await @@ -242,6 +245,20 @@ impl GatewayService for Gateway { .last_seen_at .as_ref() .map(helpers::datetime_to_prost_timestamp), + state: { + if let Some(ts) = gw.last_seen_at { + if (Utc::now() - ts) + > Duration::seconds((gw.stats_interval_secs * 2).into()) + { + api::GatewayState::Offline + } else { + api::GatewayState::Online + } + } else { + api::GatewayState::NeverSeen + } + } + .into(), }) .collect(), }); diff --git a/chirpstack/src/api/internal.rs b/chirpstack/src/api/internal.rs index b84bd92f..11ee025e 100644 --- a/chirpstack/src/api/internal.rs +++ b/chirpstack/src/api/internal.rs @@ -568,14 +568,14 @@ impl InternalService for Internal { .await?; } - let active_inactive = gateway::get_active_inactive(&tenant_id) + let counts = gateway::get_counts_by_state(&tenant_id) .await .map_err(|e| e.status())?; Ok(Response::new(api::GetGatewaysSummaryResponse { - active_count: active_inactive.active_count as u32, - inactive_count: active_inactive.inactive_count as u32, - never_seen_count: active_inactive.never_seen_count as u32, + online_count: counts.online_count as u32, + offline_count: counts.offline_count as u32, + never_seen_count: counts.never_seen_count as u32, })) } diff --git a/chirpstack/src/storage/gateway.rs b/chirpstack/src/storage/gateway.rs index ee6c9acf..6ac1ba67 100644 --- a/chirpstack/src/storage/gateway.rs +++ b/chirpstack/src/storage/gateway.rs @@ -54,6 +54,7 @@ pub struct GatewayListItem { pub longitude: f64, pub altitude: f32, pub properties: fields::KeyValue, + pub stats_interval_secs: i32, } #[derive(Queryable, PartialEq, Debug)] @@ -73,13 +74,13 @@ pub struct Filters { } #[derive(QueryableByName, PartialEq, Eq, Debug)] -pub struct GatewaysActiveInactive { +pub struct GatewayCountsByState { #[diesel(sql_type = diesel::sql_types::BigInt)] pub never_seen_count: i64, #[diesel(sql_type = diesel::sql_types::BigInt)] - pub active_count: i64, + pub online_count: i64, #[diesel(sql_type = diesel::sql_types::BigInt)] - pub inactive_count: i64, + pub offline_count: i64, } impl Default for Gateway { @@ -340,6 +341,7 @@ pub async fn list( gateway::longitude, gateway::altitude, gateway::properties, + gateway::stats_interval_secs, )) .into_boxed(); @@ -387,24 +389,22 @@ pub async fn get_meta(gateway_id: &EUI64) -> Result { .await? } -pub async fn get_active_inactive( - tenant_id: &Option, -) -> Result { +pub async fn get_counts_by_state(tenant_id: &Option) -> Result { task::spawn_blocking({ let tenant_id = *tenant_id; - move || -> Result { + move || -> Result { let mut c = get_db_conn()?; - let ai: GatewaysActiveInactive = diesel::sql_query(r#" + let counts: GatewayCountsByState = diesel::sql_query(r#" select coalesce(sum(case when last_seen_at is null then 1 end), 0) as never_seen_count, - coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 1.5)) > last_seen_at then 1 end), 0) as inactive_count, - coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 1.5)) <= last_seen_at then 1 end), 0) as active_count + coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 2)) > last_seen_at then 1 end), 0) as offline_count, + coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 2)) <= last_seen_at then 1 end), 0) as online_count from gateway where $1 is null or tenant_id = $1 "#).bind::, _>(tenant_id).get_result(&mut c)?; - Ok(ai) + Ok(counts) } }).await? } diff --git a/ui/src/views/dashboard/Dashboard.tsx b/ui/src/views/dashboard/Dashboard.tsx index fb14efec..b330e52c 100644 --- a/ui/src/views/dashboard/Dashboard.tsx +++ b/ui/src/views/dashboard/Dashboard.tsx @@ -20,6 +20,7 @@ import { ListGatewaysRequest, ListGatewaysResponse, GatewayListItem, + GatewayState, } from "@chirpstack/chirpstack-api-grpc-web/api/gateway_pb"; import InternalStore from "../../stores/InternalStore"; @@ -74,14 +75,15 @@ class GatewaysMap extends Component<{}, GatewaysMapState> { let color: MarkerColor = "orange"; let lastSeen: string = "Never seen online"; + if (item.getState() === GatewayState.OFFLINE) { + color = "red"; + } else if (item.getState() === GatewayState.ONLINE) { + color = "green"; + } + if (item.getLastSeenAt() !== undefined) { let ts = moment(item.getLastSeenAt()!.toDate()); lastSeen = ts.fromNow(); - if (ts.isBefore(moment().subtract(5, "minutes"))) { - color = "red"; - } else { - color = "green"; - } } markers.push( @@ -115,20 +117,20 @@ class GatewaysActiveInactive extends Component { if ( this.props.summary === undefined || (this.props.summary.getNeverSeenCount() === 0 && - this.props.summary.getInactiveCount() === 0 && - this.props.summary.getActiveCount() === 0) + this.props.summary.getOfflineCount() === 0 && + this.props.summary.getOnlineCount() === 0) ) { return ; } const data = { - labels: ["Never seen", "Inactive", "Active"], + labels: ["Never seen", "Offline", "Online"], datasets: [ { data: [ this.props.summary.getNeverSeenCount(), - this.props.summary.getInactiveCount(), - this.props.summary.getActiveCount(), + this.props.summary.getOfflineCount(), + this.props.summary.getOnlineCount(), ], backgroundColor: [presetPalettes.orange.primary, presetPalettes.red.primary, presetPalettes.green.primary], }, diff --git a/ui/src/views/gateways/CreateGateway.tsx b/ui/src/views/gateways/CreateGateway.tsx index 63648380..f4ef2ee3 100644 --- a/ui/src/views/gateways/CreateGateway.tsx +++ b/ui/src/views/gateways/CreateGateway.tsx @@ -26,7 +26,8 @@ class CreateGateway extends Component { }; render() { - const gateway = new Gateway(); + let gateway = new Gateway(); + gateway.setStatsInterval(30); return ( diff --git a/ui/src/views/gateways/GatewayDashboard.tsx b/ui/src/views/gateways/GatewayDashboard.tsx index 8e118f4a..ff7764fd 100644 --- a/ui/src/views/gateways/GatewayDashboard.tsx +++ b/ui/src/views/gateways/GatewayDashboard.tsx @@ -90,8 +90,8 @@ class GatewayDashboard extends Component { {lastSeenAt} - - {this.props.gateway.getMetadataMap().get("region_name")} + + {this.props.gateway.getMetadataMap().get("region_config_id")} {this.props.gateway.getMetadataMap().get("region_common_name")} diff --git a/ui/src/views/gateways/GatewayForm.tsx b/ui/src/views/gateways/GatewayForm.tsx index deda0c81..b2125b92 100644 --- a/ui/src/views/gateways/GatewayForm.tsx +++ b/ui/src/views/gateways/GatewayForm.tsx @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { Form, Input, Row, Col, Button, Tabs, Space, Card } from "antd"; +import { Form, Input, InputNumber, Row, Col, Button, Tabs, Space, Card } from "antd"; import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; import { Location } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb"; @@ -80,6 +80,7 @@ class GatewayForm extends Component { gw.setName(v.name); gw.setDescription(v.description); gw.setGatewayId(v.gatewayId); + gw.setStatsInterval(v.statsInterval); gw.setLocation(loc); // tags @@ -129,14 +130,28 @@ class GatewayForm extends Component { - + + + + + + + + + + diff --git a/ui/src/views/gateways/ListGateways.tsx b/ui/src/views/gateways/ListGateways.tsx index 0c979d96..efa023f8 100644 --- a/ui/src/views/gateways/ListGateways.tsx +++ b/ui/src/views/gateways/ListGateways.tsx @@ -2,13 +2,14 @@ import React, { Component } from "react"; import { Link } from "react-router-dom"; import moment from "moment"; -import { Space, Breadcrumb, Button, PageHeader } from "antd"; +import { Space, Breadcrumb, Button, PageHeader, Badge } from "antd"; import { ColumnsType } from "antd/es/table"; import { ListGatewaysRequest, ListGatewaysResponse, GatewayListItem, + GatewayState, } from "@chirpstack/chirpstack-api-grpc-web/api/gateway_pb"; import { Tenant } from "@chirpstack/chirpstack-api-grpc-web/api/tenant_pb"; @@ -23,6 +24,21 @@ interface IProps { class ListGateways extends Component { columns = (): ColumnsType => { return [ + { + title: "", + dataIndex: "state", + key: "state", + width: 150, + render: (text, record) => { + if (record.state === GatewayState.NEVER_SEEN) { + return ; + } else if (record.state === GatewayState.OFFLINE) { + return ; + } else if (record.state === GatewayState.ONLINE) { + return ; + } + }, + }, { title: "Last seen", dataIndex: "lastSeenAt", @@ -34,7 +50,6 @@ class ListGateways extends Component { ts.setUTCSeconds(record.lastSeenAt.seconds); return moment(ts).format("YYYY-MM-DD HH:mm:ss"); } - return "Never"; }, }, { diff --git a/ui/src/views/tenants/TenantDashboard.tsx b/ui/src/views/tenants/TenantDashboard.tsx index f92d8af9..6832c7b2 100644 --- a/ui/src/views/tenants/TenantDashboard.tsx +++ b/ui/src/views/tenants/TenantDashboard.tsx @@ -22,6 +22,7 @@ import { ListGatewaysRequest, ListGatewaysResponse, GatewayListItem, + GatewayState, } from "@chirpstack/chirpstack-api-grpc-web/api/gateway_pb"; import InternalStore from "../../stores/InternalStore"; @@ -58,14 +59,15 @@ class GatewaysMap extends Component { let color: MarkerColor = "orange"; let lastSeen: string = "Never seen online"; + if (item.getState() === GatewayState.OFFLINE) { + color = "red"; + } else if (item.getState() === GatewayState.ONLINE) { + color = "green"; + } + if (item.getLastSeenAt() !== undefined) { let ts = moment(item.getLastSeenAt()!.toDate()); lastSeen = ts.fromNow(); - if (ts.isBefore(moment().subtract(5, "minutes"))) { - color = "red"; - } else { - color = "green"; - } } markers.push( @@ -99,20 +101,20 @@ class GatewaysActiveInactive extends Component { if ( this.props.summary === undefined || (this.props.summary.getNeverSeenCount() === 0 && - this.props.summary.getInactiveCount() === 0 && - this.props.summary.getActiveCount() === 0) + this.props.summary.getOfflineCount() === 0 && + this.props.summary.getOnlineCount() === 0) ) { return ; } const data = { - labels: ["Never seen", "Inactive", "Active"], + labels: ["Never seen", "Offline", "Online"], datasets: [ { data: [ this.props.summary.getNeverSeenCount(), - this.props.summary.getInactiveCount(), - this.props.summary.getActiveCount(), + this.props.summary.getOfflineCount(), + this.props.summary.getOnlineCount(), ], backgroundColor: [presetPalettes.orange.primary, presetPalettes.red.primary, presetPalettes.green.primary], },