diff --git a/go.sum b/go.sum index a0c1cc363c..3511d0e407 100644 --- a/go.sum +++ b/go.sum @@ -483,6 +483,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/pkg/sdk/sdk.pb.go b/pkg/sdk/sdk.pb.go index 3d69fac366..a1be43682b 100644 --- a/pkg/sdk/sdk.pb.go +++ b/pkg/sdk/sdk.pb.go @@ -147,6 +147,101 @@ func (x *KeyValue) GetValue() string { return "" } +type KeyValues struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyValues []*KeyValue `protobuf:"bytes,1,rep,name=key_values,json=keyValues,proto3" json:"key_values,omitempty"` +} + +func (x *KeyValues) Reset() { + *x = KeyValues{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValues) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValues) ProtoMessage() {} + +func (x *KeyValues) ProtoReflect() protoreflect.Message { + mi := &file_sdk_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValues.ProtoReflect.Descriptor instead. +func (*KeyValues) Descriptor() ([]byte, []int) { + return file_sdk_proto_rawDescGZIP(), []int{2} +} + +func (x *KeyValues) GetKeyValues() []*KeyValue { + if x != nil { + return x.KeyValues + } + return nil +} + +// Key entry +type Key struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *Key) Reset() { + *x = Key{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Key) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Key) ProtoMessage() {} + +func (x *Key) ProtoReflect() protoreflect.Message { + mi := &file_sdk_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Key.ProtoReflect.Descriptor instead. +func (*Key) Descriptor() ([]byte, []int) { + return file_sdk_proto_rawDescGZIP(), []int{3} +} + +func (x *Key) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + // time duration, in seconds type Duration struct { state protoimpl.MessageState @@ -159,7 +254,7 @@ type Duration struct { func (x *Duration) Reset() { *x = Duration{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[2] + mi := &file_sdk_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -172,7 +267,7 @@ func (x *Duration) String() string { func (*Duration) ProtoMessage() {} func (x *Duration) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[2] + mi := &file_sdk_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -185,7 +280,7 @@ func (x *Duration) ProtoReflect() protoreflect.Message { // Deprecated: Use Duration.ProtoReflect.Descriptor instead. func (*Duration) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{2} + return file_sdk_proto_rawDescGZIP(), []int{4} } func (x *Duration) GetSeconds() int64 { @@ -211,7 +306,7 @@ type GameServer struct { func (x *GameServer) Reset() { *x = GameServer{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[3] + mi := &file_sdk_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -224,7 +319,7 @@ func (x *GameServer) String() string { func (*GameServer) ProtoMessage() {} func (x *GameServer) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[3] + mi := &file_sdk_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -237,7 +332,7 @@ func (x *GameServer) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer.ProtoReflect.Descriptor instead. func (*GameServer) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3} + return file_sdk_proto_rawDescGZIP(), []int{5} } func (x *GameServer) GetObjectMeta() *GameServer_ObjectMeta { @@ -283,7 +378,7 @@ type GameServer_ObjectMeta struct { func (x *GameServer_ObjectMeta) Reset() { *x = GameServer_ObjectMeta{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[4] + mi := &file_sdk_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -296,7 +391,7 @@ func (x *GameServer_ObjectMeta) String() string { func (*GameServer_ObjectMeta) ProtoMessage() {} func (x *GameServer_ObjectMeta) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[4] + mi := &file_sdk_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -309,7 +404,7 @@ func (x *GameServer_ObjectMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_ObjectMeta.ProtoReflect.Descriptor instead. func (*GameServer_ObjectMeta) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 0} + return file_sdk_proto_rawDescGZIP(), []int{5, 0} } func (x *GameServer_ObjectMeta) GetName() string { @@ -386,7 +481,7 @@ type GameServer_Spec struct { func (x *GameServer_Spec) Reset() { *x = GameServer_Spec{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[5] + mi := &file_sdk_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -399,7 +494,7 @@ func (x *GameServer_Spec) String() string { func (*GameServer_Spec) ProtoMessage() {} func (x *GameServer_Spec) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[5] + mi := &file_sdk_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -412,7 +507,7 @@ func (x *GameServer_Spec) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Spec.ProtoReflect.Descriptor instead. func (*GameServer_Spec) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 1} + return file_sdk_proto_rawDescGZIP(), []int{5, 1} } func (x *GameServer_Spec) GetHealth() *GameServer_Spec_Health { @@ -445,7 +540,7 @@ type GameServer_Status struct { func (x *GameServer_Status) Reset() { *x = GameServer_Status{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[6] + mi := &file_sdk_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -458,7 +553,7 @@ func (x *GameServer_Status) String() string { func (*GameServer_Status) ProtoMessage() {} func (x *GameServer_Status) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[6] + mi := &file_sdk_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -471,7 +566,7 @@ func (x *GameServer_Status) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status.ProtoReflect.Descriptor instead. func (*GameServer_Status) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2} + return file_sdk_proto_rawDescGZIP(), []int{5, 2} } func (x *GameServer_Status) GetState() string { @@ -537,7 +632,7 @@ type GameServer_Spec_Health struct { func (x *GameServer_Spec_Health) Reset() { *x = GameServer_Spec_Health{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[9] + mi := &file_sdk_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -550,7 +645,7 @@ func (x *GameServer_Spec_Health) String() string { func (*GameServer_Spec_Health) ProtoMessage() {} func (x *GameServer_Spec_Health) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[9] + mi := &file_sdk_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -563,7 +658,7 @@ func (x *GameServer_Spec_Health) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Spec_Health.ProtoReflect.Descriptor instead. func (*GameServer_Spec_Health) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 1, 0} + return file_sdk_proto_rawDescGZIP(), []int{5, 1, 0} } func (x *GameServer_Spec_Health) GetDisabled() bool { @@ -606,7 +701,7 @@ type GameServer_Status_Address struct { func (x *GameServer_Status_Address) Reset() { *x = GameServer_Status_Address{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[10] + mi := &file_sdk_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -619,7 +714,7 @@ func (x *GameServer_Status_Address) String() string { func (*GameServer_Status_Address) ProtoMessage() {} func (x *GameServer_Status_Address) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[10] + mi := &file_sdk_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -632,7 +727,7 @@ func (x *GameServer_Status_Address) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status_Address.ProtoReflect.Descriptor instead. func (*GameServer_Status_Address) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2, 0} + return file_sdk_proto_rawDescGZIP(), []int{5, 2, 0} } func (x *GameServer_Status_Address) GetType() string { @@ -661,7 +756,7 @@ type GameServer_Status_Port struct { func (x *GameServer_Status_Port) Reset() { *x = GameServer_Status_Port{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[11] + mi := &file_sdk_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -674,7 +769,7 @@ func (x *GameServer_Status_Port) String() string { func (*GameServer_Status_Port) ProtoMessage() {} func (x *GameServer_Status_Port) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[11] + mi := &file_sdk_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -687,7 +782,7 @@ func (x *GameServer_Status_Port) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status_Port.ProtoReflect.Descriptor instead. func (*GameServer_Status_Port) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2, 1} + return file_sdk_proto_rawDescGZIP(), []int{5, 2, 1} } func (x *GameServer_Status_Port) GetName() string { @@ -719,7 +814,7 @@ type GameServer_Status_PlayerStatus struct { func (x *GameServer_Status_PlayerStatus) Reset() { *x = GameServer_Status_PlayerStatus{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[12] + mi := &file_sdk_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -732,7 +827,7 @@ func (x *GameServer_Status_PlayerStatus) String() string { func (*GameServer_Status_PlayerStatus) ProtoMessage() {} func (x *GameServer_Status_PlayerStatus) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[12] + mi := &file_sdk_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -745,7 +840,7 @@ func (x *GameServer_Status_PlayerStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status_PlayerStatus.ProtoReflect.Descriptor instead. func (*GameServer_Status_PlayerStatus) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2, 2} + return file_sdk_proto_rawDescGZIP(), []int{5, 2, 2} } func (x *GameServer_Status_PlayerStatus) GetCount() int64 { @@ -783,7 +878,7 @@ type GameServer_Status_CounterStatus struct { func (x *GameServer_Status_CounterStatus) Reset() { *x = GameServer_Status_CounterStatus{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[13] + mi := &file_sdk_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -796,7 +891,7 @@ func (x *GameServer_Status_CounterStatus) String() string { func (*GameServer_Status_CounterStatus) ProtoMessage() {} func (x *GameServer_Status_CounterStatus) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[13] + mi := &file_sdk_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -809,7 +904,7 @@ func (x *GameServer_Status_CounterStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status_CounterStatus.ProtoReflect.Descriptor instead. func (*GameServer_Status_CounterStatus) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2, 3} + return file_sdk_proto_rawDescGZIP(), []int{5, 2, 3} } func (x *GameServer_Status_CounterStatus) GetCount() int64 { @@ -840,7 +935,7 @@ type GameServer_Status_ListStatus struct { func (x *GameServer_Status_ListStatus) Reset() { *x = GameServer_Status_ListStatus{} if protoimpl.UnsafeEnabled { - mi := &file_sdk_proto_msgTypes[14] + mi := &file_sdk_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +948,7 @@ func (x *GameServer_Status_ListStatus) String() string { func (*GameServer_Status_ListStatus) ProtoMessage() {} func (x *GameServer_Status_ListStatus) ProtoReflect() protoreflect.Message { - mi := &file_sdk_proto_msgTypes[14] + mi := &file_sdk_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +961,7 @@ func (x *GameServer_Status_ListStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use GameServer_Status_ListStatus.ProtoReflect.Descriptor instead. func (*GameServer_Status_ListStatus) Descriptor() ([]byte, []int) { - return file_sdk_proto_rawDescGZIP(), []int{3, 2, 4} + return file_sdk_proto_rawDescGZIP(), []int{5, 2, 4} } func (x *GameServer_Status_ListStatus) GetCapacity() int64 { @@ -896,185 +991,198 @@ var file_sdk_proto_rawDesc = []byte{ 0x74, 0x79, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 0x22, 0x24, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x9c, 0x0f, 0x0a, - 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0b, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, - 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, - 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, - 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x1a, 0x99, 0x04, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x58, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x67, 0x6f, 0x6e, - 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, - 0x84, 0x02, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x44, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x17, 0x0a, 0x03, + 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x24, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x9c, 0x0f, 0x0a, 0x0a, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0b, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x1a, 0x99, 0x04, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x58, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x1a, 0xbb, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0d, 0x92, 0x41, 0x0a, 0xa2, 0x02, 0x07, 0x62, 0x6f, 0x6f, - 0x6c, 0x65, 0x61, 0x6e, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, - 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, - 0x6c, 0x61, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xb2, 0x07, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x47, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x70, 0x6f, - 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x67, 0x6f, 0x6e, - 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x6f, 0x72, - 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x6f, 0x6e, - 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x42, 0x0a, 0x05, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, - 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x69, - 0x73, 0x74, 0x73, 0x1a, 0x37, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x2e, 0x0a, 0x04, - 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x52, 0x0a, 0x0c, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, - 0x1a, 0x41, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, - 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, - 0x69, 0x74, 0x79, 0x1a, 0x40, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x6c, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 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, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 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, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, 0x84, + 0x02, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 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, 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x86, 0x06, 0x0a, 0x03, - 0x53, 0x44, 0x4b, 0x12, 0x48, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x15, 0x2e, 0x61, - 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0b, 0x22, 0x06, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0x4e, 0x0a, - 0x08, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, - 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, - 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, - 0x09, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x4e, 0x0a, - 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, - 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, - 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, - 0x09, 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x4c, 0x0a, - 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, - 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x22, 0x07, 0x2f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x12, 0x57, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x61, - 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, - 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x57, 0x61, 0x74, 0x63, 0x68, 0x47, 0x61, 0x6d, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, - 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, - 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x13, 0x12, 0x11, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x15, 0x2e, + 0x76, 0x65, 0x72, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x1a, 0xbb, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x0d, 0x92, 0x41, 0x0a, 0xa2, 0x02, 0x07, 0x62, 0x6f, 0x6f, 0x6c, + 0x65, 0x61, 0x6e, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, + 0x0e, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xb2, 0x07, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x47, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, + 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x6f, 0x72, 0x74, + 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, + 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x42, + 0x0a, 0x05, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, + 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x69, 0x73, + 0x74, 0x73, 0x1a, 0x37, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x2e, 0x0a, 0x04, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x52, 0x0a, 0x0c, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x1a, + 0x41, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x1a, 0x40, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x6c, 0x0a, 0x0d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 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, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 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, 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xec, 0x06, 0x0a, 0x03, 0x53, + 0x44, 0x4b, 0x12, 0x48, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x15, 0x2e, 0x61, 0x67, + 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0b, 0x22, 0x06, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0x4e, 0x0a, 0x08, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, + 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, + 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x4e, 0x0a, 0x08, + 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, + 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x09, + 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x4c, 0x0a, 0x06, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x1a, 0x0f, 0x2f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3a, 0x01, 0x2a, - 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, - 0x64, 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x15, 0x2e, 0x61, 0x67, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x22, 0x07, 0x2f, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x12, 0x57, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x1a, 0x14, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x01, 0x2a, 0x12, 0x4f, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x18, - 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, - 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22, 0x08, 0x2f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x4f, 0x5a, 0x05, 0x2e, 0x2f, 0x73, 0x64, 0x6b, 0x92, 0x41, 0x45, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x64, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x0f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x74, 0x2a, 0x01, - 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x13, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x57, 0x61, 0x74, 0x63, 0x68, 0x47, 0x61, 0x6d, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, + 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x47, + 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x12, 0x11, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x15, 0x2e, 0x61, + 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x1a, 0x0f, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3a, 0x01, 0x2a, 0x12, + 0x61, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x6f, + 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x1a, 0x14, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x01, 0x2a, 0x12, 0x64, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, + 0x15, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x1a, 0x15, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x4f, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x15, 0x2e, + 0x61, 0x67, 0x6f, 0x6e, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22, 0x08, 0x2f, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x4f, 0x5a, 0x05, 0x2e, 0x2f, 0x73, + 0x64, 0x6b, 0x92, 0x41, 0x45, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x64, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x32, 0x0f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x73, 0x65, 0x74, 0x2a, 0x01, 0x01, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1089,63 +1197,68 @@ func file_sdk_proto_rawDescGZIP() []byte { return file_sdk_proto_rawDescData } -var file_sdk_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_sdk_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_sdk_proto_goTypes = []interface{}{ (*Empty)(nil), // 0: agones.dev.sdk.Empty (*KeyValue)(nil), // 1: agones.dev.sdk.KeyValue - (*Duration)(nil), // 2: agones.dev.sdk.Duration - (*GameServer)(nil), // 3: agones.dev.sdk.GameServer - (*GameServer_ObjectMeta)(nil), // 4: agones.dev.sdk.GameServer.ObjectMeta - (*GameServer_Spec)(nil), // 5: agones.dev.sdk.GameServer.Spec - (*GameServer_Status)(nil), // 6: agones.dev.sdk.GameServer.Status - nil, // 7: agones.dev.sdk.GameServer.ObjectMeta.AnnotationsEntry - nil, // 8: agones.dev.sdk.GameServer.ObjectMeta.LabelsEntry - (*GameServer_Spec_Health)(nil), // 9: agones.dev.sdk.GameServer.Spec.Health - (*GameServer_Status_Address)(nil), // 10: agones.dev.sdk.GameServer.Status.Address - (*GameServer_Status_Port)(nil), // 11: agones.dev.sdk.GameServer.Status.Port - (*GameServer_Status_PlayerStatus)(nil), // 12: agones.dev.sdk.GameServer.Status.PlayerStatus - (*GameServer_Status_CounterStatus)(nil), // 13: agones.dev.sdk.GameServer.Status.CounterStatus - (*GameServer_Status_ListStatus)(nil), // 14: agones.dev.sdk.GameServer.Status.ListStatus - nil, // 15: agones.dev.sdk.GameServer.Status.CountersEntry - nil, // 16: agones.dev.sdk.GameServer.Status.ListsEntry + (*KeyValues)(nil), // 2: agones.dev.sdk.KeyValues + (*Key)(nil), // 3: agones.dev.sdk.Key + (*Duration)(nil), // 4: agones.dev.sdk.Duration + (*GameServer)(nil), // 5: agones.dev.sdk.GameServer + (*GameServer_ObjectMeta)(nil), // 6: agones.dev.sdk.GameServer.ObjectMeta + (*GameServer_Spec)(nil), // 7: agones.dev.sdk.GameServer.Spec + (*GameServer_Status)(nil), // 8: agones.dev.sdk.GameServer.Status + nil, // 9: agones.dev.sdk.GameServer.ObjectMeta.AnnotationsEntry + nil, // 10: agones.dev.sdk.GameServer.ObjectMeta.LabelsEntry + (*GameServer_Spec_Health)(nil), // 11: agones.dev.sdk.GameServer.Spec.Health + (*GameServer_Status_Address)(nil), // 12: agones.dev.sdk.GameServer.Status.Address + (*GameServer_Status_Port)(nil), // 13: agones.dev.sdk.GameServer.Status.Port + (*GameServer_Status_PlayerStatus)(nil), // 14: agones.dev.sdk.GameServer.Status.PlayerStatus + (*GameServer_Status_CounterStatus)(nil), // 15: agones.dev.sdk.GameServer.Status.CounterStatus + (*GameServer_Status_ListStatus)(nil), // 16: agones.dev.sdk.GameServer.Status.ListStatus + nil, // 17: agones.dev.sdk.GameServer.Status.CountersEntry + nil, // 18: agones.dev.sdk.GameServer.Status.ListsEntry } var file_sdk_proto_depIdxs = []int32{ - 4, // 0: agones.dev.sdk.GameServer.object_meta:type_name -> agones.dev.sdk.GameServer.ObjectMeta - 5, // 1: agones.dev.sdk.GameServer.spec:type_name -> agones.dev.sdk.GameServer.Spec - 6, // 2: agones.dev.sdk.GameServer.status:type_name -> agones.dev.sdk.GameServer.Status - 7, // 3: agones.dev.sdk.GameServer.ObjectMeta.annotations:type_name -> agones.dev.sdk.GameServer.ObjectMeta.AnnotationsEntry - 8, // 4: agones.dev.sdk.GameServer.ObjectMeta.labels:type_name -> agones.dev.sdk.GameServer.ObjectMeta.LabelsEntry - 9, // 5: agones.dev.sdk.GameServer.Spec.health:type_name -> agones.dev.sdk.GameServer.Spec.Health - 10, // 6: agones.dev.sdk.GameServer.Status.addresses:type_name -> agones.dev.sdk.GameServer.Status.Address - 11, // 7: agones.dev.sdk.GameServer.Status.ports:type_name -> agones.dev.sdk.GameServer.Status.Port - 12, // 8: agones.dev.sdk.GameServer.Status.players:type_name -> agones.dev.sdk.GameServer.Status.PlayerStatus - 15, // 9: agones.dev.sdk.GameServer.Status.counters:type_name -> agones.dev.sdk.GameServer.Status.CountersEntry - 16, // 10: agones.dev.sdk.GameServer.Status.lists:type_name -> agones.dev.sdk.GameServer.Status.ListsEntry - 13, // 11: agones.dev.sdk.GameServer.Status.CountersEntry.value:type_name -> agones.dev.sdk.GameServer.Status.CounterStatus - 14, // 12: agones.dev.sdk.GameServer.Status.ListsEntry.value:type_name -> agones.dev.sdk.GameServer.Status.ListStatus - 0, // 13: agones.dev.sdk.SDK.Ready:input_type -> agones.dev.sdk.Empty - 0, // 14: agones.dev.sdk.SDK.Allocate:input_type -> agones.dev.sdk.Empty - 0, // 15: agones.dev.sdk.SDK.Shutdown:input_type -> agones.dev.sdk.Empty - 0, // 16: agones.dev.sdk.SDK.Health:input_type -> agones.dev.sdk.Empty - 0, // 17: agones.dev.sdk.SDK.GetGameServer:input_type -> agones.dev.sdk.Empty - 0, // 18: agones.dev.sdk.SDK.WatchGameServer:input_type -> agones.dev.sdk.Empty - 1, // 19: agones.dev.sdk.SDK.SetLabel:input_type -> agones.dev.sdk.KeyValue - 1, // 20: agones.dev.sdk.SDK.SetAnnotation:input_type -> agones.dev.sdk.KeyValue - 2, // 21: agones.dev.sdk.SDK.Reserve:input_type -> agones.dev.sdk.Duration - 0, // 22: agones.dev.sdk.SDK.Ready:output_type -> agones.dev.sdk.Empty - 0, // 23: agones.dev.sdk.SDK.Allocate:output_type -> agones.dev.sdk.Empty - 0, // 24: agones.dev.sdk.SDK.Shutdown:output_type -> agones.dev.sdk.Empty - 0, // 25: agones.dev.sdk.SDK.Health:output_type -> agones.dev.sdk.Empty - 3, // 26: agones.dev.sdk.SDK.GetGameServer:output_type -> agones.dev.sdk.GameServer - 3, // 27: agones.dev.sdk.SDK.WatchGameServer:output_type -> agones.dev.sdk.GameServer - 0, // 28: agones.dev.sdk.SDK.SetLabel:output_type -> agones.dev.sdk.Empty - 0, // 29: agones.dev.sdk.SDK.SetAnnotation:output_type -> agones.dev.sdk.Empty - 0, // 30: agones.dev.sdk.SDK.Reserve:output_type -> agones.dev.sdk.Empty - 22, // [22:31] is the sub-list for method output_type - 13, // [13:22] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 1, // 0: agones.dev.sdk.KeyValues.key_values:type_name -> agones.dev.sdk.KeyValue + 6, // 1: agones.dev.sdk.GameServer.object_meta:type_name -> agones.dev.sdk.GameServer.ObjectMeta + 7, // 2: agones.dev.sdk.GameServer.spec:type_name -> agones.dev.sdk.GameServer.Spec + 8, // 3: agones.dev.sdk.GameServer.status:type_name -> agones.dev.sdk.GameServer.Status + 9, // 4: agones.dev.sdk.GameServer.ObjectMeta.annotations:type_name -> agones.dev.sdk.GameServer.ObjectMeta.AnnotationsEntry + 10, // 5: agones.dev.sdk.GameServer.ObjectMeta.labels:type_name -> agones.dev.sdk.GameServer.ObjectMeta.LabelsEntry + 11, // 6: agones.dev.sdk.GameServer.Spec.health:type_name -> agones.dev.sdk.GameServer.Spec.Health + 12, // 7: agones.dev.sdk.GameServer.Status.addresses:type_name -> agones.dev.sdk.GameServer.Status.Address + 13, // 8: agones.dev.sdk.GameServer.Status.ports:type_name -> agones.dev.sdk.GameServer.Status.Port + 14, // 9: agones.dev.sdk.GameServer.Status.players:type_name -> agones.dev.sdk.GameServer.Status.PlayerStatus + 17, // 10: agones.dev.sdk.GameServer.Status.counters:type_name -> agones.dev.sdk.GameServer.Status.CountersEntry + 18, // 11: agones.dev.sdk.GameServer.Status.lists:type_name -> agones.dev.sdk.GameServer.Status.ListsEntry + 15, // 12: agones.dev.sdk.GameServer.Status.CountersEntry.value:type_name -> agones.dev.sdk.GameServer.Status.CounterStatus + 16, // 13: agones.dev.sdk.GameServer.Status.ListsEntry.value:type_name -> agones.dev.sdk.GameServer.Status.ListStatus + 0, // 14: agones.dev.sdk.SDK.Ready:input_type -> agones.dev.sdk.Empty + 0, // 15: agones.dev.sdk.SDK.Allocate:input_type -> agones.dev.sdk.Empty + 0, // 16: agones.dev.sdk.SDK.Shutdown:input_type -> agones.dev.sdk.Empty + 0, // 17: agones.dev.sdk.SDK.Health:input_type -> agones.dev.sdk.Empty + 0, // 18: agones.dev.sdk.SDK.GetGameServer:input_type -> agones.dev.sdk.Empty + 0, // 19: agones.dev.sdk.SDK.WatchGameServer:input_type -> agones.dev.sdk.Empty + 1, // 20: agones.dev.sdk.SDK.SetLabel:input_type -> agones.dev.sdk.KeyValue + 1, // 21: agones.dev.sdk.SDK.SetAnnotation:input_type -> agones.dev.sdk.KeyValue + 2, // 22: agones.dev.sdk.SDK.SetAnnotations:input_type -> agones.dev.sdk.KeyValues + 4, // 23: agones.dev.sdk.SDK.Reserve:input_type -> agones.dev.sdk.Duration + 0, // 24: agones.dev.sdk.SDK.Ready:output_type -> agones.dev.sdk.Empty + 0, // 25: agones.dev.sdk.SDK.Allocate:output_type -> agones.dev.sdk.Empty + 0, // 26: agones.dev.sdk.SDK.Shutdown:output_type -> agones.dev.sdk.Empty + 0, // 27: agones.dev.sdk.SDK.Health:output_type -> agones.dev.sdk.Empty + 5, // 28: agones.dev.sdk.SDK.GetGameServer:output_type -> agones.dev.sdk.GameServer + 5, // 29: agones.dev.sdk.SDK.WatchGameServer:output_type -> agones.dev.sdk.GameServer + 0, // 30: agones.dev.sdk.SDK.SetLabel:output_type -> agones.dev.sdk.Empty + 0, // 31: agones.dev.sdk.SDK.SetAnnotation:output_type -> agones.dev.sdk.Empty + 0, // 32: agones.dev.sdk.SDK.SetAnnotations:output_type -> agones.dev.sdk.Empty + 0, // 33: agones.dev.sdk.SDK.Reserve:output_type -> agones.dev.sdk.Empty + 24, // [24:34] is the sub-list for method output_type + 14, // [14:24] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_sdk_proto_init() } @@ -1179,7 +1292,7 @@ func file_sdk_proto_init() { } } file_sdk_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Duration); i { + switch v := v.(*KeyValues); i { case 0: return &v.state case 1: @@ -1191,7 +1304,7 @@ func file_sdk_proto_init() { } } file_sdk_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameServer); i { + switch v := v.(*Key); i { case 0: return &v.state case 1: @@ -1203,7 +1316,7 @@ func file_sdk_proto_init() { } } file_sdk_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameServer_ObjectMeta); i { + switch v := v.(*Duration); i { case 0: return &v.state case 1: @@ -1215,7 +1328,7 @@ func file_sdk_proto_init() { } } file_sdk_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameServer_Spec); i { + switch v := v.(*GameServer); i { case 0: return &v.state case 1: @@ -1227,6 +1340,30 @@ func file_sdk_proto_init() { } } file_sdk_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameServer_ObjectMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameServer_Spec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status); i { case 0: return &v.state @@ -1238,7 +1375,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Spec_Health); i { case 0: return &v.state @@ -1250,7 +1387,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status_Address); i { case 0: return &v.state @@ -1262,7 +1399,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status_Port); i { case 0: return &v.state @@ -1274,7 +1411,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status_PlayerStatus); i { case 0: return &v.state @@ -1286,7 +1423,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status_CounterStatus); i { case 0: return &v.state @@ -1298,7 +1435,7 @@ func file_sdk_proto_init() { return nil } } - file_sdk_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_sdk_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GameServer_Status_ListStatus); i { case 0: return &v.state @@ -1317,7 +1454,7 @@ func file_sdk_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sdk_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/sdk/sdk.pb.gw.go b/pkg/sdk/sdk.pb.gw.go index a5e5b65e74..8b295cb43f 100644 --- a/pkg/sdk/sdk.pb.gw.go +++ b/pkg/sdk/sdk.pb.gw.go @@ -255,6 +255,32 @@ func local_request_SDK_SetAnnotation_0(ctx context.Context, marshaler runtime.Ma } +func request_SDK_SetAnnotations_0(ctx context.Context, marshaler runtime.Marshaler, client SDKClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq KeyValues + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetAnnotations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SDK_SetAnnotations_0(ctx context.Context, marshaler runtime.Marshaler, server SDKServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq KeyValues + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetAnnotations(ctx, &protoReq) + return msg, metadata, err + +} + func request_SDK_Reserve_0(ctx context.Context, marshaler runtime.Marshaler, client SDKClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Duration var metadata runtime.ServerMetadata @@ -451,6 +477,31 @@ func RegisterSDKHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("PUT", pattern_SDK_SetAnnotations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/agones.dev.sdk.SDK/SetAnnotations", runtime.WithHTTPPathPattern("/metadata/annotations")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SDK_SetAnnotations_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SDK_SetAnnotations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_SDK_Reserve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -693,6 +744,28 @@ func RegisterSDKHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("PUT", pattern_SDK_SetAnnotations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/agones.dev.sdk.SDK/SetAnnotations", runtime.WithHTTPPathPattern("/metadata/annotations")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SDK_SetAnnotations_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SDK_SetAnnotations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_SDK_Reserve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -735,6 +808,8 @@ var ( pattern_SDK_SetAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"metadata", "annotation"}, "")) + pattern_SDK_SetAnnotations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"metadata", "annotations"}, "")) + pattern_SDK_Reserve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"reserve"}, "")) ) @@ -755,5 +830,7 @@ var ( forward_SDK_SetAnnotation_0 = runtime.ForwardResponseMessage + forward_SDK_SetAnnotations_0 = runtime.ForwardResponseMessage + forward_SDK_Reserve_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/sdk/sdk_grpc.pb.go b/pkg/sdk/sdk_grpc.pb.go index 49b917ad3e..d074261e8c 100644 --- a/pkg/sdk/sdk_grpc.pb.go +++ b/pkg/sdk/sdk_grpc.pb.go @@ -54,6 +54,8 @@ type SDKClient interface { SetLabel(ctx context.Context, in *KeyValue, opts ...grpc.CallOption) (*Empty, error) // Apply a Annotation to the backing GameServer metadata SetAnnotation(ctx context.Context, in *KeyValue, opts ...grpc.CallOption) (*Empty, error) + // Apply multiple Annotations to the backing GameServer metadata + SetAnnotations(ctx context.Context, in *KeyValues, opts ...grpc.CallOption) (*Empty, error) // Marks the GameServer as the Reserved state for Duration Reserve(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*Empty, error) } @@ -186,6 +188,15 @@ func (c *sDKClient) SetAnnotation(ctx context.Context, in *KeyValue, opts ...grp return out, nil } +func (c *sDKClient) SetAnnotations(ctx context.Context, in *KeyValues, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/agones.dev.sdk.SDK/SetAnnotations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *sDKClient) Reserve(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/agones.dev.sdk.SDK/Reserve", in, out, opts...) @@ -215,6 +226,8 @@ type SDKServer interface { SetLabel(context.Context, *KeyValue) (*Empty, error) // Apply a Annotation to the backing GameServer metadata SetAnnotation(context.Context, *KeyValue) (*Empty, error) + // Apply multiple Annotations to the backing GameServer metadata + SetAnnotations(context.Context, *KeyValues) (*Empty, error) // Marks the GameServer as the Reserved state for Duration Reserve(context.Context, *Duration) (*Empty, error) } @@ -247,6 +260,9 @@ func (UnimplementedSDKServer) SetLabel(context.Context, *KeyValue) (*Empty, erro func (UnimplementedSDKServer) SetAnnotation(context.Context, *KeyValue) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SetAnnotation not implemented") } +func (UnimplementedSDKServer) SetAnnotations(context.Context, *KeyValues) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetAnnotations not implemented") +} func (UnimplementedSDKServer) Reserve(context.Context, *Duration) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Reserve not implemented") } @@ -417,6 +433,24 @@ func _SDK_SetAnnotation_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _SDK_SetAnnotations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(KeyValues) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SDKServer).SetAnnotations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/agones.dev.sdk.SDK/SetAnnotations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SDKServer).SetAnnotations(ctx, req.(*KeyValues)) + } + return interceptor(ctx, in, info, handler) +} + func _SDK_Reserve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Duration) if err := dec(in); err != nil { @@ -466,6 +500,10 @@ var SDK_ServiceDesc = grpc.ServiceDesc{ MethodName: "SetAnnotation", Handler: _SDK_SetAnnotation_Handler, }, + { + MethodName: "SetAnnotations", + Handler: _SDK_SetAnnotations_Handler, + }, { MethodName: "Reserve", Handler: _SDK_Reserve_Handler, diff --git a/pkg/sdkserver/localsdk.go b/pkg/sdkserver/localsdk.go index 2f5a2ce4ce..50464b2e81 100644 --- a/pkg/sdkserver/localsdk.go +++ b/pkg/sdkserver/localsdk.go @@ -349,6 +349,33 @@ func (l *LocalSDKServer) SetAnnotation(_ context.Context, kv *sdk.KeyValue) (*sd return &sdk.Empty{}, nil } +// SetAnnotations applies multiple Annotations to the backing GameServer metadata +func (l *LocalSDKServer) SetAnnotations(_ context.Context, kvs *sdk.KeyValues) (*sdk.Empty, error) { + l.logger.WithField("values", kvs).Info("Setting annotations") + l.gsMutex.Lock() + defer l.gsMutex.Unlock() + + if l.gs.ObjectMeta == nil { + l.gs.ObjectMeta = &sdk.GameServer_ObjectMeta{} + } + if l.gs.ObjectMeta.Annotations == nil { + l.gs.ObjectMeta.Annotations = map[string]string{} + } + + var val strings.Builder + for _, kv := range kvs.KeyValues { + l.gs.ObjectMeta.Annotations[metadataPrefix+kv.Key] = kv.Value + + val.WriteString(kv.Key) + val.WriteString("=") + val.WriteString(kv.Value) + val.WriteString("\n") + } + l.update <- struct{}{} + l.recordRequestWithValue("setannotations", val.String(), "UID") + return &sdk.Empty{}, nil +} + // GetGameServer returns current GameServer configuration. func (l *LocalSDKServer) GetGameServer(context.Context, *sdk.Empty) (*sdk.GameServer, error) { l.logger.Info("Getting GameServer details") diff --git a/pkg/sdkserver/localsdk_test.go b/pkg/sdkserver/localsdk_test.go index d103713902..4b1385fd73 100644 --- a/pkg/sdkserver/localsdk_test.go +++ b/pkg/sdkserver/localsdk_test.go @@ -281,6 +281,84 @@ func TestLocalSDKServerSetAnnotation(t *testing.T) { } } +// nolint:dupl +func TestLocalSDKServerSetAnnotations(t *testing.T) { + t.Parallel() + + fixtures := map[string]struct { + gs *agonesv1.GameServer + }{ + "default": { + gs: nil, + }, + "no annotation": { + gs: &agonesv1.GameServer{ObjectMeta: metav1.ObjectMeta{Name: "empty"}}, + }, + "empty": { + gs: &agonesv1.GameServer{}, + }, + } + + for k, v := range fixtures { + t.Run(k, func(t *testing.T) { + ctx := context.Background() + e := &sdk.Empty{} + path, err := gsToTmpFile(v.gs) + assert.Nil(t, err) + + l, err := NewLocalSDKServer(path, "") + assert.Nil(t, err) + + kvs := &sdk.KeyValues{ + KeyValues: []*sdk.KeyValue{ + {Key: "bar", Value: "foo"}, + {Key: "baz", Value: "foobar"}, + }, + } + + stream := newGameServerMockStream() + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + defer wg.Done() + err := l.WatchGameServer(e, stream) + assert.Nil(t, err) + }() + assertInitialWatchUpdate(t, stream) + + // make sure length of l.updateObservers is at least 1 + err = wait.PollUntilContextTimeout(context.Background(), time.Second, 10*time.Second, true, func(context.Context) (bool, error) { + ret := false + l.updateObservers.Range(func(_, _ interface{}) bool { + ret = true + return false + }) + + return ret, nil + }) + assert.Nil(t, err) + + _, err = l.SetAnnotations(ctx, kvs) + assert.Nil(t, err) + + gs, err := l.GetGameServer(ctx, e) + assert.Nil(t, err) + assert.Equal(t, gs.ObjectMeta.Annotations[metadataPrefix+"bar"], "foo") + assert.Equal(t, gs.ObjectMeta.Annotations[metadataPrefix+"baz"], "foobar") + + assertWatchUpdate(t, stream, []string{"foo", "foobar"}, func(gs *sdk.GameServer) interface{} { + return []string{ + gs.ObjectMeta.Annotations[metadataPrefix+"bar"], + gs.ObjectMeta.Annotations[metadataPrefix+"baz"], + } + }) + + l.Close() + wg.Wait() + }) + } +} + func TestLocalSDKServerWatchGameServer(t *testing.T) { t.Parallel() diff --git a/pkg/sdkserver/sdkserver.go b/pkg/sdkserver/sdkserver.go index 149e7fab02..ad25e24379 100644 --- a/pkg/sdkserver/sdkserver.go +++ b/pkg/sdkserver/sdkserver.go @@ -598,6 +598,21 @@ func (s *SDKServer) SetAnnotation(_ context.Context, kv *sdk.KeyValue) (*sdk.Emp return &sdk.Empty{}, nil } +// SetAnnotations adds the Key/Values to be used to set the annotations with the metadataPrefix to the `GameServer` +// metdata +func (s *SDKServer) SetAnnotations(_ context.Context, kvs *sdk.KeyValues) (*sdk.Empty, error) { + s.logger.WithField("values", kvs).Debug("Adding SetAnnotations to queue") + + s.gsUpdateMutex.Lock() + for _, kv := range kvs.KeyValues { + s.gsAnnotations[kv.Key] = kv.Value + } + s.gsUpdateMutex.Unlock() + + s.workerqueue.Enqueue(cache.ExplicitKey(string(updateAnnotation))) + return &sdk.Empty{}, nil +} + // GetGameServer returns the current GameServer configuration and state from the backing GameServer CRD func (s *SDKServer) GetGameServer(context.Context, *sdk.Empty) (*sdk.GameServer, error) { s.logger.Debug("Received GetGameServer request") diff --git a/pkg/sdkserver/sdkserver_test.go b/pkg/sdkserver/sdkserver_test.go index b8fdaa2ca5..75aaba1881 100644 --- a/pkg/sdkserver/sdkserver_test.go +++ b/pkg/sdkserver/sdkserver_test.go @@ -140,6 +140,25 @@ func TestSidecarRun(t *testing.T) { metadataPrefix + "test-2": "annotation-2"}, }, }, + "annotations": { + f: func(sc *SDKServer, ctx context.Context) { + _, err := sc.SetAnnotations(ctx, &sdk.KeyValues{KeyValues: []*sdk.KeyValue{ + {Key: "test-1", Value: "annotation-1"}, + {Key: "test-2", Value: "annotation-2"}, + }}) + assert.Nil(t, err) + _, err = sc.SetAnnotations(ctx, &sdk.KeyValues{KeyValues: []*sdk.KeyValue{ + {Key: "test-3", Value: "annotation-3"}, + }}) + assert.Nil(t, err) + }, + expected: expected{ + annotations: map[string]string{ + metadataPrefix + "test-1": "annotation-1", + metadataPrefix + "test-2": "annotation-2", + metadataPrefix + "test-3": "annotation-3"}, + }, + }, "allocated": { f: func(sc *SDKServer, ctx context.Context) { _, err := sc.Allocate(ctx, &sdk.Empty{}) diff --git a/proto/sdk/sdk.proto b/proto/sdk/sdk.proto index 6504c64654..a933846ac0 100644 --- a/proto/sdk/sdk.proto +++ b/proto/sdk/sdk.proto @@ -91,6 +91,14 @@ service SDK { }; } + // Apply multiple Annotations to the backing GameServer metadata + rpc SetAnnotations(KeyValues) returns (Empty) { + option (google.api.http) = { + put: "/metadata/annotations" + body: "*" + }; + } + // Marks the GameServer as the Reserved state for Duration rpc Reserve(Duration) returns (Empty) { option (google.api.http) = { @@ -110,6 +118,15 @@ message KeyValue { string value = 2; } +message KeyValues { + repeated KeyValue key_values = 1; +} + +// Key entry +message Key { + string key = 1; +} + // time duration, in seconds message Duration { int64 seconds = 1; diff --git a/sdks/cpp/include/agones/sdk.grpc.pb.h b/sdks/cpp/include/agones/sdk.grpc.pb.h index 9b8ff5acf0..755ba2be8e 100644 --- a/sdks/cpp/include/agones/sdk.grpc.pb.h +++ b/sdks/cpp/include/agones/sdk.grpc.pb.h @@ -136,6 +136,14 @@ class SDK final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>> PrepareAsyncSetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>>(PrepareAsyncSetAnnotationRaw(context, request, cq)); } + // Apply multiple Annotations to the backing GameServer metadata + virtual ::grpc::Status SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::agones::dev::sdk::Empty* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>> AsyncSetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>>(AsyncSetAnnotationsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>> PrepareAsyncSetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>>(PrepareAsyncSetAnnotationsRaw(context, request, cq)); + } // Marks the GameServer as the Reserved state for Duration virtual ::grpc::Status Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::agones::dev::sdk::Empty* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>> AsyncReserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) { @@ -169,6 +177,9 @@ class SDK final { // Apply a Annotation to the backing GameServer metadata virtual void SetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response, std::function) = 0; virtual void SetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // Apply multiple Annotations to the backing GameServer metadata + virtual void SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, std::function) = 0; + virtual void SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; // Marks the GameServer as the Reserved state for Duration virtual void Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response, std::function) = 0; virtual void Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; @@ -195,6 +206,8 @@ class SDK final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* PrepareAsyncSetLabelRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* AsyncSetAnnotationRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* PrepareAsyncSetAnnotationRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* AsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* PrepareAsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* AsyncReserveRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::agones::dev::sdk::Empty>* PrepareAsyncReserveRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) = 0; }; @@ -261,6 +274,13 @@ class SDK final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>> PrepareAsyncSetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>>(PrepareAsyncSetAnnotationRaw(context, request, cq)); } + ::grpc::Status SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::agones::dev::sdk::Empty* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>> AsyncSetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>>(AsyncSetAnnotationsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>> PrepareAsyncSetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>>(PrepareAsyncSetAnnotationsRaw(context, request, cq)); + } ::grpc::Status Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::agones::dev::sdk::Empty* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>> AsyncReserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>>(AsyncReserveRaw(context, request, cq)); @@ -285,6 +305,8 @@ class SDK final { void SetLabel(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void SetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response, std::function) override; void SetAnnotation(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, std::function) override; + void SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response, std::function) override; void Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; private: @@ -316,6 +338,8 @@ class SDK final { ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* PrepareAsyncSetLabelRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* AsyncSetAnnotationRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* PrepareAsyncSetAnnotationRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValue& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* AsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* PrepareAsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* AsyncReserveRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* PrepareAsyncReserveRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_Ready_; @@ -326,6 +350,7 @@ class SDK final { const ::grpc::internal::RpcMethod rpcmethod_WatchGameServer_; const ::grpc::internal::RpcMethod rpcmethod_SetLabel_; const ::grpc::internal::RpcMethod rpcmethod_SetAnnotation_; + const ::grpc::internal::RpcMethod rpcmethod_SetAnnotations_; const ::grpc::internal::RpcMethod rpcmethod_Reserve_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -350,6 +375,8 @@ class SDK final { virtual ::grpc::Status SetLabel(::grpc::ServerContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response); // Apply a Annotation to the backing GameServer metadata virtual ::grpc::Status SetAnnotation(::grpc::ServerContext* context, const ::agones::dev::sdk::KeyValue* request, ::agones::dev::sdk::Empty* response); + // Apply multiple Annotations to the backing GameServer metadata + virtual ::grpc::Status SetAnnotations(::grpc::ServerContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response); // Marks the GameServer as the Reserved state for Duration virtual ::grpc::Status Reserve(::grpc::ServerContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response); }; @@ -514,12 +541,32 @@ class SDK final { } }; template + class WithAsyncMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SetAnnotations() { + ::grpc::Service::MarkMethodAsync(8); + } + ~WithAsyncMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSetAnnotations(::grpc::ServerContext* context, ::agones::dev::sdk::KeyValues* request, ::grpc::ServerAsyncResponseWriter< ::agones::dev::sdk::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_Reserve() { - ::grpc::Service::MarkMethodAsync(8); + ::grpc::Service::MarkMethodAsync(9); } ~WithAsyncMethod_Reserve() override { BaseClassMustBeDerivedFromService(this); @@ -530,10 +577,10 @@ class SDK final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestReserve(::grpc::ServerContext* context, ::agones::dev::sdk::Duration* request, ::grpc::ServerAsyncResponseWriter< ::agones::dev::sdk::Empty>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_Ready > > > > > > > > AsyncService; + typedef WithAsyncMethod_Ready > > > > > > > > > AsyncService; template class WithCallbackMethod_Ready : public BaseClass { private: @@ -741,18 +788,45 @@ class SDK final { ::grpc::CallbackServerContext* /*context*/, const ::agones::dev::sdk::KeyValue* /*request*/, ::agones::dev::sdk::Empty* /*response*/) { return nullptr; } }; template + class WithCallbackMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SetAnnotations() { + ::grpc::Service::MarkMethodCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty>( + [this]( + ::grpc::CallbackServerContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response) { return this->SetAnnotations(context, request, response); }));} + void SetMessageAllocatorFor_SetAnnotations( + ::grpc::MessageAllocator< ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + static_cast<::grpc::internal::CallbackUnaryHandler< ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SetAnnotations( + ::grpc::CallbackServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) { return nullptr; } + }; + template class WithCallbackMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_Reserve() { - ::grpc::Service::MarkMethodCallback(8, + ::grpc::Service::MarkMethodCallback(9, new ::grpc::internal::CallbackUnaryHandler< ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty>( [this]( ::grpc::CallbackServerContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response) { return this->Reserve(context, request, response); }));} void SetMessageAllocatorFor_Reserve( ::grpc::MessageAllocator< ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); static_cast<::grpc::internal::CallbackUnaryHandler< ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty>*>(handler) ->SetMessageAllocator(allocator); } @@ -767,7 +841,7 @@ class SDK final { virtual ::grpc::ServerUnaryReactor* Reserve( ::grpc::CallbackServerContext* /*context*/, const ::agones::dev::sdk::Duration* /*request*/, ::agones::dev::sdk::Empty* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_Ready > > > > > > > > CallbackService; + typedef WithCallbackMethod_Ready > > > > > > > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_Ready : public BaseClass { @@ -906,12 +980,29 @@ class SDK final { } }; template + class WithGenericMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SetAnnotations() { + ::grpc::Service::MarkMethodGeneric(8); + } + ~WithGenericMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithGenericMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_Reserve() { - ::grpc::Service::MarkMethodGeneric(8); + ::grpc::Service::MarkMethodGeneric(9); } ~WithGenericMethod_Reserve() override { BaseClassMustBeDerivedFromService(this); @@ -1083,12 +1174,32 @@ class SDK final { } }; template + class WithRawMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SetAnnotations() { + ::grpc::Service::MarkMethodRaw(8); + } + ~WithRawMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSetAnnotations(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_Reserve() { - ::grpc::Service::MarkMethodRaw(8); + ::grpc::Service::MarkMethodRaw(9); } ~WithRawMethod_Reserve() override { BaseClassMustBeDerivedFromService(this); @@ -1099,7 +1210,7 @@ class SDK final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestReserve(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1279,12 +1390,34 @@ class SDK final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SetAnnotations() { + ::grpc::Service::MarkMethodRawCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SetAnnotations(context, request, response); })); + } + ~WithRawCallbackMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* SetAnnotations( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithRawCallbackMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_Reserve() { - ::grpc::Service::MarkMethodRawCallback(8, + ::grpc::Service::MarkMethodRawCallback(9, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Reserve(context, request, response); })); @@ -1463,12 +1596,39 @@ class SDK final { virtual ::grpc::Status StreamedSetAnnotation(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::agones::dev::sdk::KeyValue,::agones::dev::sdk::Empty>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_SetAnnotations : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_SetAnnotations() { + ::grpc::Service::MarkMethodStreamed(8, + new ::grpc::internal::StreamedUnaryHandler< + ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty>* streamer) { + return this->StreamedSetAnnotations(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_SetAnnotations() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SetAnnotations(::grpc::ServerContext* /*context*/, const ::agones::dev::sdk::KeyValues* /*request*/, ::agones::dev::sdk::Empty* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedSetAnnotations(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::agones::dev::sdk::KeyValues,::agones::dev::sdk::Empty>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_Reserve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_Reserve() { - ::grpc::Service::MarkMethodStreamed(8, + ::grpc::Service::MarkMethodStreamed(9, new ::grpc::internal::StreamedUnaryHandler< ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty>( [this](::grpc::ServerContext* context, @@ -1489,7 +1649,7 @@ class SDK final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedReserve(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::agones::dev::sdk::Duration,::agones::dev::sdk::Empty>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_Ready > > > > > > StreamedUnaryService; + typedef WithStreamedUnaryMethod_Ready > > > > > > > StreamedUnaryService; template class WithSplitStreamingMethod_WatchGameServer : public BaseClass { private: @@ -1518,7 +1678,7 @@ class SDK final { virtual ::grpc::Status StreamedWatchGameServer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::agones::dev::sdk::Empty,::agones::dev::sdk::GameServer>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_WatchGameServer SplitStreamedService; - typedef WithStreamedUnaryMethod_Ready > > > > > > > StreamedService; + typedef WithStreamedUnaryMethod_Ready > > > > > > > > StreamedService; }; } // namespace sdk diff --git a/sdks/cpp/include/agones/sdk.pb.h b/sdks/cpp/include/agones/sdk.pb.h index f86e4ba680..ced42c3866 100644 --- a/sdks/cpp/include/agones/sdk.pb.h +++ b/sdks/cpp/include/agones/sdk.pb.h @@ -121,9 +121,15 @@ AGONES_EXPORT extern GameServer_Status_PlayerStatusDefaultTypeInternal _GameServ class GameServer_Status_Port; struct GameServer_Status_PortDefaultTypeInternal; AGONES_EXPORT extern GameServer_Status_PortDefaultTypeInternal _GameServer_Status_Port_default_instance_; +class Key; +struct KeyDefaultTypeInternal; +AGONES_EXPORT extern KeyDefaultTypeInternal _Key_default_instance_; class KeyValue; struct KeyValueDefaultTypeInternal; AGONES_EXPORT extern KeyValueDefaultTypeInternal _KeyValue_default_instance_; +class KeyValues; +struct KeyValuesDefaultTypeInternal; +AGONES_EXPORT extern KeyValuesDefaultTypeInternal _KeyValues_default_instance_; } // namespace sdk } // namespace dev } // namespace agones @@ -332,6 +338,179 @@ class AGONES_EXPORT KeyValue final : public ::google::protobuf::Message }; // ------------------------------------------------------------------- +class AGONES_EXPORT Key final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:agones.dev.sdk.Key) */ { + public: + inline Key() : Key(nullptr) {} + ~Key() override; + template + explicit PROTOBUF_CONSTEXPR Key( + ::google::protobuf::internal::ConstantInitialized); + + inline Key(const Key& from) : Key(nullptr, from) {} + inline Key(Key&& from) noexcept + : Key(nullptr, std::move(from)) {} + inline Key& operator=(const Key& from) { + CopyFrom(from); + return *this; + } + inline Key& operator=(Key&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Key& default_instance() { + return *internal_default_instance(); + } + static inline const Key* internal_default_instance() { + return reinterpret_cast( + &_Key_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + friend void swap(Key& a, Key& b) { a.Swap(&b); } + inline void Swap(Key* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Key* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Key* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Key& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Key& from) { Key::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Key* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "agones.dev.sdk.Key"; } + + protected: + explicit Key(::google::protobuf::Arena* arena); + Key(::google::protobuf::Arena* arena, const Key& from); + Key(::google::protobuf::Arena* arena, Key&& from) noexcept + : Key(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kKeyFieldNumber = 1, + }; + // string key = 1; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + + public: + // @@protoc_insertion_point(class_scope:agones.dev.sdk.Key) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 30, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr key_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_sdk_2eproto; +}; +// ------------------------------------------------------------------- + class AGONES_EXPORT GameServer_Status_Port final : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:agones.dev.sdk.GameServer.Status.Port) */ { public: @@ -387,7 +566,7 @@ class AGONES_EXPORT GameServer_Status_Port final : public ::google::protobuf::Me return reinterpret_cast( &_GameServer_Status_Port_default_instance_); } - static constexpr int kIndexInFileMessages = 9; + static constexpr int kIndexInFileMessages = 11; friend void swap(GameServer_Status_Port& a, GameServer_Status_Port& b) { a.Swap(&b); } inline void Swap(GameServer_Status_Port* other) { if (other == this) return; @@ -572,7 +751,7 @@ class AGONES_EXPORT GameServer_Status_PlayerStatus final : public ::google::prot return reinterpret_cast( &_GameServer_Status_PlayerStatus_default_instance_); } - static constexpr int kIndexInFileMessages = 10; + static constexpr int kIndexInFileMessages = 12; friend void swap(GameServer_Status_PlayerStatus& a, GameServer_Status_PlayerStatus& b) { a.Swap(&b); } inline void Swap(GameServer_Status_PlayerStatus* other) { if (other == this) return; @@ -781,7 +960,7 @@ class AGONES_EXPORT GameServer_Status_ListStatus final : public ::google::protob return reinterpret_cast( &_GameServer_Status_ListStatus_default_instance_); } - static constexpr int kIndexInFileMessages = 12; + static constexpr int kIndexInFileMessages = 14; friend void swap(GameServer_Status_ListStatus& a, GameServer_Status_ListStatus& b) { a.Swap(&b); } inline void Swap(GameServer_Status_ListStatus* other) { if (other == this) return; @@ -978,7 +1157,7 @@ class AGONES_EXPORT GameServer_Status_CounterStatus final : public ::google::pro return reinterpret_cast( &_GameServer_Status_CounterStatus_default_instance_); } - static constexpr int kIndexInFileMessages = 11; + static constexpr int kIndexInFileMessages = 13; friend void swap(GameServer_Status_CounterStatus& a, GameServer_Status_CounterStatus& b) { a.Swap(&b); } inline void Swap(GameServer_Status_CounterStatus* other) { if (other == this) return; @@ -1157,7 +1336,7 @@ class AGONES_EXPORT GameServer_Status_Address final : public ::google::protobuf: return reinterpret_cast( &_GameServer_Status_Address_default_instance_); } - static constexpr int kIndexInFileMessages = 8; + static constexpr int kIndexInFileMessages = 10; friend void swap(GameServer_Status_Address& a, GameServer_Status_Address& b) { a.Swap(&b); } inline void Swap(GameServer_Status_Address* other) { if (other == this) return; @@ -1348,7 +1527,7 @@ class AGONES_EXPORT GameServer_Spec_Health final : public ::google::protobuf::Me return reinterpret_cast( &_GameServer_Spec_Health_default_instance_); } - static constexpr int kIndexInFileMessages = 6; + static constexpr int kIndexInFileMessages = 8; friend void swap(GameServer_Spec_Health& a, GameServer_Spec_Health& b) { a.Swap(&b); } inline void Swap(GameServer_Spec_Health* other) { if (other == this) return; @@ -1739,7 +1918,7 @@ class AGONES_EXPORT Duration final : public ::google::protobuf::Message return reinterpret_cast( &_Duration_default_instance_); } - static constexpr int kIndexInFileMessages = 2; + static constexpr int kIndexInFileMessages = 4; friend void swap(Duration& a, Duration& b) { a.Swap(&b); } inline void Swap(Duration* other) { if (other == this) return; @@ -1851,6 +2030,180 @@ class AGONES_EXPORT Duration final : public ::google::protobuf::Message }; // ------------------------------------------------------------------- +class AGONES_EXPORT KeyValues final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:agones.dev.sdk.KeyValues) */ { + public: + inline KeyValues() : KeyValues(nullptr) {} + ~KeyValues() override; + template + explicit PROTOBUF_CONSTEXPR KeyValues( + ::google::protobuf::internal::ConstantInitialized); + + inline KeyValues(const KeyValues& from) : KeyValues(nullptr, from) {} + inline KeyValues(KeyValues&& from) noexcept + : KeyValues(nullptr, std::move(from)) {} + inline KeyValues& operator=(const KeyValues& from) { + CopyFrom(from); + return *this; + } + inline KeyValues& operator=(KeyValues&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeyValues& default_instance() { + return *internal_default_instance(); + } + static inline const KeyValues* internal_default_instance() { + return reinterpret_cast( + &_KeyValues_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(KeyValues& a, KeyValues& b) { a.Swap(&b); } + inline void Swap(KeyValues* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeyValues* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeyValues* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const KeyValues& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const KeyValues& from) { KeyValues::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(KeyValues* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "agones.dev.sdk.KeyValues"; } + + protected: + explicit KeyValues(::google::protobuf::Arena* arena); + KeyValues(::google::protobuf::Arena* arena, const KeyValues& from); + KeyValues(::google::protobuf::Arena* arena, KeyValues&& from) noexcept + : KeyValues(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; + + public: + ::google::protobuf::Metadata GetMetadata() const final; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kKeyValuesFieldNumber = 1, + }; + // repeated .agones.dev.sdk.KeyValue key_values = 1; + int key_values_size() const; + private: + int _internal_key_values_size() const; + + public: + void clear_key_values() ; + ::agones::dev::sdk::KeyValue* mutable_key_values(int index); + ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>* mutable_key_values(); + + private: + const ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>& _internal_key_values() const; + ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>* _internal_mutable_key_values(); + public: + const ::agones::dev::sdk::KeyValue& key_values(int index) const; + ::agones::dev::sdk::KeyValue* add_key_values(); + const ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>& key_values() const; + // @@protoc_insertion_point(class_scope:agones.dev.sdk.KeyValues) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField< ::agones::dev::sdk::KeyValue > key_values_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_sdk_2eproto; +}; +// ------------------------------------------------------------------- + class GameServer_Status_ListsEntry_DoNotUse final : public ::google::protobuf::internal::MapEntry< GameServer_Status_ListsEntry_DoNotUse, std::string, ::agones::dev::sdk::GameServer_Status_ListStatus, @@ -1962,7 +2315,7 @@ class AGONES_EXPORT GameServer_Spec final : public ::google::protobuf::Message return reinterpret_cast( &_GameServer_Spec_default_instance_); } - static constexpr int kIndexInFileMessages = 7; + static constexpr int kIndexInFileMessages = 9; friend void swap(GameServer_Spec& a, GameServer_Spec& b) { a.Swap(&b); } inline void Swap(GameServer_Spec* other) { if (other == this) return; @@ -2136,7 +2489,7 @@ class AGONES_EXPORT GameServer_ObjectMeta final : public ::google::protobuf::Mes return reinterpret_cast( &_GameServer_ObjectMeta_default_instance_); } - static constexpr int kIndexInFileMessages = 5; + static constexpr int kIndexInFileMessages = 7; friend void swap(GameServer_ObjectMeta& a, GameServer_ObjectMeta& b) { a.Swap(&b); } inline void Swap(GameServer_ObjectMeta* other) { if (other == this) return; @@ -2439,7 +2792,7 @@ class AGONES_EXPORT GameServer_Status final : public ::google::protobuf::Message return reinterpret_cast( &_GameServer_Status_default_instance_); } - static constexpr int kIndexInFileMessages = 15; + static constexpr int kIndexInFileMessages = 17; friend void swap(GameServer_Status& a, GameServer_Status& b) { a.Swap(&b); } inline void Swap(GameServer_Status* other) { if (other == this) return; @@ -2731,7 +3084,7 @@ class AGONES_EXPORT GameServer final : public ::google::protobuf::Message return reinterpret_cast( &_GameServer_default_instance_); } - static constexpr int kIndexInFileMessages = 16; + static constexpr int kIndexInFileMessages = 18; friend void swap(GameServer& a, GameServer& b) { a.Swap(&b); } inline void Swap(GameServer* other) { if (other == this) return; @@ -3007,6 +3360,113 @@ inline void KeyValue::set_allocated_value(std::string* value) { // ------------------------------------------------------------------- +// KeyValues + +// repeated .agones.dev.sdk.KeyValue key_values = 1; +inline int KeyValues::_internal_key_values_size() const { + return _internal_key_values().size(); +} +inline int KeyValues::key_values_size() const { + return _internal_key_values_size(); +} +inline void KeyValues::clear_key_values() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_values_.Clear(); +} +inline ::agones::dev::sdk::KeyValue* KeyValues::mutable_key_values(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:agones.dev.sdk.KeyValues.key_values) + return _internal_mutable_key_values()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>* KeyValues::mutable_key_values() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:agones.dev.sdk.KeyValues.key_values) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_key_values(); +} +inline const ::agones::dev::sdk::KeyValue& KeyValues::key_values(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:agones.dev.sdk.KeyValues.key_values) + return _internal_key_values().Get(index); +} +inline ::agones::dev::sdk::KeyValue* KeyValues::add_key_values() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::agones::dev::sdk::KeyValue* _add = _internal_mutable_key_values()->Add(); + // @@protoc_insertion_point(field_add:agones.dev.sdk.KeyValues.key_values) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>& KeyValues::key_values() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:agones.dev.sdk.KeyValues.key_values) + return _internal_key_values(); +} +inline const ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>& +KeyValues::_internal_key_values() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.key_values_; +} +inline ::google::protobuf::RepeatedPtrField<::agones::dev::sdk::KeyValue>* +KeyValues::_internal_mutable_key_values() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.key_values_; +} + +// ------------------------------------------------------------------- + +// Key + +// string key = 1; +inline void Key::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.ClearToEmpty(); +} +inline const std::string& Key::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:agones.dev.sdk.Key.key) + return _internal_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Key::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:agones.dev.sdk.Key.key) +} +inline std::string* Key::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:agones.dev.sdk.Key.key) + return _s; +} +inline const std::string& Key::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.key_.Get(); +} +inline void Key::_internal_set_key(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.Set(value, GetArena()); +} +inline std::string* Key::_internal_mutable_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _impl_.key_.Mutable( GetArena()); +} +inline std::string* Key::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:agones.dev.sdk.Key.key) + return _impl_.key_.Release(); +} +inline void Key::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:agones.dev.sdk.Key.key) +} + +// ------------------------------------------------------------------- + // Duration // int64 seconds = 1; diff --git a/sdks/cpp/src/agones/sdk.grpc.pb.cc b/sdks/cpp/src/agones/sdk.grpc.pb.cc index 57ff3a8ac7..f8cbbd47e5 100644 --- a/sdks/cpp/src/agones/sdk.grpc.pb.cc +++ b/sdks/cpp/src/agones/sdk.grpc.pb.cc @@ -47,6 +47,7 @@ static const char* SDK_method_names[] = { "/agones.dev.sdk.SDK/WatchGameServer", "/agones.dev.sdk.SDK/SetLabel", "/agones.dev.sdk.SDK/SetAnnotation", + "/agones.dev.sdk.SDK/SetAnnotations", "/agones.dev.sdk.SDK/Reserve", }; @@ -65,7 +66,8 @@ SDK::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const , rpcmethod_WatchGameServer_(SDK_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) , rpcmethod_SetLabel_(SDK_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_SetAnnotation_(SDK_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_Reserve_(SDK_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_SetAnnotations_(SDK_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Reserve_(SDK_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status SDK::Stub::Ready(::grpc::ClientContext* context, const ::agones::dev::sdk::Empty& request, ::agones::dev::sdk::Empty* response) { @@ -238,6 +240,29 @@ ::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* SDK::Stub::AsyncS return result; } +::grpc::Status SDK::Stub::SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::agones::dev::sdk::Empty* response) { + return ::grpc::internal::BlockingUnaryCall< ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SetAnnotations_, context, request, response); +} + +void SDK::Stub::async::SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetAnnotations_, context, request, response, std::move(f)); +} + +void SDK::Stub::async::SetAnnotations(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SetAnnotations_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* SDK::Stub::PrepareAsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::agones::dev::sdk::Empty, ::agones::dev::sdk::KeyValues, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SetAnnotations_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::agones::dev::sdk::Empty>* SDK::Stub::AsyncSetAnnotationsRaw(::grpc::ClientContext* context, const ::agones::dev::sdk::KeyValues& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncSetAnnotationsRaw(context, request, cq); + result->StartCall(); + return result; +} + ::grpc::Status SDK::Stub::Reserve(::grpc::ClientContext* context, const ::agones::dev::sdk::Duration& request, ::agones::dev::sdk::Empty* response) { return ::grpc::internal::BlockingUnaryCall< ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Reserve_, context, request, response); } @@ -345,6 +370,16 @@ SDK::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( SDK_method_names[8], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< SDK::Service, ::agones::dev::sdk::KeyValues, ::agones::dev::sdk::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](SDK::Service* service, + ::grpc::ServerContext* ctx, + const ::agones::dev::sdk::KeyValues* req, + ::agones::dev::sdk::Empty* resp) { + return service->SetAnnotations(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + SDK_method_names[9], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< SDK::Service, ::agones::dev::sdk::Duration, ::agones::dev::sdk::Empty, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](SDK::Service* service, ::grpc::ServerContext* ctx, @@ -413,6 +448,13 @@ ::grpc::Status SDK::Service::SetAnnotation(::grpc::ServerContext* context, const return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status SDK::Service::SetAnnotations(::grpc::ServerContext* context, const ::agones::dev::sdk::KeyValues* request, ::agones::dev::sdk::Empty* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + ::grpc::Status SDK::Service::Reserve(::grpc::ServerContext* context, const ::agones::dev::sdk::Duration* request, ::agones::dev::sdk::Empty* response) { (void) context; (void) request; diff --git a/sdks/cpp/src/agones/sdk.pb.cc b/sdks/cpp/src/agones/sdk.pb.cc index 915421ea71..3abf6daad5 100644 --- a/sdks/cpp/src/agones/sdk.pb.cc +++ b/sdks/cpp/src/agones/sdk.pb.cc @@ -64,6 +64,27 @@ struct KeyValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AGONES_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueDefaultTypeInternal _KeyValue_default_instance_; +inline constexpr Key::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Key::Key(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct KeyDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyDefaultTypeInternal() {} + union { + Key _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AGONES_EXPORT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyDefaultTypeInternal _Key_default_instance_; + inline constexpr GameServer_Status_Port::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : name_( @@ -247,6 +268,25 @@ struct DurationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AGONES_EXPORT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DurationDefaultTypeInternal _Duration_default_instance_; + +inline constexpr KeyValues::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : key_values_{}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR KeyValues::KeyValues(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct KeyValuesDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyValuesDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyValuesDefaultTypeInternal() {} + union { + KeyValues _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AGONES_EXPORT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValuesDefaultTypeInternal _KeyValues_default_instance_; template PROTOBUF_CONSTEXPR GameServer_Status_ListsEntry_DoNotUse::GameServer_Status_ListsEntry_DoNotUse(::_pbi::ConstantInitialized) {} struct GameServer_Status_ListsEntry_DoNotUseDefaultTypeInternal { @@ -378,7 +418,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AGONES_EXPORT } // namespace sdk } // namespace dev } // namespace agones -static ::_pb::Metadata file_level_metadata_sdk_2eproto[17]; +static ::_pb::Metadata file_level_metadata_sdk_2eproto[19]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_sdk_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -405,6 +445,24 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::KeyValue, _impl_.key_), PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::KeyValue, _impl_.value_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::KeyValues, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::KeyValues, _impl_.key_values_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::Key, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::Key, _impl_.key_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::agones::dev::sdk::Duration, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -593,25 +651,29 @@ static const ::_pbi::MigrationSchema schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, -1, -1, sizeof(::agones::dev::sdk::Empty)}, {8, -1, -1, sizeof(::agones::dev::sdk::KeyValue)}, - {18, -1, -1, sizeof(::agones::dev::sdk::Duration)}, - {27, 37, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta_AnnotationsEntry_DoNotUse)}, - {39, 49, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta_LabelsEntry_DoNotUse)}, - {51, -1, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta)}, - {68, -1, -1, sizeof(::agones::dev::sdk::GameServer_Spec_Health)}, - {80, 89, -1, sizeof(::agones::dev::sdk::GameServer_Spec)}, - {90, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_Address)}, - {100, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_Port)}, - {110, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_PlayerStatus)}, - {121, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_CounterStatus)}, - {131, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_ListStatus)}, - {141, 151, -1, sizeof(::agones::dev::sdk::GameServer_Status_CountersEntry_DoNotUse)}, - {153, 163, -1, sizeof(::agones::dev::sdk::GameServer_Status_ListsEntry_DoNotUse)}, - {165, 180, -1, sizeof(::agones::dev::sdk::GameServer_Status)}, - {187, 198, -1, sizeof(::agones::dev::sdk::GameServer)}, + {18, -1, -1, sizeof(::agones::dev::sdk::KeyValues)}, + {27, -1, -1, sizeof(::agones::dev::sdk::Key)}, + {36, -1, -1, sizeof(::agones::dev::sdk::Duration)}, + {45, 55, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta_AnnotationsEntry_DoNotUse)}, + {57, 67, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta_LabelsEntry_DoNotUse)}, + {69, -1, -1, sizeof(::agones::dev::sdk::GameServer_ObjectMeta)}, + {86, -1, -1, sizeof(::agones::dev::sdk::GameServer_Spec_Health)}, + {98, 107, -1, sizeof(::agones::dev::sdk::GameServer_Spec)}, + {108, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_Address)}, + {118, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_Port)}, + {128, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_PlayerStatus)}, + {139, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_CounterStatus)}, + {149, -1, -1, sizeof(::agones::dev::sdk::GameServer_Status_ListStatus)}, + {159, 169, -1, sizeof(::agones::dev::sdk::GameServer_Status_CountersEntry_DoNotUse)}, + {171, 181, -1, sizeof(::agones::dev::sdk::GameServer_Status_ListsEntry_DoNotUse)}, + {183, 198, -1, sizeof(::agones::dev::sdk::GameServer_Status)}, + {205, 216, -1, sizeof(::agones::dev::sdk::GameServer)}, }; static const ::_pb::Message* const file_default_instances[] = { &::agones::dev::sdk::_Empty_default_instance_._instance, &::agones::dev::sdk::_KeyValue_default_instance_._instance, + &::agones::dev::sdk::_KeyValues_default_instance_._instance, + &::agones::dev::sdk::_Key_default_instance_._instance, &::agones::dev::sdk::_Duration_default_instance_._instance, &::agones::dev::sdk::_GameServer_ObjectMeta_AnnotationsEntry_DoNotUse_default_instance_._instance, &::agones::dev::sdk::_GameServer_ObjectMeta_LabelsEntry_DoNotUse_default_instance_._instance, @@ -633,68 +695,73 @@ const char descriptor_table_protodef_sdk_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIAB "\n\tsdk.proto\022\016agones.dev.sdk\032\034google/api/" "annotations.proto\032.protoc-gen-openapiv2/" "options/annotations.proto\"\007\n\005Empty\"&\n\010Ke" - "yValue\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\033\n\010Du" - "ration\022\017\n\007seconds\030\001 \001(\003\"\213\014\n\nGameServer\022:" - "\n\013object_meta\030\001 \001(\0132%.agones.dev.sdk.Gam" - "eServer.ObjectMeta\022-\n\004spec\030\002 \001(\0132\037.agone" - "s.dev.sdk.GameServer.Spec\0221\n\006status\030\003 \001(" - "\0132!.agones.dev.sdk.GameServer.Status\032\223\003\n" - "\nObjectMeta\022\014\n\004name\030\001 \001(\t\022\021\n\tnamespace\030\002" - " \001(\t\022\013\n\003uid\030\003 \001(\t\022\030\n\020resource_version\030\004 " - "\001(\t\022\022\n\ngeneration\030\005 \001(\003\022\032\n\022creation_time" - "stamp\030\006 \001(\003\022\032\n\022deletion_timestamp\030\007 \001(\003\022" - "K\n\013annotations\030\010 \003(\01326.agones.dev.sdk.Ga" - "meServer.ObjectMeta.AnnotationsEntry\022A\n\006" - "labels\030\t \003(\01321.agones.dev.sdk.GameServer" - ".ObjectMeta.LabelsEntry\0322\n\020AnnotationsEn" - "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013L" - "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - "8\001\032\273\001\n\004Spec\0226\n\006health\030\001 \001(\0132&.agones.dev" - ".sdk.GameServer.Spec.Health\032{\n\006Health\022\037\n" - "\010disabled\030\001 \001(\010B\r\222A\n\242\002\007boolean\022\026\n\016period" - "_seconds\030\002 \001(\005\022\031\n\021failure_threshold\030\003 \001(" - "\005\022\035\n\025initial_delay_seconds\030\004 \001(\005\032\212\006\n\006Sta" - "tus\022\r\n\005state\030\001 \001(\t\022\017\n\007address\030\002 \001(\t\022<\n\ta" - "ddresses\030\007 \003(\0132).agones.dev.sdk.GameServ" - "er.Status.Address\0225\n\005ports\030\003 \003(\0132&.agone" - "s.dev.sdk.GameServer.Status.Port\022\?\n\007play" - "ers\030\004 \001(\0132..agones.dev.sdk.GameServer.St" - "atus.PlayerStatus\022A\n\010counters\030\005 \003(\0132/.ag" - "ones.dev.sdk.GameServer.Status.CountersE" - "ntry\022;\n\005lists\030\006 \003(\0132,.agones.dev.sdk.Gam" - "eServer.Status.ListsEntry\032(\n\007Address\022\014\n\004" - "type\030\001 \001(\t\022\017\n\007address\030\002 \001(\t\032\"\n\004Port\022\014\n\004n" - "ame\030\001 \001(\t\022\014\n\004port\030\002 \001(\005\032<\n\014PlayerStatus\022" - "\r\n\005count\030\001 \001(\003\022\020\n\010capacity\030\002 \001(\003\022\013\n\003ids\030" - "\003 \003(\t\0320\n\rCounterStatus\022\r\n\005count\030\001 \001(\003\022\020\n" - "\010capacity\030\002 \001(\003\032.\n\nListStatus\022\020\n\010capacit" - "y\030\001 \001(\003\022\016\n\006values\030\002 \003(\t\032`\n\rCountersEntry" - "\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.agones.de" - "v.sdk.GameServer.Status.CounterStatus:\0028" - "\001\032Z\n\nListsEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 " - "\001(\0132,.agones.dev.sdk.GameServer.Status.L" - "istStatus:\0028\0012\206\006\n\003SDK\022H\n\005Ready\022\025.agones." - "dev.sdk.Empty\032\025.agones.dev.sdk.Empty\"\021\202\323" - "\344\223\002\013\"\006/ready:\001*\022N\n\010Allocate\022\025.agones.dev" - ".sdk.Empty\032\025.agones.dev.sdk.Empty\"\024\202\323\344\223\002" - "\016\"\t/allocate:\001*\022N\n\010Shutdown\022\025.agones.dev" - ".sdk.Empty\032\025.agones.dev.sdk.Empty\"\024\202\323\344\223\002" - "\016\"\t/shutdown:\001*\022L\n\006Health\022\025.agones.dev.s" - "dk.Empty\032\025.agones.dev.sdk.Empty\"\022\202\323\344\223\002\014\"" - "\007/health:\001*(\001\022W\n\rGetGameServer\022\025.agones." - "dev.sdk.Empty\032\032.agones.dev.sdk.GameServe" - "r\"\023\202\323\344\223\002\r\022\013/gameserver\022a\n\017WatchGameServe" - "r\022\025.agones.dev.sdk.Empty\032\032.agones.dev.sd" - "k.GameServer\"\031\202\323\344\223\002\023\022\021/watch/gameserver0" - "\001\022W\n\010SetLabel\022\030.agones.dev.sdk.KeyValue\032" - "\025.agones.dev.sdk.Empty\"\032\202\323\344\223\002\024\032\017/metadat" - "a/label:\001*\022a\n\rSetAnnotation\022\030.agones.dev" - ".sdk.KeyValue\032\025.agones.dev.sdk.Empty\"\037\202\323" - "\344\223\002\031\032\024/metadata/annotation:\001*\022O\n\007Reserve" - "\022\030.agones.dev.sdk.Duration\032\025.agones.dev." - "sdk.Empty\"\023\202\323\344\223\002\r\"\010/reserve:\001*BOZ\005./sdk\222" - "AE\022\034\n\tsdk.proto2\017version not set*\001\0012\020app" - "lication/json:\020application/jsonb\006proto3" + "yValue\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"9\n\tKe" + "yValues\022,\n\nkey_values\030\001 \003(\0132\030.agones.dev" + ".sdk.KeyValue\"\022\n\003Key\022\013\n\003key\030\001 \001(\t\"\033\n\010Dur" + "ation\022\017\n\007seconds\030\001 \001(\003\"\213\014\n\nGameServer\022:\n" + "\013object_meta\030\001 \001(\0132%.agones.dev.sdk.Game" + "Server.ObjectMeta\022-\n\004spec\030\002 \001(\0132\037.agones" + ".dev.sdk.GameServer.Spec\0221\n\006status\030\003 \001(\013" + "2!.agones.dev.sdk.GameServer.Status\032\223\003\n\n" + "ObjectMeta\022\014\n\004name\030\001 \001(\t\022\021\n\tnamespace\030\002 " + "\001(\t\022\013\n\003uid\030\003 \001(\t\022\030\n\020resource_version\030\004 \001" + "(\t\022\022\n\ngeneration\030\005 \001(\003\022\032\n\022creation_times" + "tamp\030\006 \001(\003\022\032\n\022deletion_timestamp\030\007 \001(\003\022K" + "\n\013annotations\030\010 \003(\01326.agones.dev.sdk.Gam" + "eServer.ObjectMeta.AnnotationsEntry\022A\n\006l" + "abels\030\t \003(\01321.agones.dev.sdk.GameServer." + "ObjectMeta.LabelsEntry\0322\n\020AnnotationsEnt" + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013La" + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + "\001\032\273\001\n\004Spec\0226\n\006health\030\001 \001(\0132&.agones.dev." + "sdk.GameServer.Spec.Health\032{\n\006Health\022\037\n\010" + "disabled\030\001 \001(\010B\r\222A\n\242\002\007boolean\022\026\n\016period_" + "seconds\030\002 \001(\005\022\031\n\021failure_threshold\030\003 \001(\005" + "\022\035\n\025initial_delay_seconds\030\004 \001(\005\032\212\006\n\006Stat" + "us\022\r\n\005state\030\001 \001(\t\022\017\n\007address\030\002 \001(\t\022<\n\tad" + "dresses\030\007 \003(\0132).agones.dev.sdk.GameServe" + "r.Status.Address\0225\n\005ports\030\003 \003(\0132&.agones" + ".dev.sdk.GameServer.Status.Port\022\?\n\007playe" + "rs\030\004 \001(\0132..agones.dev.sdk.GameServer.Sta" + "tus.PlayerStatus\022A\n\010counters\030\005 \003(\0132/.ago" + "nes.dev.sdk.GameServer.Status.CountersEn" + "try\022;\n\005lists\030\006 \003(\0132,.agones.dev.sdk.Game" + "Server.Status.ListsEntry\032(\n\007Address\022\014\n\004t" + "ype\030\001 \001(\t\022\017\n\007address\030\002 \001(\t\032\"\n\004Port\022\014\n\004na" + "me\030\001 \001(\t\022\014\n\004port\030\002 \001(\005\032<\n\014PlayerStatus\022\r" + "\n\005count\030\001 \001(\003\022\020\n\010capacity\030\002 \001(\003\022\013\n\003ids\030\003" + " \003(\t\0320\n\rCounterStatus\022\r\n\005count\030\001 \001(\003\022\020\n\010" + "capacity\030\002 \001(\003\032.\n\nListStatus\022\020\n\010capacity" + "\030\001 \001(\003\022\016\n\006values\030\002 \003(\t\032`\n\rCountersEntry\022" + "\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.agones.dev" + ".sdk.GameServer.Status.CounterStatus:\0028\001" + "\032Z\n\nListsEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001" + "(\0132,.agones.dev.sdk.GameServer.Status.Li" + "stStatus:\0028\0012\354\006\n\003SDK\022H\n\005Ready\022\025.agones.d" + "ev.sdk.Empty\032\025.agones.dev.sdk.Empty\"\021\202\323\344" + "\223\002\013\"\006/ready:\001*\022N\n\010Allocate\022\025.agones.dev." + "sdk.Empty\032\025.agones.dev.sdk.Empty\"\024\202\323\344\223\002\016" + "\"\t/allocate:\001*\022N\n\010Shutdown\022\025.agones.dev." + "sdk.Empty\032\025.agones.dev.sdk.Empty\"\024\202\323\344\223\002\016" + "\"\t/shutdown:\001*\022L\n\006Health\022\025.agones.dev.sd" + "k.Empty\032\025.agones.dev.sdk.Empty\"\022\202\323\344\223\002\014\"\007" + "/health:\001*(\001\022W\n\rGetGameServer\022\025.agones.d" + "ev.sdk.Empty\032\032.agones.dev.sdk.GameServer" + "\"\023\202\323\344\223\002\r\022\013/gameserver\022a\n\017WatchGameServer" + "\022\025.agones.dev.sdk.Empty\032\032.agones.dev.sdk" + ".GameServer\"\031\202\323\344\223\002\023\022\021/watch/gameserver0\001" + "\022W\n\010SetLabel\022\030.agones.dev.sdk.KeyValue\032\025" + ".agones.dev.sdk.Empty\"\032\202\323\344\223\002\024\032\017/metadata" + "/label:\001*\022a\n\rSetAnnotation\022\030.agones.dev." + "sdk.KeyValue\032\025.agones.dev.sdk.Empty\"\037\202\323\344" + "\223\002\031\032\024/metadata/annotation:\001*\022d\n\016SetAnnot" + "ations\022\031.agones.dev.sdk.KeyValues\032\025.agon" + "es.dev.sdk.Empty\" \202\323\344\223\002\032\032\025/metadata/anno" + "tations:\001*\022O\n\007Reserve\022\030.agones.dev.sdk.D" + "uration\032\025.agones.dev.sdk.Empty\"\023\202\323\344\223\002\r\"\010" + "/reserve:\001*BOZ\005./sdk\222AE\022\034\n\tsdk.proto2\017ve" + "rsion not set*\001\0012\020application/json:\020appl" + "ication/jsonb\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_sdk_2eproto_deps[2] = { @@ -705,13 +772,13 @@ static ::absl::once_flag descriptor_table_sdk_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_sdk_2eproto = { false, false, - 2599, + 2780, descriptor_table_protodef_sdk_2eproto, "sdk.proto", &descriptor_table_sdk_2eproto_once, descriptor_table_sdk_2eproto_deps, 2, - 17, + 19, schemas, file_default_instances, TableStruct_sdk_2eproto::offsets, @@ -1000,6 +1067,395 @@ ::google::protobuf::Metadata KeyValue::GetMetadata() const { } // =================================================================== +class KeyValues::_Internal { + public: +}; + +KeyValues::KeyValues(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:agones.dev.sdk.KeyValues) +} +inline PROTOBUF_NDEBUG_INLINE KeyValues::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : key_values_{visibility, arena, from.key_values_}, + _cached_size_{0} {} + +KeyValues::KeyValues( + ::google::protobuf::Arena* arena, + const KeyValues& from) + : ::google::protobuf::Message(arena) { + KeyValues* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + + // @@protoc_insertion_point(copy_constructor:agones.dev.sdk.KeyValues) +} +inline PROTOBUF_NDEBUG_INLINE KeyValues::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : key_values_{visibility, arena}, + _cached_size_{0} {} + +inline void KeyValues::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +KeyValues::~KeyValues() { + // @@protoc_insertion_point(destructor:agones.dev.sdk.KeyValues) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void KeyValues::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +KeyValues::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // OnDemandRegisterArenaDtor + PROTOBUF_FIELD_OFFSET(KeyValues, _impl_._cached_size_), + false, + }, + &KeyValues::MergeImpl, + &KeyValues::kDescriptorMethods, + }; + return &_data_; +} +PROTOBUF_NOINLINE void KeyValues::Clear() { +// @@protoc_insertion_point(message_clear_start:agones.dev.sdk.KeyValues) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.key_values_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* KeyValues::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> KeyValues::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_KeyValues_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::agones::dev::sdk::KeyValues>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .agones.dev.sdk.KeyValue key_values = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(KeyValues, _impl_.key_values_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .agones.dev.sdk.KeyValue key_values = 1; + {PROTOBUF_FIELD_OFFSET(KeyValues, _impl_.key_values_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::agones::dev::sdk::KeyValue>()}, + }}, {{ + }}, +}; + +::uint8_t* KeyValues::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:agones.dev.sdk.KeyValues) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .agones.dev.sdk.KeyValue key_values = 1; + for (unsigned i = 0, n = static_cast( + this->_internal_key_values_size()); + i < n; i++) { + const auto& repfield = this->_internal_key_values().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:agones.dev.sdk.KeyValues) + return target; +} + +::size_t KeyValues::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:agones.dev.sdk.KeyValues) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .agones.dev.sdk.KeyValue key_values = 1; + total_size += 1UL * this->_internal_key_values_size(); + for (const auto& msg : this->_internal_key_values()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void KeyValues::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:agones.dev.sdk.KeyValues) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_key_values()->MergeFrom( + from._internal_key_values()); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void KeyValues::CopyFrom(const KeyValues& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:agones.dev.sdk.KeyValues) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool KeyValues::IsInitialized() const { + return true; +} + +void KeyValues::InternalSwap(KeyValues* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.key_values_.InternalSwap(&other->_impl_.key_values_); +} + +::google::protobuf::Metadata KeyValues::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, + &descriptor_table_sdk_2eproto_once, + file_level_metadata_sdk_2eproto[2]); +} +// =================================================================== + +class Key::_Internal { + public: +}; + +Key::Key(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:agones.dev.sdk.Key) +} +inline PROTOBUF_NDEBUG_INLINE Key::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : key_(arena, from.key_), + _cached_size_{0} {} + +Key::Key( + ::google::protobuf::Arena* arena, + const Key& from) + : ::google::protobuf::Message(arena) { + Key* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + + // @@protoc_insertion_point(copy_constructor:agones.dev.sdk.Key) +} +inline PROTOBUF_NDEBUG_INLINE Key::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : key_(arena), + _cached_size_{0} {} + +inline void Key::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Key::~Key() { + // @@protoc_insertion_point(destructor:agones.dev.sdk.Key) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Key::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.key_.Destroy(); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Key::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // OnDemandRegisterArenaDtor + PROTOBUF_FIELD_OFFSET(Key, _impl_._cached_size_), + false, + }, + &Key::MergeImpl, + &Key::kDescriptorMethods, + }; + return &_data_; +} +PROTOBUF_NOINLINE void Key::Clear() { +// @@protoc_insertion_point(message_clear_start:agones.dev.sdk.Key) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.key_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Key::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 30, 2> Key::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Key_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::agones::dev::sdk::Key>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // string key = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Key, _impl_.key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string key = 1; + {PROTOBUF_FIELD_OFFSET(Key, _impl_.key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\22\3\0\0\0\0\0\0" + "agones.dev.sdk.Key" + "key" + }}, +}; + +::uint8_t* Key::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:agones.dev.sdk.Key) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + const std::string& _s = this->_internal_key(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "agones.dev.sdk.Key.key"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:agones.dev.sdk.Key) + return target; +} + +::size_t Key::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:agones.dev.sdk.Key) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string key = 1; + if (!this->_internal_key().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_key()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Key::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:agones.dev.sdk.Key) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_key().empty()) { + _this->_internal_set_key(from._internal_key()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Key::CopyFrom(const Key& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:agones.dev.sdk.Key) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool Key::IsInitialized() const { + return true; +} + +void Key::InternalSwap(Key* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); +} + +::google::protobuf::Metadata Key::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, + &descriptor_table_sdk_2eproto_once, + file_level_metadata_sdk_2eproto[3]); +} +// =================================================================== + class Duration::_Internal { public: }; @@ -1173,7 +1629,7 @@ void Duration::InternalSwap(Duration* PROTOBUF_RESTRICT other) { ::google::protobuf::Metadata Duration::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[2]); + file_level_metadata_sdk_2eproto[4]); } // =================================================================== @@ -1183,7 +1639,7 @@ GameServer_ObjectMeta_AnnotationsEntry_DoNotUse::GameServer_ObjectMeta_Annotatio ::google::protobuf::Metadata GameServer_ObjectMeta_AnnotationsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[3]); + file_level_metadata_sdk_2eproto[5]); } // =================================================================== @@ -1193,7 +1649,7 @@ GameServer_ObjectMeta_LabelsEntry_DoNotUse::GameServer_ObjectMeta_LabelsEntry_Do ::google::protobuf::Metadata GameServer_ObjectMeta_LabelsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[4]); + file_level_metadata_sdk_2eproto[6]); } // =================================================================== @@ -1671,7 +2127,7 @@ void GameServer_ObjectMeta::InternalSwap(GameServer_ObjectMeta* PROTOBUF_RESTRIC ::google::protobuf::Metadata GameServer_ObjectMeta::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[5]); + file_level_metadata_sdk_2eproto[7]); } // =================================================================== @@ -1925,7 +2381,7 @@ void GameServer_Spec_Health::InternalSwap(GameServer_Spec_Health* PROTOBUF_RESTR ::google::protobuf::Metadata GameServer_Spec_Health::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[6]); + file_level_metadata_sdk_2eproto[8]); } // =================================================================== @@ -2139,7 +2595,7 @@ void GameServer_Spec::InternalSwap(GameServer_Spec* PROTOBUF_RESTRICT other) { ::google::protobuf::Metadata GameServer_Spec::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[7]); + file_level_metadata_sdk_2eproto[9]); } // =================================================================== @@ -2365,7 +2821,7 @@ void GameServer_Status_Address::InternalSwap(GameServer_Status_Address* PROTOBUF ::google::protobuf::Metadata GameServer_Status_Address::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[8]); + file_level_metadata_sdk_2eproto[10]); } // =================================================================== @@ -2588,7 +3044,7 @@ void GameServer_Status_Port::InternalSwap(GameServer_Status_Port* PROTOBUF_RESTR ::google::protobuf::Metadata GameServer_Status_Port::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[9]); + file_level_metadata_sdk_2eproto[11]); } // =================================================================== @@ -2847,7 +3303,7 @@ void GameServer_Status_PlayerStatus::InternalSwap(GameServer_Status_PlayerStatus ::google::protobuf::Metadata GameServer_Status_PlayerStatus::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[10]); + file_level_metadata_sdk_2eproto[12]); } // =================================================================== @@ -3058,7 +3514,7 @@ void GameServer_Status_CounterStatus::InternalSwap(GameServer_Status_CounterStat ::google::protobuf::Metadata GameServer_Status_CounterStatus::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[11]); + file_level_metadata_sdk_2eproto[13]); } // =================================================================== @@ -3276,7 +3732,7 @@ void GameServer_Status_ListStatus::InternalSwap(GameServer_Status_ListStatus* PR ::google::protobuf::Metadata GameServer_Status_ListStatus::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[12]); + file_level_metadata_sdk_2eproto[14]); } // =================================================================== @@ -3286,7 +3742,7 @@ GameServer_Status_CountersEntry_DoNotUse::GameServer_Status_CountersEntry_DoNotU ::google::protobuf::Metadata GameServer_Status_CountersEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[13]); + file_level_metadata_sdk_2eproto[15]); } // =================================================================== @@ -3296,7 +3752,7 @@ GameServer_Status_ListsEntry_DoNotUse::GameServer_Status_ListsEntry_DoNotUse(::g ::google::protobuf::Metadata GameServer_Status_ListsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[14]); + file_level_metadata_sdk_2eproto[16]); } // =================================================================== @@ -3729,7 +4185,7 @@ void GameServer_Status::InternalSwap(GameServer_Status* PROTOBUF_RESTRICT other) ::google::protobuf::Metadata GameServer_Status::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[15]); + file_level_metadata_sdk_2eproto[17]); } // =================================================================== @@ -4032,7 +4488,7 @@ void GameServer::InternalSwap(GameServer* PROTOBUF_RESTRICT other) { ::google::protobuf::Metadata GameServer::GetMetadata() const { return ::_pbi::AssignDescriptors(&descriptor_table_sdk_2eproto_getter, &descriptor_table_sdk_2eproto_once, - file_level_metadata_sdk_2eproto[16]); + file_level_metadata_sdk_2eproto[18]); } // @@protoc_insertion_point(namespace_scope) } // namespace sdk diff --git a/sdks/csharp/proto/sdk/sdk.proto b/sdks/csharp/proto/sdk/sdk.proto index 2f3351eb08..a6b8821878 100644 --- a/sdks/csharp/proto/sdk/sdk.proto +++ b/sdks/csharp/proto/sdk/sdk.proto @@ -89,6 +89,14 @@ service SDK { }; } + // Apply multiple Annotations to the backing GameServer metadata + rpc SetAnnotations(KeyValues) returns (Empty) { + option (google.api.http) = { + put: "/metadata/annotations" + body: "*" + }; + } + // Marks the GameServer as the Reserved state for Duration rpc Reserve(Duration) returns (Empty) { option (google.api.http) = { @@ -108,6 +116,15 @@ message KeyValue { string value = 2; } +message KeyValues { + repeated KeyValue key_values = 1; +} + +// Key entry +message Key { + string key = 1; +} + // time duration, in seconds message Duration { int64 seconds = 1; diff --git a/sdks/go/sdk.go b/sdks/go/sdk.go index d533ee7c1b..6d6afe3c9e 100644 --- a/sdks/go/sdk.go +++ b/sdks/go/sdk.go @@ -20,12 +20,13 @@ import ( "fmt" "io" "os" + "sort" "time" "github.com/pkg/errors" - "google.golang.org/grpc/credentials/insecure" - + "golang.org/x/exp/maps" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "agones.dev/agones/pkg/sdk" ) @@ -139,6 +140,19 @@ func (s *SDK) SetAnnotation(key, value string) error { return errors.Wrap(err, "could not set annotation") } +// SetAnnotations sets a metadata annotation on the `GameServer` with the prefix "agones.dev/sdk-". +func (s *SDK) SetAnnotations(keyVals map[string]string) error { + keys := maps.Keys(keyVals) + sort.Strings(keys) + + kvs := make([]*sdk.KeyValue, 0, len(keyVals)) + for _, key := range keys { + kvs = append(kvs, &sdk.KeyValue{Key: key, Value: keyVals[key]}) + } + _, err := s.client.SetAnnotations(s.ctx, &sdk.KeyValues{KeyValues: kvs}) + return errors.Wrap(err, "could not set annotations") +} + // GameServer retrieve the GameServer details. func (s *SDK) GameServer() (*sdk.GameServer, error) { gs, err := s.client.GetGameServer(s.ctx, &sdk.Empty{}) diff --git a/sdks/go/sdk_test.go b/sdks/go/sdk_test.go index 60535a6073..efe802f23b 100644 --- a/sdks/go/sdk_test.go +++ b/sdks/go/sdk_test.go @@ -153,6 +153,13 @@ func (m *sdkMock) SetAnnotation(_ context.Context, in *sdk.KeyValue, _ ...grpc.C return &sdk.Empty{}, nil } +func (m *sdkMock) SetAnnotations(_ context.Context, in *sdk.KeyValues, _ ...grpc.CallOption) (*sdk.Empty, error) { + for _, kv := range in.KeyValues { + m.annotations["agones.dev/sdk-"+kv.Key] = kv.Value + } + return &sdk.Empty{}, nil +} + func (m *sdkMock) WatchGameServer(_ context.Context, _ *sdk.Empty, _ ...grpc.CallOption) (sdk.SDK_WatchGameServerClient, error) { return m.wm, nil } diff --git a/sdks/nodejs/lib/sdk_grpc_pb.js b/sdks/nodejs/lib/sdk_grpc_pb.js index 049ba5b3ed..3296d5a788 100644 --- a/sdks/nodejs/lib/sdk_grpc_pb.js +++ b/sdks/nodejs/lib/sdk_grpc_pb.js @@ -79,6 +79,17 @@ function deserialize_agones_dev_sdk_KeyValue(buffer_arg) { return sdk_pb.KeyValue.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_agones_dev_sdk_KeyValues(arg) { + if (!(arg instanceof sdk_pb.KeyValues)) { + throw new Error('Expected argument of type agones.dev.sdk.KeyValues'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agones_dev_sdk_KeyValues(buffer_arg) { + return sdk_pb.KeyValues.deserializeBinary(new Uint8Array(buffer_arg)); +} + // SDK service to be used in the GameServer SDK to the Pod Sidecar var SDKService = exports['agones.dev.sdk.SDK'] = { @@ -178,6 +189,18 @@ setAnnotation: { responseSerialize: serialize_agones_dev_sdk_Empty, responseDeserialize: deserialize_agones_dev_sdk_Empty, }, + // Apply multiple Annotations to the backing GameServer metadata +setAnnotations: { + path: '/agones.dev.sdk.SDK/SetAnnotations', + requestStream: false, + responseStream: false, + requestType: sdk_pb.KeyValues, + responseType: sdk_pb.Empty, + requestSerialize: serialize_agones_dev_sdk_KeyValues, + requestDeserialize: deserialize_agones_dev_sdk_KeyValues, + responseSerialize: serialize_agones_dev_sdk_Empty, + responseDeserialize: deserialize_agones_dev_sdk_Empty, + }, // Marks the GameServer as the Reserved state for Duration reserve: { path: '/agones.dev.sdk.SDK/Reserve', diff --git a/sdks/nodejs/lib/sdk_pb.js b/sdks/nodejs/lib/sdk_pb.js index 4ea5013b8c..bac4819f05 100644 --- a/sdks/nodejs/lib/sdk_pb.js +++ b/sdks/nodejs/lib/sdk_pb.js @@ -46,7 +46,9 @@ goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.CounterStatus', null, goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.ListStatus', null, global); goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.PlayerStatus', null, global); goog.exportSymbol('proto.agones.dev.sdk.GameServer.Status.Port', null, global); +goog.exportSymbol('proto.agones.dev.sdk.Key', null, global); goog.exportSymbol('proto.agones.dev.sdk.KeyValue', null, global); +goog.exportSymbol('proto.agones.dev.sdk.KeyValues', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -89,6 +91,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.agones.dev.sdk.KeyValue.displayName = 'proto.agones.dev.sdk.KeyValue'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.agones.dev.sdk.KeyValues = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.agones.dev.sdk.KeyValues.repeatedFields_, null); +}; +goog.inherits(proto.agones.dev.sdk.KeyValues, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.agones.dev.sdk.KeyValues.displayName = 'proto.agones.dev.sdk.KeyValues'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.agones.dev.sdk.Key = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.agones.dev.sdk.Key, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.agones.dev.sdk.Key.displayName = 'proto.agones.dev.sdk.Key'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -582,6 +626,296 @@ proto.agones.dev.sdk.KeyValue.prototype.setValue = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.agones.dev.sdk.KeyValues.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.agones.dev.sdk.KeyValues.prototype.toObject = function(opt_includeInstance) { + return proto.agones.dev.sdk.KeyValues.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.agones.dev.sdk.KeyValues} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.agones.dev.sdk.KeyValues.toObject = function(includeInstance, msg) { + var f, obj = { + keyValuesList: jspb.Message.toObjectList(msg.getKeyValuesList(), + proto.agones.dev.sdk.KeyValue.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.agones.dev.sdk.KeyValues} + */ +proto.agones.dev.sdk.KeyValues.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.agones.dev.sdk.KeyValues; + return proto.agones.dev.sdk.KeyValues.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.agones.dev.sdk.KeyValues} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.agones.dev.sdk.KeyValues} + */ +proto.agones.dev.sdk.KeyValues.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.agones.dev.sdk.KeyValue; + reader.readMessage(value,proto.agones.dev.sdk.KeyValue.deserializeBinaryFromReader); + msg.addKeyValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.agones.dev.sdk.KeyValues.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.agones.dev.sdk.KeyValues.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.agones.dev.sdk.KeyValues} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.agones.dev.sdk.KeyValues.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.agones.dev.sdk.KeyValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated KeyValue key_values = 1; + * @return {!Array} + */ +proto.agones.dev.sdk.KeyValues.prototype.getKeyValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.agones.dev.sdk.KeyValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.agones.dev.sdk.KeyValues} returns this +*/ +proto.agones.dev.sdk.KeyValues.prototype.setKeyValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.agones.dev.sdk.KeyValue=} opt_value + * @param {number=} opt_index + * @return {!proto.agones.dev.sdk.KeyValue} + */ +proto.agones.dev.sdk.KeyValues.prototype.addKeyValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.agones.dev.sdk.KeyValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.agones.dev.sdk.KeyValues} returns this + */ +proto.agones.dev.sdk.KeyValues.prototype.clearKeyValuesList = function() { + return this.setKeyValuesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.agones.dev.sdk.Key.prototype.toObject = function(opt_includeInstance) { + return proto.agones.dev.sdk.Key.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.agones.dev.sdk.Key} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.agones.dev.sdk.Key.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.agones.dev.sdk.Key} + */ +proto.agones.dev.sdk.Key.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.agones.dev.sdk.Key; + return proto.agones.dev.sdk.Key.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.agones.dev.sdk.Key} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.agones.dev.sdk.Key} + */ +proto.agones.dev.sdk.Key.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.agones.dev.sdk.Key.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.agones.dev.sdk.Key.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.agones.dev.sdk.Key} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.agones.dev.sdk.Key.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.agones.dev.sdk.Key.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agones.dev.sdk.Key} returns this + */ +proto.agones.dev.sdk.Key.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + if (jspb.Message.GENERATE_TO_OBJECT) { diff --git a/sdks/rust/proto/sdk/sdk.proto b/sdks/rust/proto/sdk/sdk.proto index 6504c64654..a933846ac0 100644 --- a/sdks/rust/proto/sdk/sdk.proto +++ b/sdks/rust/proto/sdk/sdk.proto @@ -91,6 +91,14 @@ service SDK { }; } + // Apply multiple Annotations to the backing GameServer metadata + rpc SetAnnotations(KeyValues) returns (Empty) { + option (google.api.http) = { + put: "/metadata/annotations" + body: "*" + }; + } + // Marks the GameServer as the Reserved state for Duration rpc Reserve(Duration) returns (Empty) { option (google.api.http) = { @@ -110,6 +118,15 @@ message KeyValue { string value = 2; } +message KeyValues { + repeated KeyValue key_values = 1; +} + +// Key entry +message Key { + string key = 1; +} + // time duration, in seconds message Duration { int64 seconds = 1; diff --git a/sdks/swagger/sdk.swagger.json b/sdks/swagger/sdk.swagger.json index 3738432cbc..831b339a53 100644 --- a/sdks/swagger/sdk.swagger.json +++ b/sdks/swagger/sdk.swagger.json @@ -118,6 +118,33 @@ ] } }, + "/metadata/annotations": { + "put": { + "summary": "Apply multiple Annotations to the backing GameServer metadata", + "operationId": "SetAnnotations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sdkEmpty" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sdkKeyValues" + } + } + ], + "tags": [ + "SDK" + ] + } + }, "/metadata/label": { "put": { "summary": "Apply a Label to the backing GameServer metadata", @@ -481,6 +508,18 @@ }, "title": "Key, Value entry" }, + "sdkKeyValues": { + "type": "object", + "properties": { + "key_values": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/sdkKeyValue" + } + } + } + }, "googlerpcStatus": { "type": "object", "properties": { diff --git a/test/sdk/restapi/swagger/api_sdk.go b/test/sdk/restapi/swagger/api_sdk.go index ef4a097908..8401ff122b 100644 --- a/test/sdk/restapi/swagger/api_sdk.go +++ b/test/sdk/restapi/swagger/api_sdk.go @@ -546,6 +546,91 @@ func (a *SDKApiService) SetAnnotation(ctx context.Context, body SdkKeyValue) (Sd return localVarReturnValue, localVarHttpResponse, nil } /* +SDKApiService Apply multiple Annotations to the backing GameServer metadata + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body +@return SdkEmpty +*/ +func (a *SDKApiService) SetAnnotations(ctx context.Context, body SdkKeyValues) (SdkEmpty, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SdkEmpty + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/metadata/annotations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v SdkEmpty + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* SDKApiService Apply a Label to the backing GameServer metadata * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param body diff --git a/test/sdk/restapi/swagger/model_sdk_key_values.go b/test/sdk/restapi/swagger/model_sdk_key_values.go new file mode 100644 index 0000000000..c084f7f61e --- /dev/null +++ b/test/sdk/restapi/swagger/model_sdk_key_values.go @@ -0,0 +1,28 @@ +// Copyright 2024 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was autogenerated. Do not edit directly. +/* + * sdk.proto + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: version not set + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +type SdkKeyValues struct { + KeyValues []SdkKeyValue `json:"key_values,omitempty"` +} diff --git a/vendor/golang.org/x/exp/LICENSE b/vendor/golang.org/x/exp/LICENSE new file mode 100644 index 0000000000..6a66aea5ea --- /dev/null +++ b/vendor/golang.org/x/exp/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/exp/PATENTS b/vendor/golang.org/x/exp/PATENTS new file mode 100644 index 0000000000..733099041f --- /dev/null +++ b/vendor/golang.org/x/exp/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/exp/maps/maps.go b/vendor/golang.org/x/exp/maps/maps.go new file mode 100644 index 0000000000..ecc0dabb74 --- /dev/null +++ b/vendor/golang.org/x/exp/maps/maps.go @@ -0,0 +1,94 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package maps defines various functions useful with maps of any type. +package maps + +// Keys returns the keys of the map m. +// The keys will be in an indeterminate order. +func Keys[M ~map[K]V, K comparable, V any](m M) []K { + r := make([]K, 0, len(m)) + for k := range m { + r = append(r, k) + } + return r +} + +// Values returns the values of the map m. +// The values will be in an indeterminate order. +func Values[M ~map[K]V, K comparable, V any](m M) []V { + r := make([]V, 0, len(m)) + for _, v := range m { + r = append(r, v) + } + return r +} + +// Equal reports whether two maps contain the same key/value pairs. +// Values are compared using ==. +func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || v1 != v2 { + return false + } + } + return true +} + +// EqualFunc is like Equal, but compares values using eq. +// Keys are still compared with ==. +func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || !eq(v1, v2) { + return false + } + } + return true +} + +// Clear removes all entries from m, leaving it empty. +func Clear[M ~map[K]V, K comparable, V any](m M) { + for k := range m { + delete(m, k) + } +} + +// Clone returns a copy of m. This is a shallow clone: +// the new keys and values are set using ordinary assignment. +func Clone[M ~map[K]V, K comparable, V any](m M) M { + // Preserve nil in case it matters. + if m == nil { + return nil + } + r := make(M, len(m)) + for k, v := range m { + r[k] = v + } + return r +} + +// Copy copies all key/value pairs in src adding them to dst. +// When a key in src is already present in dst, +// the value in dst will be overwritten by the value associated +// with the key in src. +func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) { + for k, v := range src { + dst[k] = v + } +} + +// DeleteFunc deletes any key/value pairs from m for which del returns true. +func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool) { + for k, v := range m { + if del(k, v) { + delete(m, k) + } + } +}